From 3a70332dd1d61c909a39c242d2e0cca0267aa6d0 Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Sat, 29 Apr 2017 15:41:50 +0300 Subject: [PATCH] Changed default from ES3 to ES5 Fixes #10117 The fix was easy, but then I had to get the tests passing: ```shell $ gulp runtests # loads of failures, more than 1000 actually. $ gulp baseline-accept $ gulp runtests # to make sure they now passed ``` ...and then `git add .` to add all the changes. (There were a bunch of new files created when I did it like this; is that correct?) ---- (Regarding the unrelated changes in `compileOnSave.ts`: I happened to see a few typing mistakes there very close to the changes I were making to that files, so I bundled that change along at the same time. Since the tests are passing I think it should be fine.) --- src/compiler/core.ts | 2 +- src/harness/unittests/compileOnSave.ts | 8 +- .../baselines/reference/APISample_compile.js | 2 +- tests/baselines/reference/APISample_linter.js | 2 +- .../reference/APISample_parseConfig.js | 2 +- .../reference/APISample_transform.js | 2 +- .../baselines/reference/APISample_watcher.js | 2 +- .../reference/ES3For-ofTypeCheck1.errors.txt | 7 - .../reference/ES3For-ofTypeCheck1.symbols | 4 + .../reference/ES3For-ofTypeCheck1.types | 5 + .../reference/ES3For-ofTypeCheck4.errors.txt | 8 - .../reference/ES3For-ofTypeCheck4.symbols | 8 + .../reference/ES3For-ofTypeCheck4.types | 8 + tests/baselines/reference/ES5For-of33.js | 2 +- .../reference/ES5For-of33.sourcemap.txt | 2 +- tests/baselines/reference/ES5For-of34.js | 2 +- .../reference/ES5For-of34.sourcemap.txt | 2 +- tests/baselines/reference/ES5For-of35.js | 2 +- .../reference/ES5For-of35.sourcemap.txt | 2 +- tests/baselines/reference/ES5For-of36.js | 2 +- .../reference/ES5For-of36.sourcemap.txt | 2 +- .../MemberAccessorDeclaration15.errors.txt | 5 +- ...eEachWithExportedLocalVarsOfTheSameName.js | 4 +- .../reference/accessorWithES3.errors.txt | 35 -- .../reference/accessorWithES3.symbols | 36 ++ .../baselines/reference/accessorWithES3.types | 40 ++ ...ccessorsAreNotContextuallyTyped.errors.txt | 22 - .../accessorsAreNotContextuallyTyped.symbols | 30 ++ .../accessorsAreNotContextuallyTyped.types | 34 ++ .../reference/accessorsEmit.errors.txt | 24 - .../baselines/reference/accessorsEmit.symbols | 30 ++ tests/baselines/reference/accessorsEmit.types | 34 ++ .../accessorsNotAllowedInES3.errors.txt | 14 - .../accessorsNotAllowedInES3.symbols | 11 + .../reference/accessorsNotAllowedInES3.types | 14 + ...rs_spec_section-4.5_error-cases.errors.txt | 26 +- ...sors_spec_section-4.5_inference.errors.txt | 63 --- ...cessors_spec_section-4.5_inference.symbols | 64 +++ ...accessors_spec_section-4.5_inference.types | 70 +++ tests/baselines/reference/aliasAssignments.js | 4 +- .../reference/aliasOnMergedModuleInterface.js | 2 +- .../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 | 6 +- .../reference/aliasUsageInVarAssignment.js | 6 +- .../reference/aliasUsedAsNameValue.js | 6 +- ...aceExportAssignmentUsedInVarInitializer.js | 4 +- .../allowSyntheticDefaultImports1.js | 6 +- .../allowSyntheticDefaultImports10.js | 6 +- .../allowSyntheticDefaultImports2.js | 2 +- .../allowSyntheticDefaultImports3.js | 2 +- .../allowSyntheticDefaultImports4.js | 4 +- .../allowSyntheticDefaultImports5.js | 2 +- .../allowSyntheticDefaultImports6.js | 2 +- .../allowSyntheticDefaultImports7.js | 4 +- .../allowSyntheticDefaultImports8.js | 4 +- .../allowSyntheticDefaultImports9.js | 6 +- .../reference/alwaysStrictModule4.js | 2 +- .../reference/ambientDeclarationsExternal.js | 2 +- .../reference/ambientDeclarationsPatterns.js | 4 +- ...nalModuleInsideNonAmbientExternalModule.js | 2 +- .../reference/ambientExternalModuleMerging.js | 2 +- ...rnalModuleWithInternalImportDeclaration.js | 2 +- ...lModuleWithoutInternalImportDeclaration.js | 2 +- .../ambientInsideNonAmbientExternalModule.js | 2 +- .../reference/ambientNameRestrictions.js | 2 +- tests/baselines/reference/ambientShorthand.js | 4 +- .../reference/ambientShorthand_duplicate.js | 2 +- .../reference/ambientShorthand_merging.js | 2 +- .../reference/ambientShorthand_reExport.js | 6 +- .../reference/amdDependencyComment1.js | 2 +- .../reference/amdDependencyComment2.js | 2 +- .../reference/amdDependencyCommentName1.js | 2 +- .../reference/amdDependencyCommentName2.js | 2 +- .../reference/amdDependencyCommentName3.js | 2 +- .../reference/amdDependencyCommentName4.js | 4 +- .../reference/amdImportAsPrimaryExpression.js | 4 +- .../amdImportNotAsPrimaryExpression.js | 4 +- .../reference/anyIdenticalToItself.errors.txt | 8 +- tests/baselines/reference/asOperator4.js | 4 +- .../reference/assignmentCompatBug3.errors.txt | 37 -- .../reference/assignmentCompatBug3.symbols | 61 +++ .../reference/assignmentCompatBug3.types | 72 +++ .../reference/augmentExportEquals1.js | 4 +- .../reference/augmentExportEquals1_1.js | 4 +- .../reference/augmentExportEquals2.js | 4 +- .../reference/augmentExportEquals2_1.js | 4 +- .../reference/augmentExportEquals3.js | 4 +- .../reference/augmentExportEquals3_1.js | 4 +- .../reference/augmentExportEquals4.js | 4 +- .../reference/augmentExportEquals4_1.js | 4 +- .../reference/augmentExportEquals5.js | 4 +- .../reference/augmentExportEquals6.js | 4 +- .../reference/augmentExportEquals6_1.js | 4 +- .../augmentedTypesExternalModule1.js | 2 +- .../reference/badExternalModuleReference.js | 2 +- tests/baselines/reference/bangInModuleName.js | 2 +- .../reference/baseConstraintOfDecorator.js | 2 +- .../baselines/reference/bluebirdStaticThis.js | 8 +- tests/baselines/reference/cacheResolutions.js | 6 +- .../reference/cachedModuleResolution1.js | 4 +- .../reference/cachedModuleResolution2.js | 4 +- .../reference/cachedModuleResolution3.js | 4 +- .../reference/cachedModuleResolution4.js | 4 +- .../reference/cachedModuleResolution5.js | 4 +- .../reference/cachedModuleResolution6.js | 4 +- .../reference/cachedModuleResolution7.js | 4 +- .../reference/cachedModuleResolution8.js | 4 +- .../reference/cachedModuleResolution9.js | 4 +- .../baselines/reference/chainedImportAlias.js | 4 +- .../reference/checkJsxChildrenProperty1.js | 2 +- .../reference/checkJsxChildrenProperty2.js | 2 +- .../reference/checkJsxChildrenProperty3.js | 2 +- .../reference/checkJsxChildrenProperty4.js | 2 +- .../reference/checkJsxChildrenProperty5.js | 2 +- .../reference/checkJsxChildrenProperty6.js | 2 +- .../reference/checkJsxChildrenProperty7.js | 2 +- .../reference/checkJsxChildrenProperty8.js | 2 +- .../reference/checkJsxChildrenProperty9.js | 2 +- .../baselines/reference/circularReference.js | 4 +- .../reference/circularReferenceInImport.js | 2 +- .../reference/classAbstractManyKeywords.js | 4 +- ...classMemberInitializerWithLamdaScoping3.js | 2 +- ...classMemberInitializerWithLamdaScoping4.js | 4 +- .../reference/classMethodWithKeywordName1.js | 2 +- .../classPropertyAsPrivate.errors.txt | 14 +- .../classPropertyAsProtected.errors.txt | 14 +- .../classPropertyIsPublicByDefault.errors.txt | 37 -- .../classPropertyIsPublicByDefault.symbols | 75 +++ .../classPropertyIsPublicByDefault.types | 84 +++ .../classWithStaticMembers.errors.txt | 28 - .../reference/classWithStaticMembers.symbols | 67 +++ .../reference/classWithStaticMembers.types | 70 +++ .../cloduleWithDuplicateMember1.errors.txt | 8 +- .../cloduleWithDuplicateMember2.errors.txt | 8 +- ...deGenModuleWithAccessorChildren.errors.txt | 63 --- ...nCodeGenModuleWithAccessorChildren.symbols | 105 ++++ ...ionCodeGenModuleWithAccessorChildren.types | 111 ++++ .../collisionExportsRequireAndAlias.js | 6 +- .../collisionExportsRequireAndAmbientClass.js | 2 +- .../collisionExportsRequireAndAmbientEnum.js | 2 +- ...llisionExportsRequireAndAmbientFunction.js | 2 +- ...collisionExportsRequireAndAmbientModule.js | 2 +- .../collisionExportsRequireAndAmbientVar.js | 2 +- .../collisionExportsRequireAndClass.js | 2 +- .../collisionExportsRequireAndEnum.js | 2 +- .../collisionExportsRequireAndFunction.js | 2 +- ...ionExportsRequireAndInternalModuleAlias.js | 2 +- .../collisionExportsRequireAndModule.js | 2 +- ...onExportsRequireAndUninstantiatedModule.js | 2 +- .../collisionExportsRequireAndVar.js | 2 +- ...uperAndLocalFunctionInAccessors.errors.txt | 20 +- ...sionSuperAndLocalVarInAccessors.errors.txt | 20 +- .../collisionSuperAndParameter.errors.txt | 8 +- ...xpressionAndLocalVarInAccessors.errors.txt | 14 +- .../commentOnClassAccessor1.errors.txt | 12 - .../reference/commentOnClassAccessor1.symbols | 10 + .../reference/commentOnClassAccessor1.types | 11 + .../commentOnClassAccessor2.errors.txt | 20 - .../reference/commentOnClassAccessor2.symbols | 17 + .../reference/commentOnClassAccessor2.types | 18 + .../commentOnExportEnumDeclaration.js | 2 +- .../reference/commentOnImportStatement1.js | 2 +- .../reference/commentOnImportStatement2.js | 2 +- .../reference/commentOnImportStatement3.js | 2 +- .../commentsBeforeVariableStatement1.js | 2 +- .../commonJSImportAsPrimaryExpression.js | 4 +- .../commonJSImportNotAsPrimaryExpression.js | 4 +- tests/baselines/reference/commonSourceDir5.js | 6 +- tests/baselines/reference/commonSourceDir6.js | 6 +- .../reference/commonSourceDirectory.js | 2 +- .../commonSourceDirectory.sourcemap.txt | 2 +- .../reference/commonSourceDirectory_dts.js | 2 +- .../commonSourceDirectory_dts.sourcemap.txt | 2 +- .../reference/complexNarrowingWithAny.js | 2 +- .../computedPropertyNames49_ES5.errors.txt | 18 +- .../computedPropertyNames50_ES5.errors.txt | 18 +- .../reference/constEnumExternalModule.js | 4 +- ...constructorWithIncompleteTypeAnnotation.js | 10 +- .../contextualTypingOfAccessors.errors.txt | 22 - .../contextualTypingOfAccessors.symbols | 27 + .../contextualTypingOfAccessors.types | 30 ++ ...llyTypedStringLiteralsInJsxAttributes02.js | 2 +- .../controlFlowBinaryOrExpression.js | 2 +- .../controlFlowPropertyDeclarations.js | 2 +- .../controlFlowSelfReferentialLoop.js | 4 +- .../baselines/reference/convertKeywordsYes.js | 144 ++--- .../reference/copyrightWithNewLine1.js | 2 +- .../reference/copyrightWithoutNewLine1.js | 2 +- .../crashIntypeCheckInvocationExpression.js | 2 +- ...rashIntypeCheckObjectCreationExpression.js | 2 +- .../declFileAliasUseBeforeDeclaration.js | 4 +- ...tExternalModuleWithSingleExportedModule.js | 2 +- ...assWithStaticMethodReturningConstructor.js | 2 +- ...lFileExportAssignmentOfGenericInterface.js | 4 +- .../reference/declFileExportImportChain.js | 6 +- .../reference/declFileExportImportChain2.js | 4 +- .../reference/declFileForExportedImport.js | 4 +- .../reference/declFileGenericType.js | 2 +- ...eclFileImportModuleWithExportAssignment.js | 2 +- .../declarationEmitExpressionInExtends3.js | 2 +- .../declarationEmitIdentifierPredicates01.js | 2 +- ...itIdentifierPredicatesWithPrivateName01.js | 2 +- .../declarationEmitIndexTypeNotFound.js | 2 +- ...declarationEmitInferedDefaultExportType.js | 4 +- .../declarationEmitInferedTypeAlias1.js | 4 +- .../declarationEmitInferedTypeAlias2.js | 4 +- .../declarationEmitInferedTypeAlias3.js | 6 +- .../declarationEmitInferedTypeAlias5.js | 4 +- .../declarationEmitInferedTypeAlias6.js | 4 +- .../declarationEmitInferedTypeAlias7.js | 4 +- .../declarationEmitInferedTypeAlias9.js | 2 +- .../reference/declarationEmitInvalidExport.js | 2 +- .../reference/declarationEmitNameConflicts.js | 2 +- .../declarationEmitNameConflictsWithAlias.js | 2 +- .../declarationEmitThisPredicates01.js | 2 +- .../declarationEmitThisPredicates02.js | 2 +- ...tionEmitThisPredicatesWithPrivateName01.js | 2 +- ...tionEmitThisPredicatesWithPrivateName02.js | 2 +- ...arationEmitTypeAliasWithTypeParameters1.js | 2 +- ...arationEmitTypeAliasWithTypeParameters2.js | 2 +- ...arationEmitTypeAliasWithTypeParameters5.js | 2 +- .../reference/declarationMerging2.js | 4 +- .../reference/decoratorOnImportEquals2.js | 4 +- .../decoratorWithUnderscoreMethod.js | 2 +- .../reference/dependencyViaImportAlias.js | 2 +- ...ctionOverridesBaseClassAccessor.errors.txt | 8 +- ...edClassIncludesInheritedMembers.errors.txt | 55 -- ...rivedClassIncludesInheritedMembers.symbols | 120 +++++ ...derivedClassIncludesInheritedMembers.types | 134 +++++ ...ivedClassOverridesPublicMembers.errors.txt | 89 ---- ...derivedClassOverridesPublicMembers.symbols | 227 ++++++++ .../derivedClassOverridesPublicMembers.types | 237 +++++++++ .../reference/derivedClassWithAny.errors.txt | 20 +- ...InstanceShadowingPublicInstance.errors.txt | 14 +- ...vateStaticShadowingPublicStatic.errors.txt | 14 +- .../derivedGenericClassWithAny.errors.txt | 14 +- .../destructuringParameterDeclaration6.js | 8 +- .../duplicateClassElements.errors.txt | 32 +- .../reference/duplicateLocalVariable1.js | 2 +- .../reference/duplicateLocalVariable2.js | 2 +- .../duplicateStringNamedProperty1.js | 2 +- .../duplicateSymbolsExportMatching.js | 2 +- .../reference/dynamicModuleTypecheckError.js | 2 +- .../baselines/reference/elidingImportNames.js | 6 +- tests/baselines/reference/emptyModuleName.js | 2 +- .../reference/enumFromExternalModule.js | 4 +- .../errorSuperPropertyAccess.errors.txt | 26 +- .../errorsInGenericTypeReference.errors.txt | 5 +- ...es3-oldStyleOctalLiteralInEnums.errors.txt | 8 +- .../es3-oldStyleOctalLiteralTypes.errors.txt | 8 +- .../reference/es3defaultAliasIsQuoted.js | 8 +- .../reference/es6ClassTest2.errors.txt | 8 +- tests/baselines/reference/es6ClassTest5.js | 2 +- .../reference/es6ExportEqualsInterop.js | 2 +- ...efaultBindingFollowedWithNamedImportDts.js | 4 +- ...tBindingFollowedWithNamespaceBindingDts.js | 4 +- ...gFollowedWithNamespaceBindingWithExport.js | 4 +- ...s6ImportDefaultBindingNoDefaultProperty.js | 4 +- .../reference/es6ImportNameSpaceImportAmd.js | 4 +- .../reference/es6ImportNameSpaceImportDts.js | 4 +- .../es6ImportNameSpaceImportWithExport.js | 4 +- .../reference/es6ImportNamedImportAmd.js | 4 +- .../reference/es6ImportNamedImportDts.js | 4 +- ...rtNamedImportInIndirectExportAssignment.js | 2 +- .../es6ImportNamedImportMergeErrors.js | 4 +- .../es6ImportNamedImportNoExportMember.js | 4 +- .../es6ImportNamedImportWithExport.js | 4 +- .../es6ImportNamedImportWithTypesAndValues.js | 4 +- .../es6ImportWithoutFromClauseAmd.js | 6 +- .../es6ImportWithoutFromClauseWithExport.js | 4 +- .../reference/exportAndImport-es3-amd.js | 10 +- .../reference/exportAndImport-es3.js | 10 +- .../reference/exportArrayBindingPattern.js | 2 +- .../reference/exportAssignClassAndModule.js | 2 +- .../reference/exportAssignDottedName.js | 2 +- .../exportAssignImportedIdentifier.js | 4 +- .../baselines/reference/exportAssignTypes.js | 2 +- .../exportAssignedTypeAsTypeAnnotation.js | 4 +- .../reference/exportAssignmentClass.js | 2 +- .../exportAssignmentConstrainedGenericType.js | 2 +- .../reference/exportAssignmentEnum.js | 2 +- .../reference/exportAssignmentFunction.js | 2 +- .../reference/exportAssignmentGenericType.js | 2 +- .../reference/exportAssignmentInterface.js | 4 +- .../exportAssignmentInternalModule.js | 2 +- .../exportAssignmentMergedInterface.js | 4 +- .../reference/exportAssignmentMergedModule.js | 2 +- ...xportAssignmentOfDeclaredExternalModule.js | 4 +- .../exportAssignmentOfGenericType1.js | 2 +- .../exportAssignmentTopLevelClodule.js | 2 +- .../exportAssignmentTopLevelEnumdule.js | 2 +- .../exportAssignmentTopLevelFundule.js | 2 +- .../exportAssignmentTopLevelIdentifier.js | 2 +- .../reference/exportAssignmentVariable.js | 2 +- tests/baselines/reference/exportBinding.js | 8 +- .../exportClassExtendingIntersection.js | 8 +- ...ationWithModuleSpecifierNameOnNextLine1.js | 10 +- .../exportDeclarationsInAmbientNamespaces.js | 2 +- .../reference/exportDeclareClass1.js | 2 +- .../reference/exportDeclaredModule.js | 2 +- .../reference/exportDefaultAbstractClass.js | 6 +- .../reference/exportDefaultProperty.js | 18 +- .../reference/exportDefaultProperty2.js | 8 +- .../reference/exportEqualCallable.js | 2 +- .../reference/exportEqualErrorType.js | 2 +- .../reference/exportEqualMemberMissing.js | 2 +- .../reference/exportEqualsDefaultProperty.js | 4 +- .../reference/exportEqualsProperty.js | 2 +- .../reference/exportEqualsProperty2.js | 2 +- tests/baselines/reference/exportImport.js | 4 +- .../reference/exportImportMultipleFiles.js | 6 +- .../exportImportNonInstantiatedModule2.js | 6 +- .../exportNonInitializedVariablesAMD.js | 2 +- .../exportNonInitializedVariablesCommonJS.js | 2 +- .../exportNonInitializedVariablesUMD.js | 2 +- .../exportRedeclarationTypeAliases.js | 2 +- .../reference/exportSameNameFuncVar.js | 2 +- .../reference/exportSpecifierForAGlobal.js | 2 +- ...rtSpecifierReferencingOuterDeclaration2.js | 2 +- ...rtSpecifierReferencingOuterDeclaration4.js | 2 +- .../reference/exportStarForValues.js | 4 +- .../reference/exportStarForValues2.js | 6 +- .../reference/exportStarForValues3.js | 10 +- .../reference/exportStarForValues4.js | 6 +- .../reference/exportStarForValues5.js | 4 +- .../reference/exportStarForValues7.js | 6 +- .../reference/exportStarForValues8.js | 10 +- .../reference/exportStarForValues9.js | 6 +- tests/baselines/reference/exportToString.js | 2 +- tests/baselines/reference/exportVisibility.js | 2 +- .../exportedBlockScopedDeclarations.js | 2 +- ...InterfaceInaccessibleInCallbackInModule.js | 2 +- .../baselines/reference/exportedVariable1.js | 2 +- .../exportingContainingVisibleType.errors.txt | 16 - .../exportingContainingVisibleType.js | 2 +- .../exportingContainingVisibleType.symbols | 20 + .../exportingContainingVisibleType.types | 21 + .../baselines/reference/exportsAndImports1.js | 6 +- .../baselines/reference/exportsAndImports2.js | 6 +- .../baselines/reference/exportsAndImports3.js | 6 +- .../exportsAndImportsWithUnderscores1.js | 8 +- .../exportsAndImportsWithUnderscores2.js | 8 +- .../exportsAndImportsWithUnderscores3.js | 8 +- .../exportsAndImportsWithUnderscores4.js | 4 +- .../extendClassExpressionFromModule.js | 2 +- ...xtendingClassFromAliasAndUsageInIndexer.js | 8 +- .../reference/extendsUntypedModule.js | 4 +- .../reference/externalModuleAssignToVar.js | 4 +- .../externalModuleExportingGenericClass.js | 2 +- .../externalModuleImmutableBindings.js | 4 +- .../reference/externalModuleQualification.js | 2 +- ...ceOfImportDeclarationWithExportModifier.js | 4 +- ...ernceResolutionOrderInImportDeclaration.js | 4 +- .../reference/externalModuleResolution.js | 2 +- .../reference/externalModuleResolution2.js | 2 +- .../externalModuleWithoutCompilerFlag1.js | 2 +- .../reference/fatarrowfunctionsErrors.js | 2 +- .../fieldAndGetterWithSameName.errors.txt | 5 +- .../reference/fieldAndGetterWithSameName.js | 2 +- ...ilesEmittingIntoSameOutputWithOutOption.js | 2 +- .../functionAndImportNameConflict.js | 4 +- ...functionAndPropertyNameConflict.errors.txt | 5 +- .../functionLikeInParameterInitializer.js | 2 +- .../reference/genericArrayExtenstions.js | 2 +- .../reference/genericClassesInModule2.js | 2 +- .../reference/genericGetter.errors.txt | 5 +- .../reference/genericGetter2.errors.txt | 5 +- .../reference/genericGetter3.errors.txt | 5 +- .../genericInterfaceFunctionTypeParameter.js | 2 +- .../reference/genericMemberFunction.js | 2 +- ...ericRecursiveImplicitConstructorErrors1.js | 2 +- .../genericReturnTypeFromGetter1.errors.txt | 5 +- .../reference/genericReturnTypeFromGetter1.js | 2 +- .../genericTypeWithMultipleBases1.js | 2 +- .../genericTypeWithMultipleBases2.js | 2 +- .../genericWithIndexerOfTypeParameterType2.js | 2 +- ...ReturnTypeAndFunctionClassMerge.errors.txt | 5 +- .../getAndSetAsMemberNames.errors.txt | 27 - .../reference/getAndSetAsMemberNames.symbols | 47 ++ .../reference/getAndSetAsMemberNames.types | 54 ++ .../getAndSetNotIdenticalType.errors.txt | 8 +- .../getAndSetNotIdenticalType2.errors.txt | 8 +- .../getAndSetNotIdenticalType3.errors.txt | 8 +- .../reference/getsetReturnTypes.errors.txt | 13 - .../reference/getsetReturnTypes.symbols | 23 + .../reference/getsetReturnTypes.types | 29 + .../getterMissingReturnError.errors.txt | 5 +- ...erThatThrowsShouldNotNeedReturn.errors.txt | 15 - ...etterThatThrowsShouldNotNeedReturn.symbols | 16 + .../getterThatThrowsShouldNotNeedReturn.types | 18 + .../reference/gettersAndSetters.errors.txt | 20 +- .../gettersAndSettersAccessibility.errors.txt | 8 +- .../gettersAndSettersErrors.errors.txt | 22 +- .../gettersAndSettersTypesAgree.errors.txt | 37 -- .../gettersAndSettersTypesAgree.symbols | 31 ++ .../gettersAndSettersTypesAgree.types | 37 ++ tests/baselines/reference/giant.errors.txt | 288 +++++----- tests/baselines/reference/giant.js | 2 +- .../globalAugmentationModuleResolution.js | 2 +- .../illegalSuperCallsInConstructor.errors.txt | 8 +- .../implicitAnyCastedValue.errors.txt | 11 +- ...AndSetAccessorWithAnyReturnType.errors.txt | 14 +- ...sAnExternalModuleInsideAnInternalModule.js | 4 +- .../baselines/reference/importAsBaseClass.js | 4 +- tests/baselines/reference/importDecl.js | 12 +- ...eclRefereingExternalModuleWithNoResolve.js | 2 +- .../reference/importDeclWithClassModifiers.js | 2 +- .../importDeclWithDeclareModifier.js | 2 +- .../reference/importDeclWithExportModifier.js | 2 +- ...clWithExportModifierAndExportAssignment.js | 2 +- .../importDeclarationUsedAsTypeQuery.js | 4 +- .../reference/importImportOnlyModule.js | 6 +- .../baselines/reference/importInsideModule.js | 2 +- .../reference/importNonExternalModule.js | 2 +- .../reference/importNonStringLiteral.js | 2 +- .../baselines/reference/importTsBeforeDTs.js | 4 +- .../reference/importUsedInExtendsList1.js | 4 +- .../reference/importWithTrailingSlash.js | 20 +- .../importWithTrailingSlash_noResolve.js | 2 +- .../import_reference-exported-alias.js | 2 +- .../import_reference-to-type-alias.js | 4 +- ...-referenecing-aliased-type-throug-array.js | 2 +- ...ar-referencing-an-imported-module-alias.js | 4 +- .../importedAliasesInTypePositions.js | 4 +- .../reference/importedModuleClassNameClash.js | 2 +- .../reference/importsImplicitlyReadonly.js | 4 +- .../reference/indexedAccessRelation.js | 2 +- .../reference/indexedAccessTypeConstraints.js | 2 +- .../reference/inferSetterParamType.errors.txt | 14 +- .../infinitelyExpandingOverloads.errors.txt | 32 -- .../infinitelyExpandingOverloads.symbols | 88 ++++ .../infinitelyExpandingOverloads.types | 90 ++++ ...emberAccessorOverridingAccessor.errors.txt | 32 -- ...ceMemberAccessorOverridingAccessor.symbols | 31 ++ ...anceMemberAccessorOverridingAccessor.types | 33 ++ ...eMemberAccessorOverridingMethod.errors.txt | 8 +- ...emberAccessorOverridingProperty.errors.txt | 21 - ...ceMemberAccessorOverridingProperty.symbols | 23 + ...anceMemberAccessorOverridingProperty.types | 24 + ...nceMemberFuncOverridingAccessor.errors.txt | 8 +- ...emberPropertyOverridingAccessor.errors.txt | 22 - ...ceMemberPropertyOverridingAccessor.symbols | 34 ++ ...anceMemberPropertyOverridingAccessor.types | 35 ++ ...taticAccessorOverridingAccessor.errors.txt | 32 -- ...ceStaticAccessorOverridingAccessor.symbols | 31 ++ ...anceStaticAccessorOverridingAccessor.types | 33 ++ ...eStaticAccessorOverridingMethod.errors.txt | 8 +- ...taticAccessorOverridingProperty.errors.txt | 21 - ...ceStaticAccessorOverridingProperty.symbols | 23 + ...anceStaticAccessorOverridingProperty.types | 24 + ...nceStaticFuncOverridingAccessor.errors.txt | 8 +- ...uncOverridingAccessorOfFuncType.errors.txt | 17 - ...icFuncOverridingAccessorOfFuncType.symbols | 21 + ...aticFuncOverridingAccessorOfFuncType.types | 23 + ...taticPropertyOverridingAccessor.errors.txt | 20 - ...ceStaticPropertyOverridingAccessor.symbols | 22 + ...anceStaticPropertyOverridingAccessor.types | 23 + .../reference/instanceOfInExternalModules.js | 4 +- ...ropertiesInheritedIntoClassType.errors.txt | 14 +- .../instancePropertyInClassType.errors.txt | 14 +- .../reference/interfaceContextualType.js | 2 +- .../reference/interfaceDeclaration3.js | 2 +- .../reference/interfaceDeclaration5.js | 2 +- .../interfaceExtendingClass.errors.txt | 25 - .../reference/interfaceExtendingClass.symbols | 56 ++ .../reference/interfaceExtendingClass.types | 59 +++ .../interfaceImplementation5.errors.txt | 58 -- .../interfaceImplementation5.symbols | 71 +++ .../reference/interfaceImplementation5.types | 73 +++ .../reference/interfaceImplementation6.js | 2 +- ...alAliasClassInsideLocalModuleWithExport.js | 2 +- ...liasClassInsideLocalModuleWithoutExport.js | 2 +- ...sideLocalModuleWithoutExportAccessError.js | 2 +- ...liasClassInsideTopLevelModuleWithExport.js | 2 +- ...sClassInsideTopLevelModuleWithoutExport.js | 2 +- ...nalAliasEnumInsideLocalModuleWithExport.js | 2 +- ...AliasEnumInsideLocalModuleWithoutExport.js | 2 +- ...sideLocalModuleWithoutExportAccessError.js | 2 +- ...AliasEnumInsideTopLevelModuleWithExport.js | 2 +- ...asEnumInsideTopLevelModuleWithoutExport.js | 2 +- ...liasFunctionInsideLocalModuleWithExport.js | 2 +- ...sFunctionInsideLocalModuleWithoutExport.js | 2 +- ...sideLocalModuleWithoutExportAccessError.js | 2 +- ...sFunctionInsideTopLevelModuleWithExport.js | 2 +- ...nctionInsideTopLevelModuleWithoutExport.js | 2 +- ...alizedModuleInsideLocalModuleWithExport.js | 2 +- ...zedModuleInsideLocalModuleWithoutExport.js | 2 +- ...sideLocalModuleWithoutExportAccessError.js | 2 +- ...zedModuleInsideTopLevelModuleWithExport.js | 2 +- ...ModuleInsideTopLevelModuleWithoutExport.js | 2 +- ...iasInterfaceInsideLocalModuleWithExport.js | 2 +- ...InterfaceInsideLocalModuleWithoutExport.js | 2 +- ...sideLocalModuleWithoutExportAccessError.js | 2 +- ...InterfaceInsideTopLevelModuleWithExport.js | 2 +- ...erfaceInsideTopLevelModuleWithoutExport.js | 2 +- ...alizedModuleInsideLocalModuleWithExport.js | 2 +- ...zedModuleInsideLocalModuleWithoutExport.js | 2 +- ...sideLocalModuleWithoutExportAccessError.js | 2 +- ...zedModuleInsideTopLevelModuleWithExport.js | 2 +- ...ModuleInsideTopLevelModuleWithoutExport.js | 2 +- ...rnalAliasVarInsideLocalModuleWithExport.js | 2 +- ...lAliasVarInsideLocalModuleWithoutExport.js | 2 +- ...sideLocalModuleWithoutExportAccessError.js | 2 +- ...lAliasVarInsideTopLevelModuleWithExport.js | 2 +- ...iasVarInsideTopLevelModuleWithoutExport.js | 2 +- .../reference/intersectionTypeInference1.js | 2 +- .../invalidSyntaxNamespaceImportWithAMD.js | 4 +- ...nvalidSyntaxNamespaceImportWithCommonjs.js | 4 +- .../baselines/reference/isLiteral1.errors.txt | 7 + .../baselines/reference/isLiteral2.errors.txt | 7 + .../isolatedModulesSpecifiedModule.js | 2 +- .../isolatedModulesUnspecifiedModule.js | 2 +- ...jsFileCompilationRestParamJsDocFunction.js | 4 +- .../reference/jsxImportInAttribute.js | 6 +- tests/baselines/reference/jsxViaImport.2.js | 2 +- tests/baselines/reference/jsxViaImport.js | 2 +- .../baselines/reference/keepImportsInDts1.js | 2 +- .../baselines/reference/keepImportsInDts2.js | 4 +- .../baselines/reference/keepImportsInDts3.js | 4 +- .../baselines/reference/keepImportsInDts4.js | 4 +- tests/baselines/reference/keywordField.js | 6 +- .../reference/keywordInJsxIdentifier.js | 4 +- .../reference/localAliasExportAssignment.js | 2 +- .../baselines/reference/mapOnTupleTypes01.js | 2 +- .../baselines/reference/mapOnTupleTypes02.js | 2 +- .../memberAccessMustUseModuleInstances.js | 4 +- .../reference/mergeWithImportedNamespace.js | 4 +- .../reference/mergeWithImportedType.js | 4 +- .../reference/mergedDeclarations6.js | 4 +- .../reference/mergedDeclarations7.js | 2 +- .../mergedModuleDeclarationCodeGen.js | 2 +- .../reference/metadataOfStringLiteral.js | 2 +- tests/baselines/reference/metadataOfUnion.js | 14 +- .../reference/metadataOfUnionWithNull.js | 24 +- .../missingFunctionImplementation.js | 2 +- .../missingFunctionImplementation2.js | 4 +- .../missingSemicolonInModuleSpecifier.js | 4 +- .../moduleAliasAsFunctionArgument.js | 4 +- ...gmentationCollidingNamesInAugmentation1.js | 8 +- .../moduleAugmentationDeclarationEmit1.js | 6 +- .../moduleAugmentationDeclarationEmit2.js | 6 +- .../moduleAugmentationDisallowedExtensions.js | 10 +- .../moduleAugmentationExtendAmbientModule1.js | 4 +- .../moduleAugmentationExtendAmbientModule2.js | 4 +- .../moduleAugmentationExtendFileModule1.js | 6 +- .../moduleAugmentationExtendFileModule2.js | 6 +- .../reference/moduleAugmentationGlobal1.js | 4 +- .../reference/moduleAugmentationGlobal2.js | 4 +- .../reference/moduleAugmentationGlobal3.js | 6 +- .../reference/moduleAugmentationGlobal4.js | 6 +- .../reference/moduleAugmentationGlobal5.js | 2 +- .../moduleAugmentationImportsAndExports1.js | 8 +- .../moduleAugmentationImportsAndExports2.js | 8 +- .../moduleAugmentationImportsAndExports3.js | 8 +- .../moduleAugmentationImportsAndExports4.js | 8 +- .../moduleAugmentationImportsAndExports5.js | 8 +- .../moduleAugmentationImportsAndExports6.js | 8 +- .../moduleAugmentationInAmbientModule1.js | 2 +- .../moduleAugmentationInAmbientModule2.js | 2 +- .../moduleAugmentationInAmbientModule3.js | 2 +- .../moduleAugmentationInAmbientModule4.js | 2 +- .../moduleAugmentationInAmbientModule5.js | 2 +- .../moduleAugmentationInDependency.js | 2 +- .../moduleAugmentationInDependency2.js | 4 +- .../reference/moduleAugmentationNoNewNames.js | 6 +- .../reference/moduleAugmentationsImports1.js | 8 +- .../reference/moduleAugmentationsImports2.js | 10 +- .../reference/moduleAugmentationsImports3.js | 8 +- .../reference/moduleAugmentationsImports4.js | 6 +- .../baselines/reference/moduleCodeGenTest5.js | 2 +- .../baselines/reference/moduleCodegenTest4.js | 2 +- .../reference/moduleDuplicateIdentifiers.js | 2 +- tests/baselines/reference/moduleExports1.js | 2 +- .../moduleImportedForTypeArgumentPosition.js | 4 +- .../reference/moduleInTypePosition1.js | 4 +- .../reference/moduleMergeConstructor.js | 2 +- tests/baselines/reference/moduleNoneErrors.js | 2 +- .../baselines/reference/modulePrologueAMD.js | 2 +- .../reference/modulePrologueCommonjs.js | 2 +- .../baselines/reference/modulePrologueUmd.js | 2 +- .../reference/moduleResolutionNoResolve.js | 4 +- .../reference/moduleResolutionNoTs.js | 10 +- .../moduleResolutionWithExtensions.js | 10 +- ...leResolutionWithExtensions_notSupported.js | 2 +- ...eResolutionWithExtensions_notSupported2.js | 2 +- ...eResolutionWithExtensions_notSupported3.js | 2 +- ...moduleResolutionWithExtensions_preferTs.js | 6 +- ...duleResolutionWithExtensions_unexpected.js | 2 +- ...uleResolutionWithExtensions_unexpected2.js | 2 +- ...lutionWithExtensions_withAmbientPresent.js | 2 +- .../reference/moduleResolutionWithSymlinks.js | 6 +- ...ResolutionWithSymlinks_notInNodeModules.js | 6 +- ...moduleResolutionWithSymlinks_withOutDir.js | 6 +- ...duleSameValueDuplicateExportedBindings1.js | 6 +- ...duleSameValueDuplicateExportedBindings2.js | 6 +- tests/baselines/reference/moduleScoping.js | 4 +- .../baselines/reference/multiImportExport.js | 4 +- .../reference/multipleExportDefault1.js | 6 +- .../reference/multipleExportDefault2.js | 6 +- .../reference/multipleExportDefault3.js | 6 +- .../reference/multipleExportDefault4.js | 6 +- .../reference/multipleExportDefault5.js | 6 +- .../reference/multipleExportDefault6.js | 6 +- tests/baselines/reference/multipleExports.js | 2 +- .../reference/nameDelimitedBySlashes.js | 4 +- .../reference/nameWithFileExtension.js | 4 +- .../reference/nameWithRelativePaths.js | 8 +- .../narrowingConstrainedTypeParameter.js | 2 +- .../reference/nestedClassDeclaration.js | 2 +- .../reference/newOperator.errors.txt | 5 +- .../reference/newWithSpread.errors.txt | 177 ------- .../baselines/reference/newWithSpread.symbols | 273 ++++++++++ tests/baselines/reference/newWithSpread.types | 494 ++++++++++++++++++ ...xpressionAndLocalVarInAccessors.errors.txt | 58 -- ...isExpressionAndLocalVarInAccessors.symbols | 94 ++++ ...ThisExpressionAndLocalVarInAccessors.types | 116 ++++ ...ortModuleAugmentationInDeclarationFile2.js | 2 +- ...ortModuleAugmentationInDeclarationFile3.js | 2 +- ...ImplicitAnyDestructuringInPrivateMethod.js | 2 +- .../reference/noImplicitUseStrict_amd.js | 2 +- .../reference/noImplicitUseStrict_commonjs.js | 2 +- .../reference/noImplicitUseStrict_umd.js | 2 +- tests/baselines/reference/nodeResolution1.js | 4 +- tests/baselines/reference/nodeResolution2.js | 2 +- tests/baselines/reference/nodeResolution3.js | 2 +- tests/baselines/reference/nodeResolution4.js | 4 +- tests/baselines/reference/nodeResolution5.js | 2 +- tests/baselines/reference/nodeResolution6.js | 2 +- tests/baselines/reference/nodeResolution7.js | 2 +- tests/baselines/reference/nodeResolution8.js | 2 +- .../baselines/reference/nonMergedOverloads.js | 2 +- .../nounusedTypeParameterConstraint.js | 4 +- ...rConstrainsPropertyDeclarations.errors.txt | 17 +- ...bjectBindingPatternKeywordIdentifiers01.js | 2 +- ...bjectBindingPatternKeywordIdentifiers02.js | 2 +- ...bjectBindingPatternKeywordIdentifiers03.js | 2 +- ...bjectBindingPatternKeywordIdentifiers04.js | 2 +- tests/baselines/reference/objectIndexer.js | 2 +- .../objectLitPropertyScoping.errors.txt | 24 - .../objectLitPropertyScoping.symbols | 37 ++ .../reference/objectLitPropertyScoping.types | 44 ++ .../objectLiteralErrorsES3.errors.txt | 20 - .../reference/objectLiteralErrorsES3.symbols | 17 + .../reference/objectLiteralErrorsES3.types | 22 + .../objectLiteralGettersAndSetters.errors.txt | 188 ------- .../objectLiteralGettersAndSetters.symbols | 256 +++++++++ .../objectLiteralGettersAndSetters.types | 295 +++++++++++ ...jectLiteralMemberWithModifiers2.errors.txt | 5 +- ...ndPropertiesErrorFromNotUsingIdentifier.js | 12 +- ...alWithGetAccessorInsideFunction.errors.txt | 14 - ...teralWithGetAccessorInsideFunction.symbols | 19 + ...LiteralWithGetAccessorInsideFunction.types | 21 + ...eWithStringNamedNumericProperty.errors.txt | 153 ++++++ ...ctTypesIdentityWithConstructSignatures2.js | 2 +- ...ConstructSignaturesDifferingParamCounts.js | 2 +- ...nstructSignaturesDifferingByConstraints.js | 2 +- ...structSignaturesDifferingByConstraints2.js | 2 +- ...structSignaturesDifferingByConstraints3.js | 2 +- ...onstructSignaturesDifferingByReturnType.js | 2 +- ...nstructSignaturesDifferingByReturnType2.js | 2 +- ...tSignaturesDifferingTypeParameterCounts.js | 2 +- ...ctSignaturesDifferingTypeParameterNames.js | 2 +- ...enericConstructSignaturesOptionalParams.js | 2 +- ...nericConstructSignaturesOptionalParams2.js | 2 +- ...nericConstructSignaturesOptionalParams3.js | 2 +- .../octalLiteralInStrictModeES3.errors.txt | 5 +- .../reference/optionalSetterParam.errors.txt | 6 +- .../reference/overloadModifiersMustAgree.js | 2 +- tests/baselines/reference/packageJsonMain.js | 2 +- .../packageJsonMain_isNonRecursive.js | 2 +- tests/baselines/reference/parser0_004152.js | 2 +- tests/baselines/reference/parser509546.js | 2 +- tests/baselines/reference/parser509546_1.js | 2 +- tests/baselines/reference/parser509546_2.js | 2 +- tests/baselines/reference/parser618973.js | 2 +- .../reference/parserArgumentList1.js | 2 +- .../reference/parserAstSpans1.errors.txt | 20 +- tests/baselines/reference/parserClass1.js | 2 +- tests/baselines/reference/parserClass2.js | 2 +- .../reference/parserES3Accessors1.errors.txt | 5 +- .../reference/parserES3Accessors2.errors.txt | 9 - .../reference/parserES3Accessors2.symbols | 8 + .../reference/parserES3Accessors2.types | 8 + .../reference/parserES3Accessors3.errors.txt | 5 +- .../reference/parserES3Accessors4.errors.txt | 7 - .../reference/parserES3Accessors4.symbols | 6 + .../reference/parserES3Accessors4.types | 7 + tests/baselines/reference/parserEnum1.js | 2 +- tests/baselines/reference/parserEnum2.js | 2 +- tests/baselines/reference/parserEnum3.js | 2 +- tests/baselines/reference/parserEnum4.js | 2 +- .../parserErrantSemicolonInClass1.errors.txt | 15 +- .../parserErrorRecovery_ObjectLiteral2.js | 2 +- .../parserErrorRecovery_ObjectLiteral3.js | 2 +- .../parserErrorRecovery_ObjectLiteral4.js | 2 +- .../parserErrorRecovery_ObjectLiteral5.js | 2 +- .../parserExportAsFunctionIdentifier.js | 2 +- .../reference/parserInterfaceDeclaration6.js | 2 +- .../reference/parserInterfaceDeclaration7.js | 2 +- .../parserKeywordsAsIdentifierName1.js | 6 +- .../parserModifierOnStatementInBlock1.js | 2 +- .../parserModifierOnStatementInBlock3.js | 2 +- tests/baselines/reference/parserModule1.js | 2 +- .../parserReturnStatement4.errors.txt | 7 - .../reference/parserReturnStatement4.symbols | 5 + .../reference/parserReturnStatement4.types | 6 + .../parserShorthandPropertyAssignment2.js | 2 +- .../reference/parserSuperExpression3.js | 2 +- ...thMappingBasedModuleResolution1_classic.js | 2 +- .../pathMappingBasedModuleResolution1_node.js | 2 +- ...thMappingBasedModuleResolution2_classic.js | 2 +- .../pathMappingBasedModuleResolution2_node.js | 2 +- ...thMappingBasedModuleResolution3_classic.js | 8 +- .../pathMappingBasedModuleResolution3_node.js | 6 +- ...thMappingBasedModuleResolution4_classic.js | 8 +- .../pathMappingBasedModuleResolution4_node.js | 6 +- ...thMappingBasedModuleResolution5_classic.js | 10 +- .../pathMappingBasedModuleResolution5_node.js | 8 +- ...thMappingBasedModuleResolution6_classic.js | 4 +- .../pathMappingBasedModuleResolution6_node.js | 4 +- ...thMappingBasedModuleResolution7_classic.js | 6 +- .../pathMappingBasedModuleResolution7_node.js | 6 +- ...pingBasedModuleResolution_withExtension.js | 6 +- ...leResolution_withExtension_failedLookup.js | 2 +- .../prespecializedGenericMembers1.js | 2 +- .../privacyCannotNameVarTypeDeclFile.js | 6 +- .../privacyCheckAnonymousFunctionParameter.js | 2 +- ...privacyCheckAnonymousFunctionParameter2.js | 2 +- ...lbackOfInterfaceMethodWithTypeParameter.js | 2 +- ...nalModuleExportAssignmentOfGenericClass.js | 2 +- ...arameterReferenceInConstructorParameter.js | 2 +- .../reference/privacyCheckTypeOfFunction.js | 2 +- tests/baselines/reference/privacyClass.js | 2 +- .../privacyClassExtendsClauseDeclFile.js | 2 +- .../privacyClassImplementsClauseDeclFile.js | 2 +- ...FunctionCannotNameParameterTypeDeclFile.js | 6 +- ...acyFunctionCannotNameReturnTypeDeclFile.js | 6 +- .../privacyFunctionParameterDeclFile.js | 2 +- .../privacyFunctionReturnTypeDeclFile.js | 2 +- tests/baselines/reference/privacyGloFunc.js | 2 +- tests/baselines/reference/privacyImport.js | 2 +- .../reference/privacyImportParseErrors.js | 2 +- tests/baselines/reference/privacyInterface.js | 2 +- .../privacyInterfaceExtendsClauseDeclFile.js | 2 +- ...yLocalInternalReferenceImportWithExport.js | 2 +- ...calInternalReferenceImportWithoutExport.js | 2 +- ...elAmbientExternalModuleImportWithExport.js | 6 +- ...mbientExternalModuleImportWithoutExport.js | 6 +- ...pLevelInternalReferenceImportWithExport.js | 2 +- ...velInternalReferenceImportWithoutExport.js | 2 +- .../privacyTypeParameterOfFunction.js | 2 +- .../privacyTypeParameterOfFunctionDeclFile.js | 2 +- .../reference/privacyTypeParametersOfClass.js | 2 +- .../privacyTypeParametersOfClassDeclFile.js | 2 +- .../privacyTypeParametersOfInterface.js | 2 +- ...rivacyTypeParametersOfInterfaceDeclFile.js | 2 +- tests/baselines/reference/privacyVar.js | 2 +- .../baselines/reference/privacyVarDeclFile.js | 2 +- ...ssPropertyAccessibleWithinClass.errors.txt | 58 -- ...ClassPropertyAccessibleWithinClass.symbols | 126 +++++ ...teClassPropertyAccessibleWithinClass.types | 141 +++++ .../privatePropertyUsingObjectType.js | 2 +- .../reference/project/baseline/amd/decl.js | 2 +- .../reference/project/baseline/amd/emit.js | 2 +- .../reference/project/baseline/node/decl.js | 2 +- .../reference/project/baseline/node/emit.js | 2 +- .../reference/project/baseline2/amd/decl.js | 2 +- .../project/baseline2/amd/dont_emit.js | 2 +- .../reference/project/baseline2/node/decl.js | 2 +- .../project/baseline2/node/dont_emit.js | 2 +- .../project/baseline3/amd/nestedModule.js | 2 +- .../project/baseline3/node/nestedModule.js | 2 +- .../reference/project/declarationDir/amd/a.js | 2 +- .../project/declarationDir/amd/subfolder/b.js | 2 +- .../project/declarationDir/amd/subfolder/c.js | 2 +- .../project/declarationDir/node/a.js | 2 +- .../declarationDir/node/subfolder/b.js | 2 +- .../declarationDir/node/subfolder/c.js | 2 +- .../project/declarationDir2/amd/out/a.js | 2 +- .../declarationDir2/amd/out/subfolder/b.js | 2 +- .../declarationDir2/amd/out/subfolder/c.js | 2 +- .../project/declarationDir2/node/out/a.js | 2 +- .../declarationDir2/node/out/subfolder/b.js | 2 +- .../declarationDir2/node/out/subfolder/c.js | 2 +- .../project/declarationDir3/amd/out.js | 6 +- .../declarationsCascadingImports/amd/m4.js | 2 +- .../declarationsCascadingImports/node/m4.js | 2 +- .../declarationsGlobalImport/amd/glo_m4.js | 2 +- .../declarationsGlobalImport/amd/useModule.js | 2 +- .../declarationsGlobalImport/node/glo_m4.js | 2 +- .../node/useModule.js | 2 +- .../amd/private_m4.js | 2 +- .../amd/useModule.js | 2 +- .../node/private_m4.js | 2 +- .../node/useModule.js | 2 +- .../amd/fncOnly_m4.js | 2 +- .../amd/useModule.js | 2 +- .../node/fncOnly_m4.js | 2 +- .../node/useModule.js | 2 +- .../amd/m4.js | 2 +- .../amd/m5.js | 2 +- .../amd/useModule.js | 2 +- .../node/m4.js | 2 +- .../node/m5.js | 2 +- .../node/useModule.js | 2 +- .../declarationsMultipleTimesImport/amd/m4.js | 2 +- .../amd/useModule.js | 2 +- .../node/m4.js | 2 +- .../node/useModule.js | 2 +- .../amd/m4.js | 2 +- .../amd/m5.js | 2 +- .../amd/useModule.js | 2 +- .../node/m4.js | 2 +- .../node/m5.js | 2 +- .../node/useModule.js | 2 +- .../declarationsSimpleImport/amd/m4.js | 2 +- .../declarationsSimpleImport/amd/useModule.js | 2 +- .../declarationsSimpleImport/node/m4.js | 2 +- .../node/useModule.js | 2 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../amd/m1.js | 2 +- .../amd/test.js | 2 +- .../node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../amd/m1.js | 2 +- .../amd/test.js | 2 +- .../node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../maprootUrlModuleSimpleNoOutdir/amd/m1.js | 2 +- .../amd/test.js | 2 +- .../maprootUrlModuleSimpleNoOutdir/node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../amd/m1.js | 2 +- .../amd/test.js | 2 +- .../node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/importHigher/root.js | 2 +- .../node/importHigher/root.js | 2 +- .../amd/maxDepthExceeded/built/root.js | 2 +- .../node/maxDepthExceeded/built/root.js | 2 +- .../amd/maxDepthIncreased/root.js | 2 +- .../node/maxDepthIncreased/root.js | 2 +- .../project/nonRelative/amd/consume.js | 2 +- .../reference/project/nonRelative/amd/decl.js | 2 +- .../project/nonRelative/amd/lib/bar/a.js | 2 +- .../project/nonRelative/amd/lib/foo/a.js | 2 +- .../project/nonRelative/amd/lib/foo/b.js | 2 +- .../project/nonRelative/node/consume.js | 2 +- .../project/nonRelative/node/decl.js | 2 +- .../project/nonRelative/node/lib/bar/a.js | 2 +- .../project/nonRelative/node/lib/foo/a.js | 2 +- .../project/nonRelative/node/lib/foo/b.js | 2 +- .../outMixedSubfolderNoOutdir/amd/ref/m2.js | 2 +- .../outMixedSubfolderNoOutdir/node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile0.js | 2 +- .../amd/ref/m1.js | 2 +- .../outModuleMultifolderNoOutdir/amd/test.js | 2 +- .../node/diskFile0.js | 2 +- .../node/ref/m1.js | 2 +- .../outModuleMultifolderNoOutdir/node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../project/outModuleSimpleNoOutdir/amd/m1.js | 2 +- .../outModuleSimpleNoOutdir/amd/test.js | 2 +- .../outModuleSimpleNoOutdir/node/m1.js | 2 +- .../outModuleSimpleNoOutdir/node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../outModuleSubfolderNoOutdir/amd/ref/m1.js | 2 +- .../outModuleSubfolderNoOutdir/amd/test.js | 2 +- .../outModuleSubfolderNoOutdir/node/ref/m1.js | 2 +- .../outModuleSubfolderNoOutdir/node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../amd/m1.js | 2 +- .../amd/test.js | 2 +- .../node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../amd/m1.js | 2 +- .../amd/test.js | 2 +- .../node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../sourcemapModuleSimpleNoOutdir/amd/m1.js | 2 +- .../sourcemapModuleSimpleNoOutdir/amd/test.js | 2 +- .../sourcemapModuleSimpleNoOutdir/node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m2.js | 2 +- .../node/ref/m2.js | 2 +- .../amd/outdir/simple/ref/m2.js | 2 +- .../node/outdir/simple/ref/m2.js | 2 +- .../amd/bin/test.js | 2 +- .../amd/bin/outAndOutDirFile.js | 2 +- .../amd/diskFile1.js | 2 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/diskFile1.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../outputdir_module_multifolder/ref/m1.js | 2 +- .../outputdir_module_multifolder/test.js | 2 +- .../outputdir_module_multifolder_ref/m2.js | 2 +- .../amd/bin/test.js | 6 +- .../amd/m1.js | 2 +- .../amd/test.js | 2 +- .../node/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/ref/m1.js | 2 +- .../amd/test.js | 2 +- .../node/ref/m1.js | 2 +- .../node/test.js | 2 +- .../amd/outdir/simple/ref/m1.js | 2 +- .../amd/outdir/simple/test.js | 2 +- .../node/outdir/simple/ref/m1.js | 2 +- .../node/outdir/simple/test.js | 2 +- .../amd/bin/test.js | 4 +- .../amd/commands.js | 2 +- .../amd/fs.js | 2 +- .../amd/server.js | 2 +- .../node/commands.js | 2 +- .../node/fs.js | 2 +- .../node/server.js | 2 +- tests/baselines/reference/promiseIdentity.js | 2 +- tests/baselines/reference/promiseIdentity2.js | 2 +- .../reference/promiseIdentityWithAny.js | 2 +- .../reference/promiseIdentityWithAny2.js | 2 +- .../promiseIdentityWithConstraints.js | 2 +- .../propertyAccessNumericLiterals.errors.txt | 12 + ...propertyAndAccessorWithSameName.errors.txt | 14 +- .../propertyIdentityWithPrivacyMismatch.js | 2 +- .../protoAsIndexInIndexExpression.js | 2 +- .../prototypeOnConstructorFunctions.js | 2 +- .../reference/quotedAccessorName1.errors.txt | 9 - .../reference/quotedAccessorName1.symbols | 6 + .../reference/quotedAccessorName1.types | 7 + .../reference/quotedAccessorName2.errors.txt | 9 - .../reference/quotedAccessorName2.symbols | 6 + .../reference/quotedAccessorName2.types | 7 + .../reference/reExportGlobalDeclaration1.js | 2 +- .../reference/reExportGlobalDeclaration2.js | 2 +- .../reference/reExportGlobalDeclaration3.js | 2 +- .../reference/reExportGlobalDeclaration4.js | 2 +- .../baselines/reference/reExportUndefined1.js | 2 +- .../baselines/reference/reExportUndefined2.js | 4 +- .../reactNamespaceImportPresevation.js | 2 +- ...siveExportAssignmentAndFindAliasedType1.js | 2 +- ...siveExportAssignmentAndFindAliasedType2.js | 2 +- ...siveExportAssignmentAndFindAliasedType3.js | 2 +- ...siveExportAssignmentAndFindAliasedType4.js | 2 +- ...siveExportAssignmentAndFindAliasedType5.js | 2 +- ...siveExportAssignmentAndFindAliasedType6.js | 2 +- ...siveExportAssignmentAndFindAliasedType7.js | 2 +- .../recursiveGetterAccess.errors.txt | 11 - .../reference/recursiveGetterAccess.symbols | 12 + .../reference/recursiveGetterAccess.types | 12 + .../recursiveInferenceBug.errors.txt | 17 - .../reference/recursiveInferenceBug.symbols | 26 + .../reference/recursiveInferenceBug.types | 30 ++ tests/baselines/reference/recursiveMods.js | 2 +- ...rsiveSpecializationOfSignatures.errors.txt | 12 - ...ecursiveSpecializationOfSignatures.symbols | 18 + .../recursiveSpecializationOfSignatures.types | 18 + .../reference/recursiveTypeRelations.js | 2 +- .../reference/reexportClassDefinition.js | 2 +- .../relativeNamesInClassicResolution.js | 4 +- .../reference/relativePathMustResolve.js | 2 +- .../relativePathToDeclarationFile.js | 2 +- .../requireAsFunctionInExternalModule.js | 10 +- .../reference/requireEmitSemicolon.js | 4 +- .../reference/requireOfAnEmptyFile1.js | 2 +- tests/baselines/reference/reservedWords.js | 18 +- tests/baselines/reference/reservedWords2.js | 6 +- .../reference/returnValueInSetter.errors.txt | 5 +- .../reference/reuseInnerModuleMember.js | 4 +- tests/baselines/reference/scannerClass2.js | 2 +- .../scannerES3NumericLiteral2.errors.txt | 7 + tests/baselines/reference/scannerEnum1.js | 2 +- tests/baselines/reference/scopedPackages.js | 2 +- .../reference/scopedPackagesClassic.js | 2 +- .../reference/setterBeforeGetter.errors.txt | 21 - .../reference/setterBeforeGetter.symbols | 31 ++ .../reference/setterBeforeGetter.types | 32 ++ .../reference/setterWithReturn.errors.txt | 5 +- .../reference/shebangBeforeReferences.js | 2 +- .../reference/sourceMapValidationImport.js | 2 +- .../sourceMapValidationImport.sourcemap.txt | 2 +- .../reference/staticGetter1.errors.txt | 13 - .../baselines/reference/staticGetter1.symbols | 13 + tests/baselines/reference/staticGetter1.types | 13 + .../staticGetterAndSetter.errors.txt | 14 - .../reference/staticGetterAndSetter.symbols | 12 + .../reference/staticGetterAndSetter.types | 13 + .../reference/staticInstanceResolution3.js | 4 +- .../reference/staticInstanceResolution5.js | 4 +- ...dWithTypeParameterExtendsClauseDeclFile.js | 2 +- .../staticPropertyNotInClassType.errors.txt | 14 +- .../reference/staticVisibility.errors.txt | 8 +- ...odeReservedWordInImportEqualDeclaration.js | 2 +- ...rConstrainsPropertyDeclarations.errors.txt | 17 +- tests/baselines/reference/super1.js | 2 +- .../superCallInNonStaticMethod.errors.txt | 59 --- .../superCallInNonStaticMethod.symbols | 104 ++++ .../superCallInNonStaticMethod.types | 121 +++++ .../superCallInStaticMethod.errors.txt | 55 -- .../reference/superCallInStaticMethod.symbols | 96 ++++ .../reference/superCallInStaticMethod.types | 110 ++++ .../reference/superPropertyAccess.errors.txt | 8 +- .../reference/superPropertyAccess1.errors.txt | 8 +- .../reference/superPropertyAccess2.errors.txt | 8 +- ...ect-literal-getters-and-setters.errors.txt | 11 +- tests/baselines/reference/systemModule10.js | 4 +- tests/baselines/reference/systemModule15.js | 2 +- tests/baselines/reference/systemModule9.js | 4 +- .../reference/thisInAccessors.errors.txt | 51 -- .../reference/thisInAccessors.symbols | 61 +++ .../baselines/reference/thisInAccessors.types | 68 +++ .../reference/thisInStatics.errors.txt | 16 - .../baselines/reference/thisInStatics.symbols | 23 + tests/baselines/reference/thisInStatics.types | 23 + ...ect-literal-getters-and-setters.errors.txt | 25 - ...object-literal-getters-and-setters.symbols | 32 ++ ...e-object-literal-getters-and-setters.types | 46 ++ .../reference/topLevelAmbientModule.js | 2 +- tests/baselines/reference/topLevelExports.js | 2 +- .../baselines/reference/topLevelFileModule.js | 4 +- .../reference/topLevelFileModuleMissing.js | 2 +- tests/baselines/reference/topLevelLambda4.js | 2 +- .../topLevelModuleDeclarationAndFile.js | 2 +- ... diagnostics for missing module imports.js | 2 +- .../transpile/Rename dependencies - AMD.js | 2 +- .../transpile/Rename dependencies - UMD.js | 2 +- .../reference/tsxAttributeResolution10.js | 2 +- .../reference/tsxAttributeResolution15.js | 2 +- .../reference/tsxAttributeResolution16.js | 2 +- .../reference/tsxAttributeResolution9.js | 2 +- .../tsxCorrectlyParseLessThanComparison1.js | 2 +- .../tsxDefaultAttributesResolution1.js | 2 +- .../tsxDefaultAttributesResolution2.js | 2 +- .../tsxDefaultAttributesResolution3.js | 2 +- .../baselines/reference/tsxDefaultImports.js | 8 +- .../baselines/reference/tsxDynamicTagName5.js | 2 +- .../baselines/reference/tsxDynamicTagName7.js | 2 +- .../baselines/reference/tsxDynamicTagName8.js | 2 +- .../baselines/reference/tsxDynamicTagName9.js | 2 +- .../reference/tsxElementResolution17.js | 2 +- .../reference/tsxElementResolution19.js | 4 +- .../reference/tsxExternalModuleEmit1.js | 4 +- .../reference/tsxExternalModuleEmit2.js | 6 +- tests/baselines/reference/tsxPreserveEmit3.js | 2 +- tests/baselines/reference/tsxReactEmit5.js | 2 +- .../reference/tsxReactEmitNesting.js | 24 +- tests/baselines/reference/tsxSfcReturnNull.js | 2 +- .../tsxSfcReturnNullStrictNullChecks.js | 2 +- .../tsxSfcReturnUndefinedStrictNullChecks.js | 2 +- .../tsxSpreadAttributesResolution1.js | 2 +- .../tsxSpreadAttributesResolution10.js | 2 +- .../tsxSpreadAttributesResolution11.js | 2 +- .../tsxSpreadAttributesResolution12.js | 2 +- .../tsxSpreadAttributesResolution2.js | 2 +- .../tsxSpreadAttributesResolution3.js | 2 +- .../tsxSpreadAttributesResolution4.js | 2 +- .../tsxSpreadAttributesResolution5.js | 2 +- .../tsxSpreadAttributesResolution6.js | 2 +- .../tsxSpreadAttributesResolution7.js | 2 +- .../tsxSpreadAttributesResolution8.js | 2 +- .../tsxSpreadAttributesResolution9.js | 2 +- .../tsxStatelessFunctionComponentOverload1.js | 2 +- .../tsxStatelessFunctionComponentOverload2.js | 2 +- .../tsxStatelessFunctionComponentOverload4.js | 2 +- .../tsxStatelessFunctionComponentOverload5.js | 2 +- .../tsxStatelessFunctionComponentOverload6.js | 2 +- .../tsxStatelessFunctionComponents2.js | 2 +- .../tsxStatelessFunctionComponents3.js | 2 +- ...essFunctionComponentsWithTypeArguments1.js | 2 +- ...essFunctionComponentsWithTypeArguments2.js | 2 +- ...essFunctionComponentsWithTypeArguments3.js | 2 +- ...essFunctionComponentsWithTypeArguments4.js | 2 +- ...essFunctionComponentsWithTypeArguments5.js | 2 +- .../reference/tsxUnionElementType1.js | 2 +- .../reference/tsxUnionElementType2.js | 2 +- .../reference/tsxUnionElementType3.js | 2 +- .../reference/tsxUnionElementType4.js | 2 +- .../reference/tsxUnionElementType5.js | 2 +- .../reference/tsxUnionElementType6.js | 2 +- .../reference/tsxUnionTypeComponent1.js | 2 +- .../reference/tsxUnionTypeComponent2.js | 2 +- .../twoAccessorsWithSameName2.errors.txt | 20 +- ...pressionWithUndefinedCallResolutionData.js | 4 +- .../reference/typeGuardsAsAssertions.js | 2 +- .../reference/typeGuardsInExternalModule.js | 2 +- .../reference/typeInferenceLiteralUnion.js | 2 +- .../baselines/reference/typeOfThis.errors.txt | 26 +- .../reference/typeOfThisInAccessor.errors.txt | 49 -- .../reference/typeOfThisInAccessor.symbols | 66 +++ .../reference/typeOfThisInAccessor.types | 73 +++ .../typeOfThisInInstanceMember.errors.txt | 5 +- .../typeOfThisInInstanceMember2.errors.txt | 41 -- .../typeOfThisInInstanceMember2.symbols | 129 +++++ .../typeOfThisInInstanceMember2.types | 134 +++++ .../reference/typeOfThisInStatics.errors.txt | 16 - .../reference/typeOfThisInStatics.symbols | 22 + .../reference/typeOfThisInStatics.types | 23 + ...rameterCompatibilityAccrossDeclarations.js | 2 +- ...typeParametersInStaticAccessors.errors.txt | 8 +- .../reference/typePredicateInLoop.js | 2 +- .../reference/typeQueryOnClass.errors.txt | 77 --- .../reference/typeQueryOnClass.symbols | 123 +++++ .../reference/typeQueryOnClass.types | 133 +++++ .../reference/typeQueryWithReservedWords.js | 4 +- .../reference/typeReferenceDirectives10.js | 2 +- .../reference/typeReferenceDirectives13.js | 2 +- .../reference/typeReferenceDirectives5.js | 2 +- .../reference/typeReferenceDirectives7.js | 2 +- .../reference/typeReferenceDirectives8.js | 4 +- .../reference/typeReferenceDirectives9.js | 6 +- tests/baselines/reference/typeResolution.js | 2 +- .../reference/typeResolution.sourcemap.txt | 2 +- ...RootsFromMultipleNodeModulesDirectories.js | 2 +- ...peRootsFromNodeModulesInParentDirectory.js | 2 +- .../reference/typeUsedAsValueError2.js | 6 +- .../reference/typeofANonExportedType.js | 2 +- .../reference/typeofAmbientExternalModules.js | 4 +- .../reference/typeofAnExportedType.js | 2 +- .../reference/typeofExternalModules.js | 4 +- ...typesOnlyExternalModuleStillHasInstance.js | 4 +- tests/baselines/reference/typingsLookup4.js | 6 +- tests/baselines/reference/typingsLookupAmd.js | 2 +- .../baselines/reference/umd-augmentation-1.js | 2 +- .../baselines/reference/umd-augmentation-3.js | 2 +- tests/baselines/reference/umd-errors.js | 2 +- tests/baselines/reference/umd3.js | 2 +- tests/baselines/reference/umd4.js | 2 +- tests/baselines/reference/umd5.js | 2 +- tests/baselines/reference/umd8.js | 2 +- .../reference/umdDependencyComment2.js | 2 +- .../reference/umdDependencyCommentName1.js | 2 +- .../reference/umdDependencyCommentName2.js | 2 +- .../baselines/reference/umdGlobalConflict.js | 2 +- .../reference/unclosedExportClause01.js | 10 +- .../reference/unclosedExportClause02.js | 10 +- .../reference/undeclaredModuleError.js | 2 +- .../reference/untypedModuleImport.js | 8 +- .../reference/untypedModuleImport_allowJs.js | 4 +- .../untypedModuleImport_noImplicitAny.js | 2 +- .../untypedModuleImport_noLocalImports.js | 2 +- .../untypedModuleImport_vsAmbient.js | 2 +- .../untypedModuleImport_withAugmentation.js | 2 +- .../untypedModuleImport_withAugmentation2.js | 2 +- .../reference/unusedImportDeclaration.js | 2 +- tests/baselines/reference/unusedImports1.js | 4 +- tests/baselines/reference/unusedImports11.js | 8 +- tests/baselines/reference/unusedImports12.js | 6 +- tests/baselines/reference/unusedImports13.js | 2 +- tests/baselines/reference/unusedImports14.js | 2 +- tests/baselines/reference/unusedImports15.js | 2 +- tests/baselines/reference/unusedImports16.js | 2 +- tests/baselines/reference/unusedImports2.js | 4 +- tests/baselines/reference/unusedImports3.js | 4 +- tests/baselines/reference/unusedImports4.js | 4 +- tests/baselines/reference/unusedImports5.js | 4 +- tests/baselines/reference/unusedImports6.js | 6 +- tests/baselines/reference/unusedImports7.js | 6 +- tests/baselines/reference/unusedImports8.js | 4 +- tests/baselines/reference/unusedImports9.js | 4 +- .../reference/unusedLocalsAndObjectSpread2.js | 2 +- .../unusedLocalsAndParameters.errors.txt | 11 +- .../reference/unusedLocalsAndParameters.js | 2 +- ...usedLocalsAndParametersDeferred.errors.txt | 171 ------ .../unusedLocalsAndParametersDeferred.js | 2 +- .../unusedLocalsAndParametersDeferred.symbols | 319 +++++++++++ .../unusedLocalsAndParametersDeferred.types | 385 ++++++++++++++ ...edLocalsAndParametersOverloadSignatures.js | 2 +- .../unusedLocalsAndParametersTypeAliases.js | 2 +- .../unusedLocalsAndParametersTypeAliases2.js | 2 +- .../reference/unusedVariablesinModules1.js | 2 +- .../reference/varArgsOnConstructorTypes.js | 2 +- .../visibilityOfCrossModuleTypeUsage.js | 6 +- .../reference/visibilityOfTypeParameters.js | 2 +- .../reference/voidAsNonAmbiguousReturnType.js | 4 +- tests/baselines/reference/withExportDecl.js | 2 +- tests/baselines/reference/withImportDecl.js | 4 +- 1438 files changed, 9533 insertions(+), 4804 deletions(-) delete mode 100644 tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt create mode 100644 tests/baselines/reference/ES3For-ofTypeCheck1.symbols create mode 100644 tests/baselines/reference/ES3For-ofTypeCheck1.types delete mode 100644 tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt create mode 100644 tests/baselines/reference/ES3For-ofTypeCheck4.symbols create mode 100644 tests/baselines/reference/ES3For-ofTypeCheck4.types delete mode 100644 tests/baselines/reference/accessorWithES3.errors.txt create mode 100644 tests/baselines/reference/accessorWithES3.symbols create mode 100644 tests/baselines/reference/accessorWithES3.types delete mode 100644 tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt create mode 100644 tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols create mode 100644 tests/baselines/reference/accessorsAreNotContextuallyTyped.types delete mode 100644 tests/baselines/reference/accessorsEmit.errors.txt create mode 100644 tests/baselines/reference/accessorsEmit.symbols create mode 100644 tests/baselines/reference/accessorsEmit.types delete mode 100644 tests/baselines/reference/accessorsNotAllowedInES3.errors.txt create mode 100644 tests/baselines/reference/accessorsNotAllowedInES3.symbols create mode 100644 tests/baselines/reference/accessorsNotAllowedInES3.types delete mode 100644 tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt create mode 100644 tests/baselines/reference/accessors_spec_section-4.5_inference.symbols create mode 100644 tests/baselines/reference/accessors_spec_section-4.5_inference.types delete mode 100644 tests/baselines/reference/assignmentCompatBug3.errors.txt create mode 100644 tests/baselines/reference/assignmentCompatBug3.symbols create mode 100644 tests/baselines/reference/assignmentCompatBug3.types delete mode 100644 tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt create mode 100644 tests/baselines/reference/classPropertyIsPublicByDefault.symbols create mode 100644 tests/baselines/reference/classPropertyIsPublicByDefault.types delete mode 100644 tests/baselines/reference/classWithStaticMembers.errors.txt create mode 100644 tests/baselines/reference/classWithStaticMembers.symbols create mode 100644 tests/baselines/reference/classWithStaticMembers.types delete mode 100644 tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt create mode 100644 tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.symbols create mode 100644 tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types delete mode 100644 tests/baselines/reference/commentOnClassAccessor1.errors.txt create mode 100644 tests/baselines/reference/commentOnClassAccessor1.symbols create mode 100644 tests/baselines/reference/commentOnClassAccessor1.types delete mode 100644 tests/baselines/reference/commentOnClassAccessor2.errors.txt create mode 100644 tests/baselines/reference/commentOnClassAccessor2.symbols create mode 100644 tests/baselines/reference/commentOnClassAccessor2.types delete mode 100644 tests/baselines/reference/contextualTypingOfAccessors.errors.txt create mode 100644 tests/baselines/reference/contextualTypingOfAccessors.symbols create mode 100644 tests/baselines/reference/contextualTypingOfAccessors.types delete mode 100644 tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt create mode 100644 tests/baselines/reference/derivedClassIncludesInheritedMembers.symbols create mode 100644 tests/baselines/reference/derivedClassIncludesInheritedMembers.types delete mode 100644 tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt create mode 100644 tests/baselines/reference/derivedClassOverridesPublicMembers.symbols create mode 100644 tests/baselines/reference/derivedClassOverridesPublicMembers.types delete mode 100644 tests/baselines/reference/exportingContainingVisibleType.errors.txt create mode 100644 tests/baselines/reference/exportingContainingVisibleType.symbols create mode 100644 tests/baselines/reference/exportingContainingVisibleType.types delete mode 100644 tests/baselines/reference/getAndSetAsMemberNames.errors.txt create mode 100644 tests/baselines/reference/getAndSetAsMemberNames.symbols create mode 100644 tests/baselines/reference/getAndSetAsMemberNames.types delete mode 100644 tests/baselines/reference/getsetReturnTypes.errors.txt create mode 100644 tests/baselines/reference/getsetReturnTypes.symbols create mode 100644 tests/baselines/reference/getsetReturnTypes.types delete mode 100644 tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt create mode 100644 tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.symbols create mode 100644 tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.types delete mode 100644 tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt create mode 100644 tests/baselines/reference/gettersAndSettersTypesAgree.symbols create mode 100644 tests/baselines/reference/gettersAndSettersTypesAgree.types delete mode 100644 tests/baselines/reference/infinitelyExpandingOverloads.errors.txt create mode 100644 tests/baselines/reference/infinitelyExpandingOverloads.symbols create mode 100644 tests/baselines/reference/infinitelyExpandingOverloads.types delete mode 100644 tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt create mode 100644 tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.symbols create mode 100644 tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.types delete mode 100644 tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt create mode 100644 tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.symbols create mode 100644 tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.types delete mode 100644 tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt create mode 100644 tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.symbols create mode 100644 tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types delete mode 100644 tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt create mode 100644 tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.symbols create mode 100644 tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.types delete mode 100644 tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt create mode 100644 tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.symbols create mode 100644 tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.types delete mode 100644 tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt create mode 100644 tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.symbols create mode 100644 tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.types delete mode 100644 tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt create mode 100644 tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.symbols create mode 100644 tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.types delete mode 100644 tests/baselines/reference/interfaceExtendingClass.errors.txt create mode 100644 tests/baselines/reference/interfaceExtendingClass.symbols create mode 100644 tests/baselines/reference/interfaceExtendingClass.types delete mode 100644 tests/baselines/reference/interfaceImplementation5.errors.txt create mode 100644 tests/baselines/reference/interfaceImplementation5.symbols create mode 100644 tests/baselines/reference/interfaceImplementation5.types create mode 100644 tests/baselines/reference/isLiteral1.errors.txt create mode 100644 tests/baselines/reference/isLiteral2.errors.txt delete mode 100644 tests/baselines/reference/newWithSpread.errors.txt create mode 100644 tests/baselines/reference/newWithSpread.symbols create mode 100644 tests/baselines/reference/newWithSpread.types delete mode 100644 tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt create mode 100644 tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.symbols create mode 100644 tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.types delete mode 100644 tests/baselines/reference/objectLitPropertyScoping.errors.txt create mode 100644 tests/baselines/reference/objectLitPropertyScoping.symbols create mode 100644 tests/baselines/reference/objectLitPropertyScoping.types delete mode 100644 tests/baselines/reference/objectLiteralErrorsES3.errors.txt create mode 100644 tests/baselines/reference/objectLiteralErrorsES3.symbols create mode 100644 tests/baselines/reference/objectLiteralErrorsES3.types delete mode 100644 tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt create mode 100644 tests/baselines/reference/objectLiteralGettersAndSetters.symbols create mode 100644 tests/baselines/reference/objectLiteralGettersAndSetters.types delete mode 100644 tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt create mode 100644 tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.symbols create mode 100644 tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.types create mode 100644 tests/baselines/reference/objectTypeWithStringNamedNumericProperty.errors.txt delete mode 100644 tests/baselines/reference/parserES3Accessors2.errors.txt create mode 100644 tests/baselines/reference/parserES3Accessors2.symbols create mode 100644 tests/baselines/reference/parserES3Accessors2.types delete mode 100644 tests/baselines/reference/parserES3Accessors4.errors.txt create mode 100644 tests/baselines/reference/parserES3Accessors4.symbols create mode 100644 tests/baselines/reference/parserES3Accessors4.types delete mode 100644 tests/baselines/reference/parserReturnStatement4.errors.txt create mode 100644 tests/baselines/reference/parserReturnStatement4.symbols create mode 100644 tests/baselines/reference/parserReturnStatement4.types delete mode 100644 tests/baselines/reference/privateClassPropertyAccessibleWithinClass.errors.txt create mode 100644 tests/baselines/reference/privateClassPropertyAccessibleWithinClass.symbols create mode 100644 tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types create mode 100644 tests/baselines/reference/propertyAccessNumericLiterals.errors.txt delete mode 100644 tests/baselines/reference/quotedAccessorName1.errors.txt create mode 100644 tests/baselines/reference/quotedAccessorName1.symbols create mode 100644 tests/baselines/reference/quotedAccessorName1.types delete mode 100644 tests/baselines/reference/quotedAccessorName2.errors.txt create mode 100644 tests/baselines/reference/quotedAccessorName2.symbols create mode 100644 tests/baselines/reference/quotedAccessorName2.types delete mode 100644 tests/baselines/reference/recursiveGetterAccess.errors.txt create mode 100644 tests/baselines/reference/recursiveGetterAccess.symbols create mode 100644 tests/baselines/reference/recursiveGetterAccess.types delete mode 100644 tests/baselines/reference/recursiveInferenceBug.errors.txt create mode 100644 tests/baselines/reference/recursiveInferenceBug.symbols create mode 100644 tests/baselines/reference/recursiveInferenceBug.types delete mode 100644 tests/baselines/reference/recursiveSpecializationOfSignatures.errors.txt create mode 100644 tests/baselines/reference/recursiveSpecializationOfSignatures.symbols create mode 100644 tests/baselines/reference/recursiveSpecializationOfSignatures.types create mode 100644 tests/baselines/reference/scannerES3NumericLiteral2.errors.txt delete mode 100644 tests/baselines/reference/setterBeforeGetter.errors.txt create mode 100644 tests/baselines/reference/setterBeforeGetter.symbols create mode 100644 tests/baselines/reference/setterBeforeGetter.types delete mode 100644 tests/baselines/reference/staticGetter1.errors.txt create mode 100644 tests/baselines/reference/staticGetter1.symbols create mode 100644 tests/baselines/reference/staticGetter1.types delete mode 100644 tests/baselines/reference/staticGetterAndSetter.errors.txt create mode 100644 tests/baselines/reference/staticGetterAndSetter.symbols create mode 100644 tests/baselines/reference/staticGetterAndSetter.types delete mode 100644 tests/baselines/reference/superCallInNonStaticMethod.errors.txt create mode 100644 tests/baselines/reference/superCallInNonStaticMethod.symbols create mode 100644 tests/baselines/reference/superCallInNonStaticMethod.types delete mode 100644 tests/baselines/reference/superCallInStaticMethod.errors.txt create mode 100644 tests/baselines/reference/superCallInStaticMethod.symbols create mode 100644 tests/baselines/reference/superCallInStaticMethod.types delete mode 100644 tests/baselines/reference/thisInAccessors.errors.txt create mode 100644 tests/baselines/reference/thisInAccessors.symbols create mode 100644 tests/baselines/reference/thisInAccessors.types delete mode 100644 tests/baselines/reference/thisInStatics.errors.txt create mode 100644 tests/baselines/reference/thisInStatics.symbols create mode 100644 tests/baselines/reference/thisInStatics.types delete mode 100644 tests/baselines/reference/this_inside-object-literal-getters-and-setters.errors.txt create mode 100644 tests/baselines/reference/this_inside-object-literal-getters-and-setters.symbols create mode 100644 tests/baselines/reference/this_inside-object-literal-getters-and-setters.types delete mode 100644 tests/baselines/reference/typeOfThisInAccessor.errors.txt create mode 100644 tests/baselines/reference/typeOfThisInAccessor.symbols create mode 100644 tests/baselines/reference/typeOfThisInAccessor.types delete mode 100644 tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt create mode 100644 tests/baselines/reference/typeOfThisInInstanceMember2.symbols create mode 100644 tests/baselines/reference/typeOfThisInInstanceMember2.types delete mode 100644 tests/baselines/reference/typeOfThisInStatics.errors.txt create mode 100644 tests/baselines/reference/typeOfThisInStatics.symbols create mode 100644 tests/baselines/reference/typeOfThisInStatics.types delete mode 100644 tests/baselines/reference/typeQueryOnClass.errors.txt create mode 100644 tests/baselines/reference/typeQueryOnClass.symbols create mode 100644 tests/baselines/reference/typeQueryOnClass.types delete mode 100644 tests/baselines/reference/unusedLocalsAndParametersDeferred.errors.txt create mode 100644 tests/baselines/reference/unusedLocalsAndParametersDeferred.symbols create mode 100644 tests/baselines/reference/unusedLocalsAndParametersDeferred.types diff --git a/src/compiler/core.ts b/src/compiler/core.ts index c2a646b105365..ab5a9c9f68413 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1477,7 +1477,7 @@ namespace ts { } export function getEmitScriptTarget(compilerOptions: CompilerOptions) { - return compilerOptions.target || ScriptTarget.ES3; + return compilerOptions.target || ScriptTarget.ES5; } export function getEmitModuleKind(compilerOptions: CompilerOptions) { diff --git a/src/harness/unittests/compileOnSave.ts b/src/harness/unittests/compileOnSave.ts index eaab86b4ebc45..22319addebf1f 100644 --- a/src/harness/unittests/compileOnSave.ts +++ b/src/harness/unittests/compileOnSave.ts @@ -558,13 +558,13 @@ namespace ts.projectSystem { const expectedEmittedFileName = "/a/b/f1.js"; assert.isTrue(host.fileExists(expectedEmittedFileName)); - assert.equal(host.readFile(expectedEmittedFileName), `"use strict";\r\nexports.__esModule = true;\r\nfunction Foo() { return 10; }\r\nexports.Foo = Foo;\r\n`); + assert.equal(host.readFile(expectedEmittedFileName), `"use strict";\r\nObject.defineProperty(exports, "__esModule", { value: true });\r\nfunction Foo() { return 10; }\r\nexports.Foo = Foo;\r\n`); }); - it("shoud not emit js files in external projects", () => { + it("should not emit js files in external projects", () => { const file1 = { path: "/a/b/file1.ts", - content: "consonle.log('file1');" + content: "console.log('file1');" }; // file2 has errors. The emitting should not be blocked. const file2 = { @@ -601,4 +601,4 @@ namespace ts.projectSystem { assert.isTrue(outFileContent.indexOf(file3.content) === -1); }); }); -} \ No newline at end of file +} diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index c2617b2a6c6a3..30cf910a9ad70 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -40,7 +40,7 @@ compile(process.argv.slice(2), { at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler * Please log a "breaking change" issue for any API breaking change affecting this issue */ -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ts = require("typescript"); function compile(fileNames, options) { var program = ts.createProgram(fileNames, options); diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 51b208c39c902..79c4f5efcd6d1 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -70,7 +70,7 @@ fileNames.forEach(fileName => { at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter * Please log a "breaking change" issue for any API breaking change affecting this issue */ -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ts = require("typescript"); function delint(sourceFile) { delintNode(sourceFile); diff --git a/tests/baselines/reference/APISample_parseConfig.js b/tests/baselines/reference/APISample_parseConfig.js index 690efb359c641..609d65d57dde0 100644 --- a/tests/baselines/reference/APISample_parseConfig.js +++ b/tests/baselines/reference/APISample_parseConfig.js @@ -42,7 +42,7 @@ export function createProgram(rootFiles: string[], compilerOptionsJson: string): at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler * Please log a "breaking change" issue for any API breaking change affecting this issue */ -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ts = require("typescript"); function printError(error) { if (!error) { diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 47f63f56e704b..7b74cd3af8eed 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -22,7 +22,7 @@ console.log(JSON.stringify(result)); at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function * Please log a "breaking change" issue for any API breaking change affecting this issue */ -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ts = require("typescript"); var source = "let x: string = 'string'"; var result = ts.transpile(source, { module: ts.ModuleKind.CommonJS }); diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index f06f9ced73fde..5dc1308501536 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -115,7 +115,7 @@ watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS }); at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services * Please log a "breaking change" issue for any API breaking change affecting this issue */ -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ts = require("typescript"); function watch(rootFileNames, options) { var files = {}; diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt deleted file mode 100644 index 6437cfbc73d47..0000000000000 --- a/tests/baselines/reference/ES3For-ofTypeCheck1.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts(1,15): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. - - -==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts (1 errors) ==== - for (var v of "") { } - ~~ -!!! error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.symbols b/tests/baselines/reference/ES3For-ofTypeCheck1.symbols new file mode 100644 index 0000000000000..c7d17a31763cb --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.symbols @@ -0,0 +1,4 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts === +for (var v of "") { } +>v : Symbol(v, Decl(ES3For-ofTypeCheck1.ts, 0, 8)) + diff --git a/tests/baselines/reference/ES3For-ofTypeCheck1.types b/tests/baselines/reference/ES3For-ofTypeCheck1.types new file mode 100644 index 0000000000000..3b5af3905ccb5 --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck1.types @@ -0,0 +1,5 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck1.ts === +for (var v of "") { } +>v : string +>"" : "" + diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt b/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt deleted file mode 100644 index 80e60008da4cc..0000000000000 --- a/tests/baselines/reference/ES3For-ofTypeCheck4.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts(2,17): error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. - - -==== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts (1 errors) ==== - var union: string | string[]; - for (const v of union) { } - ~~~~~ -!!! error TS2494: Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.symbols b/tests/baselines/reference/ES3For-ofTypeCheck4.symbols new file mode 100644 index 0000000000000..31c862025b923 --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.symbols @@ -0,0 +1,8 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts === +var union: string | string[]; +>union : Symbol(union, Decl(ES3For-ofTypeCheck4.ts, 0, 3)) + +for (const v of union) { } +>v : Symbol(v, Decl(ES3For-ofTypeCheck4.ts, 1, 10)) +>union : Symbol(union, Decl(ES3For-ofTypeCheck4.ts, 0, 3)) + diff --git a/tests/baselines/reference/ES3For-ofTypeCheck4.types b/tests/baselines/reference/ES3For-ofTypeCheck4.types new file mode 100644 index 0000000000000..bec14ff259f2c --- /dev/null +++ b/tests/baselines/reference/ES3For-ofTypeCheck4.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/statements/for-ofStatements/ES3For-ofTypeCheck4.ts === +var union: string | string[]; +>union : string | string[] + +for (const v of union) { } +>v : string +>union : string | string[] + diff --git a/tests/baselines/reference/ES5For-of33.js b/tests/baselines/reference/ES5For-of33.js index 729c37b8120d8..005fa89e97bbf 100644 --- a/tests/baselines/reference/ES5For-of33.js +++ b/tests/baselines/reference/ES5For-of33.js @@ -23,7 +23,7 @@ try { catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_b && !_b.done && (_c = _a["return"])) _c.call(_a); + if (_b && !_b.done && (_c = _a.return)) _c.call(_a); } finally { if (e_1) throw e_1.error; } } diff --git a/tests/baselines/reference/ES5For-of33.sourcemap.txt b/tests/baselines/reference/ES5For-of33.sourcemap.txt index 12dd243cf0ec9..25778906d4d1a 100644 --- a/tests/baselines/reference/ES5For-of33.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of33.sourcemap.txt @@ -120,7 +120,7 @@ sourceFile:ES5For-of33.ts >>>catch (e_1_1) { e_1 = { error: e_1_1 }; } >>>finally { >>> try { ->>> if (_b && !_b.done && (_c = _a["return"])) _c.call(_a); +>>> if (_b && !_b.done && (_c = _a.return)) _c.call(_a); >>> } >>> finally { if (e_1) throw e_1.error; } >>>} diff --git a/tests/baselines/reference/ES5For-of34.js b/tests/baselines/reference/ES5For-of34.js index 307a7505d09b7..adfdcf667d376 100644 --- a/tests/baselines/reference/ES5For-of34.js +++ b/tests/baselines/reference/ES5For-of34.js @@ -29,7 +29,7 @@ try { catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_b && !_b.done && (_c = _a["return"])) _c.call(_a); + if (_b && !_b.done && (_c = _a.return)) _c.call(_a); } finally { if (e_1) throw e_1.error; } } diff --git a/tests/baselines/reference/ES5For-of34.sourcemap.txt b/tests/baselines/reference/ES5For-of34.sourcemap.txt index 540d52cc58149..0a552ae5239e5 100644 --- a/tests/baselines/reference/ES5For-of34.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of34.sourcemap.txt @@ -176,7 +176,7 @@ sourceFile:ES5For-of34.ts >>>catch (e_1_1) { e_1 = { error: e_1_1 }; } >>>finally { >>> try { ->>> if (_b && !_b.done && (_c = _a["return"])) _c.call(_a); +>>> if (_b && !_b.done && (_c = _a.return)) _c.call(_a); >>> } >>> finally { if (e_1) throw e_1.error; } >>>} diff --git a/tests/baselines/reference/ES5For-of35.js b/tests/baselines/reference/ES5For-of35.js index 597296cacaedd..f4bd6c9555bd6 100644 --- a/tests/baselines/reference/ES5For-of35.js +++ b/tests/baselines/reference/ES5For-of35.js @@ -25,7 +25,7 @@ try { catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_b && !_b.done && (_f = _a["return"])) _f.call(_a); + if (_b && !_b.done && (_f = _a.return)) _f.call(_a); } finally { if (e_1) throw e_1.error; } } diff --git a/tests/baselines/reference/ES5For-of35.sourcemap.txt b/tests/baselines/reference/ES5For-of35.sourcemap.txt index 1961188da49f2..3acaf1f7ea3b1 100644 --- a/tests/baselines/reference/ES5For-of35.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of35.sourcemap.txt @@ -134,7 +134,7 @@ sourceFile:ES5For-of35.ts >>>catch (e_1_1) { e_1 = { error: e_1_1 }; } >>>finally { >>> try { ->>> if (_b && !_b.done && (_f = _a["return"])) _f.call(_a); +>>> if (_b && !_b.done && (_f = _a.return)) _f.call(_a); >>> } >>> finally { if (e_1) throw e_1.error; } >>>} diff --git a/tests/baselines/reference/ES5For-of36.js b/tests/baselines/reference/ES5For-of36.js index fca89ee922b84..584efa125cd66 100644 --- a/tests/baselines/reference/ES5For-of36.js +++ b/tests/baselines/reference/ES5For-of36.js @@ -41,7 +41,7 @@ try { catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { - if (_b && !_b.done && (_f = _a["return"])) _f.call(_a); + if (_b && !_b.done && (_f = _a.return)) _f.call(_a); } finally { if (e_1) throw e_1.error; } } diff --git a/tests/baselines/reference/ES5For-of36.sourcemap.txt b/tests/baselines/reference/ES5For-of36.sourcemap.txt index 4b16e02b3b10a..5eadf538311ee 100644 --- a/tests/baselines/reference/ES5For-of36.sourcemap.txt +++ b/tests/baselines/reference/ES5For-of36.sourcemap.txt @@ -150,7 +150,7 @@ sourceFile:ES5For-of36.ts >>>catch (e_1_1) { e_1 = { error: e_1_1 }; } >>>finally { >>> try { ->>> if (_b && !_b.done && (_f = _a["return"])) _f.call(_a); +>>> if (_b && !_b.done && (_f = _a.return)) _f.call(_a); >>> } >>> finally { if (e_1) throw e_1.error; } >>>} diff --git a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt index 6ed8a2d29cdbe..d81b9169c1c1c 100644 --- a/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt +++ b/tests/baselines/reference/MemberAccessorDeclaration15.errors.txt @@ -1,12 +1,9 @@ -tests/cases/compiler/MemberAccessorDeclaration15.ts(2,8): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/MemberAccessorDeclaration15.ts(2,12): error TS2369: A parameter property is only allowed in a constructor implementation. -==== tests/cases/compiler/MemberAccessorDeclaration15.ts (2 errors) ==== +==== tests/cases/compiler/MemberAccessorDeclaration15.ts (1 errors) ==== class C { set Foo(public a: number) { } - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~~~ !!! error TS2369: A parameter property is only allowed in a constructor implementation. } \ No newline at end of file diff --git a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js index a68614c0ed478..0c2043aa06933 100644 --- a/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js +++ b/tests/baselines/reference/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.js @@ -31,7 +31,7 @@ export module A { //// [part1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A; (function (A) { var Utils; @@ -45,7 +45,7 @@ var A; })(A = exports.A || (exports.A = {})); //// [part2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A; (function (A) { // collision with 'Origin' var in other part of merged module diff --git a/tests/baselines/reference/accessorWithES3.errors.txt b/tests/baselines/reference/accessorWithES3.errors.txt deleted file mode 100644 index 0a2219d85a463..0000000000000 --- a/tests/baselines/reference/accessorWithES3.errors.txt +++ /dev/null @@ -1,35 +0,0 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts (4 errors) ==== - // error to use accessors in ES3 mode - - class C { - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 1; - } - } - - class D { - set x(v) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - } - - var x = { - get a() { return 1 } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - var y = { - set b(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/accessorWithES3.symbols b/tests/baselines/reference/accessorWithES3.symbols new file mode 100644 index 0000000000000..5b1e0cae1b7a6 --- /dev/null +++ b/tests/baselines/reference/accessorWithES3.symbols @@ -0,0 +1,36 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts === +// error to use accessors in ES3 mode + +class C { +>C : Symbol(C, Decl(accessorWithES3.ts, 0, 0)) + + get x() { +>x : Symbol(C.x, Decl(accessorWithES3.ts, 2, 9)) + + return 1; + } +} + +class D { +>D : Symbol(D, Decl(accessorWithES3.ts, 6, 1)) + + set x(v) { +>x : Symbol(D.x, Decl(accessorWithES3.ts, 8, 9)) +>v : Symbol(v, Decl(accessorWithES3.ts, 9, 10)) + } +} + +var x = { +>x : Symbol(x, Decl(accessorWithES3.ts, 13, 3)) + + get a() { return 1 } +>a : Symbol(a, Decl(accessorWithES3.ts, 13, 9)) +} + +var y = { +>y : Symbol(y, Decl(accessorWithES3.ts, 17, 3)) + + set b(v) { } +>b : Symbol(b, Decl(accessorWithES3.ts, 17, 9)) +>v : Symbol(v, Decl(accessorWithES3.ts, 18, 10)) +} diff --git a/tests/baselines/reference/accessorWithES3.types b/tests/baselines/reference/accessorWithES3.types new file mode 100644 index 0000000000000..b3c8353b96cfa --- /dev/null +++ b/tests/baselines/reference/accessorWithES3.types @@ -0,0 +1,40 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorWithES3.ts === +// error to use accessors in ES3 mode + +class C { +>C : C + + get x() { +>x : number + + return 1; +>1 : 1 + } +} + +class D { +>D : D + + set x(v) { +>x : any +>v : any + } +} + +var x = { +>x : { readonly a: number; } +>{ get a() { return 1 }} : { readonly a: number; } + + get a() { return 1 } +>a : number +>1 : 1 +} + +var y = { +>y : { b: any; } +>{ set b(v) { }} : { b: any; } + + set b(v) { } +>b : any +>v : any +} diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt b/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt deleted file mode 100644 index 725ad30bd616c..0000000000000 --- a/tests/baselines/reference/accessorsAreNotContextuallyTyped.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts (2 errors) ==== - // accessors are not contextually typed - - class C { - set x(v: (a: string) => string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return (x: string) => ""; - } - } - - var c: C; - var r = c.x(''); // string \ No newline at end of file diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols b/tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols new file mode 100644 index 0000000000000..0589eb7f4a8cb --- /dev/null +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.symbols @@ -0,0 +1,30 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts === +// accessors are not contextually typed + +class C { +>C : Symbol(C, Decl(accessorsAreNotContextuallyTyped.ts, 0, 0)) + + set x(v: (a: string) => string) { +>x : Symbol(C.x, Decl(accessorsAreNotContextuallyTyped.ts, 2, 9), Decl(accessorsAreNotContextuallyTyped.ts, 4, 5)) +>v : Symbol(v, Decl(accessorsAreNotContextuallyTyped.ts, 3, 10)) +>a : Symbol(a, Decl(accessorsAreNotContextuallyTyped.ts, 3, 14)) + } + + get x() { +>x : Symbol(C.x, Decl(accessorsAreNotContextuallyTyped.ts, 2, 9), Decl(accessorsAreNotContextuallyTyped.ts, 4, 5)) + + return (x: string) => ""; +>x : Symbol(x, Decl(accessorsAreNotContextuallyTyped.ts, 7, 16)) + } +} + +var c: C; +>c : Symbol(c, Decl(accessorsAreNotContextuallyTyped.ts, 11, 3)) +>C : Symbol(C, Decl(accessorsAreNotContextuallyTyped.ts, 0, 0)) + +var r = c.x(''); // string +>r : Symbol(r, Decl(accessorsAreNotContextuallyTyped.ts, 12, 3)) +>c.x : Symbol(C.x, Decl(accessorsAreNotContextuallyTyped.ts, 2, 9), Decl(accessorsAreNotContextuallyTyped.ts, 4, 5)) +>c : Symbol(c, Decl(accessorsAreNotContextuallyTyped.ts, 11, 3)) +>x : Symbol(C.x, Decl(accessorsAreNotContextuallyTyped.ts, 2, 9), Decl(accessorsAreNotContextuallyTyped.ts, 4, 5)) + diff --git a/tests/baselines/reference/accessorsAreNotContextuallyTyped.types b/tests/baselines/reference/accessorsAreNotContextuallyTyped.types new file mode 100644 index 0000000000000..c48ad59372465 --- /dev/null +++ b/tests/baselines/reference/accessorsAreNotContextuallyTyped.types @@ -0,0 +1,34 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/accessorsAreNotContextuallyTyped.ts === +// accessors are not contextually typed + +class C { +>C : C + + set x(v: (a: string) => string) { +>x : (a: string) => string +>v : (a: string) => string +>a : string + } + + get x() { +>x : (a: string) => string + + return (x: string) => ""; +>(x: string) => "" : (x: string) => string +>x : string +>"" : "" + } +} + +var c: C; +>c : C +>C : C + +var r = c.x(''); // string +>r : string +>c.x('') : string +>c.x : (a: string) => string +>c : C +>x : (a: string) => string +>'' : "" + diff --git a/tests/baselines/reference/accessorsEmit.errors.txt b/tests/baselines/reference/accessorsEmit.errors.txt deleted file mode 100644 index 4d620f8cd8bc8..0000000000000 --- a/tests/baselines/reference/accessorsEmit.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -tests/cases/compiler/accessorsEmit.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessorsEmit.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/accessorsEmit.ts (2 errors) ==== - class Result { } - - class Test { - get Property(): Result { - ~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var x = 1; - return null; - } - } - - class Test2 { - get Property() { - ~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var x = 1; - return null; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/accessorsEmit.symbols b/tests/baselines/reference/accessorsEmit.symbols new file mode 100644 index 0000000000000..119d81d369ab4 --- /dev/null +++ b/tests/baselines/reference/accessorsEmit.symbols @@ -0,0 +1,30 @@ +=== tests/cases/compiler/accessorsEmit.ts === +class Result { } +>Result : Symbol(Result, Decl(accessorsEmit.ts, 0, 0)) + +class Test { +>Test : Symbol(Test, Decl(accessorsEmit.ts, 0, 16)) + + get Property(): Result { +>Property : Symbol(Test.Property, Decl(accessorsEmit.ts, 2, 12)) +>Result : Symbol(Result, Decl(accessorsEmit.ts, 0, 0)) + + var x = 1; +>x : Symbol(x, Decl(accessorsEmit.ts, 4, 11)) + + return null; + } +} + +class Test2 { +>Test2 : Symbol(Test2, Decl(accessorsEmit.ts, 7, 1)) + + get Property() { +>Property : Symbol(Test2.Property, Decl(accessorsEmit.ts, 9, 13)) + + var x = 1; +>x : Symbol(x, Decl(accessorsEmit.ts, 11, 11)) + + return null; + } +} diff --git a/tests/baselines/reference/accessorsEmit.types b/tests/baselines/reference/accessorsEmit.types new file mode 100644 index 0000000000000..84759cefe877c --- /dev/null +++ b/tests/baselines/reference/accessorsEmit.types @@ -0,0 +1,34 @@ +=== tests/cases/compiler/accessorsEmit.ts === +class Result { } +>Result : Result + +class Test { +>Test : Test + + get Property(): Result { +>Property : Result +>Result : Result + + var x = 1; +>x : number +>1 : 1 + + return null; +>null : null + } +} + +class Test2 { +>Test2 : Test2 + + get Property() { +>Property : any + + var x = 1; +>x : number +>1 : 1 + + return null; +>null : null + } +} diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt b/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt deleted file mode 100644 index cee1c8fd537ee..0000000000000 --- a/tests/baselines/reference/accessorsNotAllowedInES3.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -tests/cases/compiler/accessorsNotAllowedInES3.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessorsNotAllowedInES3.ts(4,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/accessorsNotAllowedInES3.ts (2 errors) ==== - class C { - get x(): number { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - var y = { get foo() { return 3; } }; - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - \ No newline at end of file diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.symbols b/tests/baselines/reference/accessorsNotAllowedInES3.symbols new file mode 100644 index 0000000000000..fc527434f3571 --- /dev/null +++ b/tests/baselines/reference/accessorsNotAllowedInES3.symbols @@ -0,0 +1,11 @@ +=== tests/cases/compiler/accessorsNotAllowedInES3.ts === +class C { +>C : Symbol(C, Decl(accessorsNotAllowedInES3.ts, 0, 0)) + + get x(): number { return 1; } +>x : Symbol(C.x, Decl(accessorsNotAllowedInES3.ts, 0, 9)) +} +var y = { get foo() { return 3; } }; +>y : Symbol(y, Decl(accessorsNotAllowedInES3.ts, 3, 3)) +>foo : Symbol(foo, Decl(accessorsNotAllowedInES3.ts, 3, 9)) + diff --git a/tests/baselines/reference/accessorsNotAllowedInES3.types b/tests/baselines/reference/accessorsNotAllowedInES3.types new file mode 100644 index 0000000000000..d83911586aadb --- /dev/null +++ b/tests/baselines/reference/accessorsNotAllowedInES3.types @@ -0,0 +1,14 @@ +=== tests/cases/compiler/accessorsNotAllowedInES3.ts === +class C { +>C : C + + get x(): number { return 1; } +>x : number +>1 : 1 +} +var y = { get foo() { return 3; } }; +>y : { readonly foo: number; } +>{ get foo() { return 3; } } : { readonly foo: number; } +>foo : number +>3 : 3 + diff --git a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt index 278de87e729db..24cf5e8ec48b7 100644 --- a/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt +++ b/tests/baselines/reference/accessors_spec_section-4.5_error-cases.errors.txt @@ -1,52 +1,28 @@ -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(3,48): error TS2322: Type '""' is not assignable to type 'number'. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(5,47): error TS2322: Type '""' is not assignable to type 'number'. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(9,52): error TS2322: Type '0' is not assignable to type 'string'. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(11,51): error TS2322: Type '0' is not assignable to type 'string'. -tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts (12 errors) ==== +==== tests/cases/compiler/accessors_spec_section-4.5_error-cases.ts (4 errors) ==== class LanguageSpec_section_4_5_error_cases { public set AnnotatedSetter_SetterFirst(a: number) { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get AnnotatedSetter_SetterFirst() { return ""; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~ !!! error TS2322: Type '""' is not assignable to type 'number'. public get AnnotatedSetter_SetterLast() { return ""; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~ !!! error TS2322: Type '""' is not assignable to type 'number'. public set AnnotatedSetter_SetterLast(a: number) { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get AnnotatedGetter_GetterFirst(): string { return ""; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set AnnotatedGetter_GetterFirst(aStr) { aStr = 0; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ !!! error TS2322: Type '0' is not assignable to type 'string'. public set AnnotatedGetter_GetterLast(aStr) { aStr = 0; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~ !!! error TS2322: Type '0' is not assignable to type 'string'. public get AnnotatedGetter_GetterLast(): string { return ""; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt b/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt deleted file mode 100644 index 9e7db776ff5cd..0000000000000 --- a/tests/baselines/reference/accessors_spec_section-4.5_inference.errors.txt +++ /dev/null @@ -1,63 +0,0 @@ -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(16,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(17,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(20,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(22,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/accessors_spec_section-4.5_inference.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/accessors_spec_section-4.5_inference.ts (12 errors) ==== - class A { } - class B extends A { } - - class LanguageSpec_section_4_5_inference { - - public set InferredGetterFromSetterAnnotation(a: A) { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public get InferredGetterFromSetterAnnotation() { return new B(); } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - public get InferredGetterFromSetterAnnotation_GetterFirst() { return new B(); } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public set InferredGetterFromSetterAnnotation_GetterFirst(a: A) { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - - public get InferredFromGetter() { return new B(); } - ~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public set InferredFromGetter(a) { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - public set InferredFromGetter_SetterFirst(a) { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public get InferredFromGetter_SetterFirst() { return new B(); } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - public set InferredSetterFromGetterAnnotation(a) { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public get InferredSetterFromGetterAnnotation() : A { return new B(); } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - public get InferredSetterFromGetterAnnotation_GetterFirst() : A { return new B(); } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public set InferredSetterFromGetterAnnotation_GetterFirst(a) { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.symbols b/tests/baselines/reference/accessors_spec_section-4.5_inference.symbols new file mode 100644 index 0000000000000..de8781c42b0b5 --- /dev/null +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.symbols @@ -0,0 +1,64 @@ +=== tests/cases/compiler/accessors_spec_section-4.5_inference.ts === +class A { } +>A : Symbol(A, Decl(accessors_spec_section-4.5_inference.ts, 0, 0)) + +class B extends A { } +>B : Symbol(B, Decl(accessors_spec_section-4.5_inference.ts, 0, 11)) +>A : Symbol(A, Decl(accessors_spec_section-4.5_inference.ts, 0, 0)) + +class LanguageSpec_section_4_5_inference { +>LanguageSpec_section_4_5_inference : Symbol(LanguageSpec_section_4_5_inference, Decl(accessors_spec_section-4.5_inference.ts, 1, 21)) + + public set InferredGetterFromSetterAnnotation(a: A) { } +>InferredGetterFromSetterAnnotation : Symbol(LanguageSpec_section_4_5_inference.InferredGetterFromSetterAnnotation, Decl(accessors_spec_section-4.5_inference.ts, 3, 42), Decl(accessors_spec_section-4.5_inference.ts, 5, 59)) +>a : Symbol(a, Decl(accessors_spec_section-4.5_inference.ts, 5, 50)) +>A : Symbol(A, Decl(accessors_spec_section-4.5_inference.ts, 0, 0)) + + public get InferredGetterFromSetterAnnotation() { return new B(); } +>InferredGetterFromSetterAnnotation : Symbol(LanguageSpec_section_4_5_inference.InferredGetterFromSetterAnnotation, Decl(accessors_spec_section-4.5_inference.ts, 3, 42), Decl(accessors_spec_section-4.5_inference.ts, 5, 59)) +>B : Symbol(B, Decl(accessors_spec_section-4.5_inference.ts, 0, 11)) + + public get InferredGetterFromSetterAnnotation_GetterFirst() { return new B(); } +>InferredGetterFromSetterAnnotation_GetterFirst : Symbol(LanguageSpec_section_4_5_inference.InferredGetterFromSetterAnnotation_GetterFirst, Decl(accessors_spec_section-4.5_inference.ts, 6, 71), Decl(accessors_spec_section-4.5_inference.ts, 8, 83)) +>B : Symbol(B, Decl(accessors_spec_section-4.5_inference.ts, 0, 11)) + + public set InferredGetterFromSetterAnnotation_GetterFirst(a: A) { } +>InferredGetterFromSetterAnnotation_GetterFirst : Symbol(LanguageSpec_section_4_5_inference.InferredGetterFromSetterAnnotation_GetterFirst, Decl(accessors_spec_section-4.5_inference.ts, 6, 71), Decl(accessors_spec_section-4.5_inference.ts, 8, 83)) +>a : Symbol(a, Decl(accessors_spec_section-4.5_inference.ts, 9, 62)) +>A : Symbol(A, Decl(accessors_spec_section-4.5_inference.ts, 0, 0)) + + + public get InferredFromGetter() { return new B(); } +>InferredFromGetter : Symbol(LanguageSpec_section_4_5_inference.InferredFromGetter, Decl(accessors_spec_section-4.5_inference.ts, 9, 71), Decl(accessors_spec_section-4.5_inference.ts, 12, 55)) +>B : Symbol(B, Decl(accessors_spec_section-4.5_inference.ts, 0, 11)) + + public set InferredFromGetter(a) { } +>InferredFromGetter : Symbol(LanguageSpec_section_4_5_inference.InferredFromGetter, Decl(accessors_spec_section-4.5_inference.ts, 9, 71), Decl(accessors_spec_section-4.5_inference.ts, 12, 55)) +>a : Symbol(a, Decl(accessors_spec_section-4.5_inference.ts, 13, 34)) + + public set InferredFromGetter_SetterFirst(a) { } +>InferredFromGetter_SetterFirst : Symbol(LanguageSpec_section_4_5_inference.InferredFromGetter_SetterFirst, Decl(accessors_spec_section-4.5_inference.ts, 13, 40), Decl(accessors_spec_section-4.5_inference.ts, 15, 52)) +>a : Symbol(a, Decl(accessors_spec_section-4.5_inference.ts, 15, 46)) + + public get InferredFromGetter_SetterFirst() { return new B(); } +>InferredFromGetter_SetterFirst : Symbol(LanguageSpec_section_4_5_inference.InferredFromGetter_SetterFirst, Decl(accessors_spec_section-4.5_inference.ts, 13, 40), Decl(accessors_spec_section-4.5_inference.ts, 15, 52)) +>B : Symbol(B, Decl(accessors_spec_section-4.5_inference.ts, 0, 11)) + + public set InferredSetterFromGetterAnnotation(a) { } +>InferredSetterFromGetterAnnotation : Symbol(LanguageSpec_section_4_5_inference.InferredSetterFromGetterAnnotation, Decl(accessors_spec_section-4.5_inference.ts, 16, 67), Decl(accessors_spec_section-4.5_inference.ts, 18, 56)) +>a : Symbol(a, Decl(accessors_spec_section-4.5_inference.ts, 18, 50)) + + public get InferredSetterFromGetterAnnotation() : A { return new B(); } +>InferredSetterFromGetterAnnotation : Symbol(LanguageSpec_section_4_5_inference.InferredSetterFromGetterAnnotation, Decl(accessors_spec_section-4.5_inference.ts, 16, 67), Decl(accessors_spec_section-4.5_inference.ts, 18, 56)) +>A : Symbol(A, Decl(accessors_spec_section-4.5_inference.ts, 0, 0)) +>B : Symbol(B, Decl(accessors_spec_section-4.5_inference.ts, 0, 11)) + + public get InferredSetterFromGetterAnnotation_GetterFirst() : A { return new B(); } +>InferredSetterFromGetterAnnotation_GetterFirst : Symbol(LanguageSpec_section_4_5_inference.InferredSetterFromGetterAnnotation_GetterFirst, Decl(accessors_spec_section-4.5_inference.ts, 19, 75), Decl(accessors_spec_section-4.5_inference.ts, 21, 87)) +>A : Symbol(A, Decl(accessors_spec_section-4.5_inference.ts, 0, 0)) +>B : Symbol(B, Decl(accessors_spec_section-4.5_inference.ts, 0, 11)) + + public set InferredSetterFromGetterAnnotation_GetterFirst(a) { } +>InferredSetterFromGetterAnnotation_GetterFirst : Symbol(LanguageSpec_section_4_5_inference.InferredSetterFromGetterAnnotation_GetterFirst, Decl(accessors_spec_section-4.5_inference.ts, 19, 75), Decl(accessors_spec_section-4.5_inference.ts, 21, 87)) +>a : Symbol(a, Decl(accessors_spec_section-4.5_inference.ts, 22, 62)) +} diff --git a/tests/baselines/reference/accessors_spec_section-4.5_inference.types b/tests/baselines/reference/accessors_spec_section-4.5_inference.types new file mode 100644 index 0000000000000..a1d96120634da --- /dev/null +++ b/tests/baselines/reference/accessors_spec_section-4.5_inference.types @@ -0,0 +1,70 @@ +=== tests/cases/compiler/accessors_spec_section-4.5_inference.ts === +class A { } +>A : A + +class B extends A { } +>B : B +>A : A + +class LanguageSpec_section_4_5_inference { +>LanguageSpec_section_4_5_inference : LanguageSpec_section_4_5_inference + + public set InferredGetterFromSetterAnnotation(a: A) { } +>InferredGetterFromSetterAnnotation : A +>a : A +>A : A + + public get InferredGetterFromSetterAnnotation() { return new B(); } +>InferredGetterFromSetterAnnotation : A +>new B() : B +>B : typeof B + + public get InferredGetterFromSetterAnnotation_GetterFirst() { return new B(); } +>InferredGetterFromSetterAnnotation_GetterFirst : A +>new B() : B +>B : typeof B + + public set InferredGetterFromSetterAnnotation_GetterFirst(a: A) { } +>InferredGetterFromSetterAnnotation_GetterFirst : A +>a : A +>A : A + + + public get InferredFromGetter() { return new B(); } +>InferredFromGetter : B +>new B() : B +>B : typeof B + + public set InferredFromGetter(a) { } +>InferredFromGetter : B +>a : B + + public set InferredFromGetter_SetterFirst(a) { } +>InferredFromGetter_SetterFirst : B +>a : B + + public get InferredFromGetter_SetterFirst() { return new B(); } +>InferredFromGetter_SetterFirst : B +>new B() : B +>B : typeof B + + public set InferredSetterFromGetterAnnotation(a) { } +>InferredSetterFromGetterAnnotation : A +>a : A + + public get InferredSetterFromGetterAnnotation() : A { return new B(); } +>InferredSetterFromGetterAnnotation : A +>A : A +>new B() : B +>B : typeof B + + public get InferredSetterFromGetterAnnotation_GetterFirst() : A { return new B(); } +>InferredSetterFromGetterAnnotation_GetterFirst : A +>A : A +>new B() : B +>B : typeof B + + public set InferredSetterFromGetterAnnotation_GetterFirst(a) { } +>InferredSetterFromGetterAnnotation_GetterFirst : A +>a : A +} diff --git a/tests/baselines/reference/aliasAssignments.js b/tests/baselines/reference/aliasAssignments.js index c21fe575e764f..f1c4d6f7514f7 100644 --- a/tests/baselines/reference/aliasAssignments.js +++ b/tests/baselines/reference/aliasAssignments.js @@ -15,7 +15,7 @@ y = moduleA; // should be error //// [aliasAssignments_moduleA.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var someClass = (function () { function someClass() { } @@ -24,7 +24,7 @@ var someClass = (function () { exports.someClass = someClass; //// [aliasAssignments_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasAssignments_moduleA"); var x = moduleA; x = 1; // Should be error diff --git a/tests/baselines/reference/aliasOnMergedModuleInterface.js b/tests/baselines/reference/aliasOnMergedModuleInterface.js index d3d312e53bb92..f1b78e4ef5a74 100644 --- a/tests/baselines/reference/aliasOnMergedModuleInterface.js +++ b/tests/baselines/reference/aliasOnMergedModuleInterface.js @@ -24,7 +24,7 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err //// [aliasOnMergedModuleInterface_0.js] //// [aliasOnMergedModuleInterface_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var z; z.bar("hello"); // This should be ok var x = foo.bar("hello"); // foo.A should be ok but foo.bar should be error diff --git a/tests/baselines/reference/aliasUsageInArray.js b/tests/baselines/reference/aliasUsageInArray.js index 1ccbc958aec35..614944a1368c1 100644 --- a/tests/baselines/reference/aliasUsageInArray.js +++ b/tests/baselines/reference/aliasUsageInArray.js @@ -23,7 +23,7 @@ var xs2: typeof moduleA[] = [moduleA]; //// [aliasUsageInArray_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -42,7 +42,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInArray_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -54,7 +54,7 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInArray_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInArray_moduleA"); var xs = [moduleA]; var xs2 = [moduleA]; diff --git a/tests/baselines/reference/aliasUsageInFunctionExpression.js b/tests/baselines/reference/aliasUsageInFunctionExpression.js index de661ae803e30..7f53ace86fee5 100644 --- a/tests/baselines/reference/aliasUsageInFunctionExpression.js +++ b/tests/baselines/reference/aliasUsageInFunctionExpression.js @@ -22,7 +22,7 @@ f = (x) => moduleA; //// [aliasUsageInFunctionExpression_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -41,7 +41,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInFunctionExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -53,7 +53,7 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInFunctionExpression_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInFunctionExpression_moduleA"); var f = function (x) { return x; }; f = function (x) { return moduleA; }; diff --git a/tests/baselines/reference/aliasUsageInGenericFunction.js b/tests/baselines/reference/aliasUsageInGenericFunction.js index 2ca49ea8dfc33..d4d92663d4bee 100644 --- a/tests/baselines/reference/aliasUsageInGenericFunction.js +++ b/tests/baselines/reference/aliasUsageInGenericFunction.js @@ -26,7 +26,7 @@ var r2 = foo({ a: null }); //// [aliasUsageInGenericFunction_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -45,7 +45,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInGenericFunction_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -57,7 +57,7 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInGenericFunction_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInGenericFunction_moduleA"); function foo(x) { return x; diff --git a/tests/baselines/reference/aliasUsageInIndexerOfClass.js b/tests/baselines/reference/aliasUsageInIndexerOfClass.js index 81084b8b92fa6..a32e046571f92 100644 --- a/tests/baselines/reference/aliasUsageInIndexerOfClass.js +++ b/tests/baselines/reference/aliasUsageInIndexerOfClass.js @@ -28,7 +28,7 @@ class N2 { //// [aliasUsageInIndexerOfClass_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -47,7 +47,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInIndexerOfClass_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -59,7 +59,7 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInIndexerOfClass_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInIndexerOfClass_moduleA"); var N = (function () { function N() { diff --git a/tests/baselines/reference/aliasUsageInObjectLiteral.js b/tests/baselines/reference/aliasUsageInObjectLiteral.js index 6f4adfae58c98..e1f9e4936da73 100644 --- a/tests/baselines/reference/aliasUsageInObjectLiteral.js +++ b/tests/baselines/reference/aliasUsageInObjectLiteral.js @@ -23,7 +23,7 @@ var c: { y: { z: IHasVisualizationModel } } = { y: { z: moduleA } }; //// [aliasUsageInObjectLiteral_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -42,7 +42,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInObjectLiteral_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -54,7 +54,7 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInObjectLiteral_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInObjectLiteral_moduleA"); var a = { x: moduleA }; var b = { x: moduleA }; diff --git a/tests/baselines/reference/aliasUsageInOrExpression.js b/tests/baselines/reference/aliasUsageInOrExpression.js index 178ccaaee230d..0aa50535b95bc 100644 --- a/tests/baselines/reference/aliasUsageInOrExpression.js +++ b/tests/baselines/reference/aliasUsageInOrExpression.js @@ -26,7 +26,7 @@ var f: { x: IHasVisualizationModel } = <{ x: IHasVisualizationModel }>null ? { x //// [aliasUsageInOrExpression_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -45,7 +45,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInOrExpression_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -57,7 +57,7 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInOrExpression_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInOrExpression_moduleA"); var i; var d1 = i || moduleA; diff --git a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js index 5ac28396fba69..bdd20fa3717f7 100644 --- a/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js +++ b/tests/baselines/reference/aliasUsageInTypeArgumentOfExtendsClause.js @@ -26,7 +26,7 @@ class D extends C { //// [aliasUsageInTypeArgumentOfExtendsClause_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -45,7 +45,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -67,7 +67,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./aliasUsageInTypeArgumentOfExtendsClause_moduleA"); var C = (function () { function C() { diff --git a/tests/baselines/reference/aliasUsageInVarAssignment.js b/tests/baselines/reference/aliasUsageInVarAssignment.js index a85d61fd34cad..3e0dac0199413 100644 --- a/tests/baselines/reference/aliasUsageInVarAssignment.js +++ b/tests/baselines/reference/aliasUsageInVarAssignment.js @@ -22,7 +22,7 @@ var m: typeof moduleA = i; //// [aliasUsageInVarAssignment_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -41,7 +41,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./aliasUsageInVarAssignment_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -53,6 +53,6 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [aliasUsageInVarAssignment_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var i; var m = i; diff --git a/tests/baselines/reference/aliasUsedAsNameValue.js b/tests/baselines/reference/aliasUsedAsNameValue.js index 168567eb80fac..a51a4fef79e46 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.js +++ b/tests/baselines/reference/aliasUsedAsNameValue.js @@ -20,15 +20,15 @@ export var a = function () { //// [aliasUsedAsNameValue_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [aliasUsedAsNameValue_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function b(a) { return null; } exports.b = b; //// [aliasUsedAsNameValue_2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// /// var mod = require("./aliasUsedAsNameValue_0"); diff --git a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js index 58565bbb91648..c111c6799120c 100644 --- a/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js +++ b/tests/baselines/reference/aliasWithInterfaceExportAssignmentUsedInVarInitializer.js @@ -12,8 +12,8 @@ var d = b.q3; //// [aliasWithInterfaceExportAssignmentUsedInVarInitializer_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [aliasWithInterfaceExportAssignmentUsedInVarInitializer_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = b.q3; diff --git a/tests/baselines/reference/allowSyntheticDefaultImports1.js b/tests/baselines/reference/allowSyntheticDefaultImports1.js index a659eb60151c3..d73f750f559de 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports1.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports1.js @@ -12,7 +12,7 @@ export class Foo { //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } @@ -21,6 +21,6 @@ var Foo = (function () { exports.Foo = Foo; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var b_1 = require("./b"); -exports.x = new b_1["default"].Foo(); +exports.x = new b_1.default.Foo(); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports10.js b/tests/baselines/reference/allowSyntheticDefaultImports10.js index ad3ed5715c08f..13ee18518c4ec 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports10.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports10.js @@ -12,7 +12,7 @@ Foo.default.default.foo(); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = require("./b"); -Foo["default"].bar(); -Foo["default"]["default"].foo(); +Foo.default.bar(); +Foo.default.default.foo(); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports2.js b/tests/baselines/reference/allowSyntheticDefaultImports2.js index 93c13617e4a66..22aa601eaba6d 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports2.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports2.js @@ -38,7 +38,7 @@ System.register(["./b"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", x = new b_1["default"].Foo()); + exports_1("x", x = new b_1.default.Foo()); } }; }); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports3.js b/tests/baselines/reference/allowSyntheticDefaultImports3.js index 74b1dcb776dec..e0224d8f54052 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports3.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports3.js @@ -39,7 +39,7 @@ System.register(["./b"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", x = new b_1["default"].Foo()); + exports_1("x", x = new b_1.default.Foo()); } }; }); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports4.js b/tests/baselines/reference/allowSyntheticDefaultImports4.js index 762c032b81287..c0b9c5784de01 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports4.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports4.js @@ -13,6 +13,6 @@ export var x = new Foo(); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var b_1 = require("./b"); -exports.x = new b_1["default"](); +exports.x = new b_1.default(); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports5.js b/tests/baselines/reference/allowSyntheticDefaultImports5.js index 765d11408642a..1e4c8f9d7ec4b 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports5.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports5.js @@ -23,7 +23,7 @@ System.register(["./b"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", x = new b_1["default"]()); + exports_1("x", x = new b_1.default()); } }; }); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports6.js b/tests/baselines/reference/allowSyntheticDefaultImports6.js index 9ae7acae9194e..5884f52d01710 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports6.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports6.js @@ -23,7 +23,7 @@ System.register(["./b"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", x = new b_1["default"]()); + exports_1("x", x = new b_1.default()); } }; }); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports7.js b/tests/baselines/reference/allowSyntheticDefaultImports7.js index 6d0ea5b3be07a..06c4160b6e850 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports7.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports7.js @@ -22,8 +22,8 @@ System.register(["./b"], function (exports_1, context_1) { } ], execute: function () { - b_1["default"].bar(); - b_1["default"].foo(); + b_1.default.bar(); + b_1.default.foo(); } }; }); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports8.js b/tests/baselines/reference/allowSyntheticDefaultImports8.js index 5a77e51e6a241..b9d14c718c838 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports8.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports8.js @@ -22,8 +22,8 @@ System.register(["./b"], function (exports_1, context_1) { } ], execute: function () { - b_1["default"].bar(); - b_1["default"].foo(); + b_1.default.bar(); + b_1.default.foo(); } }; }); diff --git a/tests/baselines/reference/allowSyntheticDefaultImports9.js b/tests/baselines/reference/allowSyntheticDefaultImports9.js index 2d8ab463d83f7..f79bd76c192b9 100644 --- a/tests/baselines/reference/allowSyntheticDefaultImports9.js +++ b/tests/baselines/reference/allowSyntheticDefaultImports9.js @@ -12,7 +12,7 @@ Foo.foo(); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var b_1 = require("./b"); -b_1["default"].bar(); -b_1["default"].foo(); +b_1.default.bar(); +b_1.default.foo(); diff --git a/tests/baselines/reference/alwaysStrictModule4.js b/tests/baselines/reference/alwaysStrictModule4.js index 026570293be82..6fbdc43af0067 100644 --- a/tests/baselines/reference/alwaysStrictModule4.js +++ b/tests/baselines/reference/alwaysStrictModule4.js @@ -4,6 +4,6 @@ export const a = 1 //// [alwaysStrictModule4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Module commonjs exports.a = 1; diff --git a/tests/baselines/reference/ambientDeclarationsExternal.js b/tests/baselines/reference/ambientDeclarationsExternal.js index fb5315864678b..02cac740f74b3 100644 --- a/tests/baselines/reference/ambientDeclarationsExternal.js +++ b/tests/baselines/reference/ambientDeclarationsExternal.js @@ -27,7 +27,7 @@ var n: number; // Ambient external import declaration referencing ambient external module using top level module name //// [consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Ambient external module members are always exported with or without export keyword when module lacks export assignment var imp3 = require("equ2"); var n = imp3.x; diff --git a/tests/baselines/reference/ambientDeclarationsPatterns.js b/tests/baselines/reference/ambientDeclarationsPatterns.js index 84088d11d4eb4..4e1cfccbdd0ab 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns.js +++ b/tests/baselines/reference/ambientDeclarationsPatterns.js @@ -34,7 +34,7 @@ foo(fileText); //// [user.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foobarbaz_1 = require("foobarbaz"); foobarbaz_1.foo(foobarbaz_1.baz); @@ -42,4 +42,4 @@ var foosball_1 = require("foosball"); foobarbaz_1.foo(foosball_1.foos); // Works with relative file name var file_text_1 = require("./file!text"); -foobarbaz_1.foo(file_text_1["default"]); +foobarbaz_1.foo(file_text_1.default); diff --git a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js index 401af4b5214b1..0a53a3c4567c6 100644 --- a/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js +++ b/tests/baselines/reference/ambientExternalModuleInsideNonAmbientExternalModule.js @@ -4,5 +4,5 @@ export declare module "M" { } //// [ambientExternalModuleInsideNonAmbientExternalModule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/ambientExternalModuleMerging.js b/tests/baselines/reference/ambientExternalModuleMerging.js index 6c2de62c90a66..9dffd75fc8c50 100644 --- a/tests/baselines/reference/ambientExternalModuleMerging.js +++ b/tests/baselines/reference/ambientExternalModuleMerging.js @@ -19,7 +19,7 @@ declare module "M" { //// [ambientExternalModuleMerging_use.js] define(["require", "exports", "M"], function (require, exports, M) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // Should be strings var x = M.x; var y = M.y; diff --git a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js index 9efd9e4ada9fc..27e999b59f559 100644 --- a/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js +++ b/tests/baselines/reference/ambientExternalModuleWithInternalImportDeclaration.js @@ -22,6 +22,6 @@ var c = new A(); //// [ambientExternalModuleWithInternalImportDeclaration_1.js] define(["require", "exports", "M"], function (require, exports, A) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c = new A(); }); diff --git a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js index 98d3d46912aae..fba6dff144395 100644 --- a/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js +++ b/tests/baselines/reference/ambientExternalModuleWithoutInternalImportDeclaration.js @@ -21,6 +21,6 @@ var c = new A(); //// [ambientExternalModuleWithoutInternalImportDeclaration_1.js] define(["require", "exports", "M"], function (require, exports, A) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c = new A(); }); diff --git a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js index 689cd6a12420b..f4ddf43614c39 100644 --- a/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js +++ b/tests/baselines/reference/ambientInsideNonAmbientExternalModule.js @@ -8,5 +8,5 @@ export declare module M { } //// [ambientInsideNonAmbientExternalModule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/ambientNameRestrictions.js b/tests/baselines/reference/ambientNameRestrictions.js index b35f1241b2d15..9a7971219825f 100644 --- a/tests/baselines/reference/ambientNameRestrictions.js +++ b/tests/baselines/reference/ambientNameRestrictions.js @@ -6,4 +6,4 @@ export declare namespace Foo { //// [ambientNameRestrictions.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/ambientShorthand.js b/tests/baselines/reference/ambientShorthand.js index a7513e7eb585a..1fd5edcb856eb 100644 --- a/tests/baselines/reference/ambientShorthand.js +++ b/tests/baselines/reference/ambientShorthand.js @@ -15,9 +15,9 @@ foo(bar, baz, boom); //// [user.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var jquery_1 = require("jquery"); var baz = require("fs"); var boom = require("jquery"); -jquery_1["default"](jquery_1.bar, baz, boom); +jquery_1.default(jquery_1.bar, baz, boom); diff --git a/tests/baselines/reference/ambientShorthand_duplicate.js b/tests/baselines/reference/ambientShorthand_duplicate.js index 08d03c83ed0e6..99c490003275c 100644 --- a/tests/baselines/reference/ambientShorthand_duplicate.js +++ b/tests/baselines/reference/ambientShorthand_duplicate.js @@ -14,4 +14,4 @@ import foo from "foo"; //// [user.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/ambientShorthand_merging.js b/tests/baselines/reference/ambientShorthand_merging.js index 15714a48997e8..b8a134c179606 100644 --- a/tests/baselines/reference/ambientShorthand_merging.js +++ b/tests/baselines/reference/ambientShorthand_merging.js @@ -16,4 +16,4 @@ import foo, {bar} from "foo"; //// [user.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/ambientShorthand_reExport.js b/tests/baselines/reference/ambientShorthand_reExport.js index 6842d0f75541f..6a52361c94f41 100644 --- a/tests/baselines/reference/ambientShorthand_reExport.js +++ b/tests/baselines/reference/ambientShorthand_reExport.js @@ -18,7 +18,7 @@ x($); //// [reExportX.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var jquery_1 = require("jquery"); exports.x = jquery_1.x; //// [reExportAll.js] @@ -26,11 +26,11 @@ exports.x = jquery_1.x; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); __export(require("jquery")); //// [reExportUser.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var reExportX_1 = require("./reExportX"); var $ = require("./reExportAll"); // '$' is not callable, it is an object. diff --git a/tests/baselines/reference/amdDependencyComment1.js b/tests/baselines/reference/amdDependencyComment1.js index a11b65ff53fd8..7951ae9d5a9bb 100644 --- a/tests/baselines/reference/amdDependencyComment1.js +++ b/tests/baselines/reference/amdDependencyComment1.js @@ -7,6 +7,6 @@ m1.f(); //// [amdDependencyComment1.js] "use strict"; /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m2"); m1.f(); diff --git a/tests/baselines/reference/amdDependencyComment2.js b/tests/baselines/reference/amdDependencyComment2.js index 222093cf15933..c6d5f4d1b5376 100644 --- a/tests/baselines/reference/amdDependencyComment2.js +++ b/tests/baselines/reference/amdDependencyComment2.js @@ -8,6 +8,6 @@ m1.f(); /// define(["require", "exports", "m2", "bar"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); m1.f(); }); diff --git a/tests/baselines/reference/amdDependencyCommentName1.js b/tests/baselines/reference/amdDependencyCommentName1.js index 5065ed12ab4e2..f69808c6759c4 100644 --- a/tests/baselines/reference/amdDependencyCommentName1.js +++ b/tests/baselines/reference/amdDependencyCommentName1.js @@ -7,6 +7,6 @@ m1.f(); //// [amdDependencyCommentName1.js] "use strict"; /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m2"); m1.f(); diff --git a/tests/baselines/reference/amdDependencyCommentName2.js b/tests/baselines/reference/amdDependencyCommentName2.js index c39902371a0cf..fcbbc4c4612de 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.js +++ b/tests/baselines/reference/amdDependencyCommentName2.js @@ -8,6 +8,6 @@ m1.f(); /// define(["require", "exports", "bar", "m2"], function (require, exports, b, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); m1.f(); }); diff --git a/tests/baselines/reference/amdDependencyCommentName3.js b/tests/baselines/reference/amdDependencyCommentName3.js index f842ad0cbf8c5..72d8244706443 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.js +++ b/tests/baselines/reference/amdDependencyCommentName3.js @@ -12,6 +12,6 @@ m1.f(); /// define(["require", "exports", "bar", "goo", "m2", "foo"], function (require, exports, b, c, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); m1.f(); }); diff --git a/tests/baselines/reference/amdDependencyCommentName4.js b/tests/baselines/reference/amdDependencyCommentName4.js index 6542aa14fa299..b050b58aa8e49 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.js +++ b/tests/baselines/reference/amdDependencyCommentName4.js @@ -27,9 +27,9 @@ import "unaliasedModule2"; /// define(["require", "exports", "aliasedModule5", "aliasedModule6", "aliasedModule1", "aliasedModule2", "aliasedModule3", "aliasedModule4", "unaliasedModule3", "unaliasedModule4", "unaliasedModule1", "unaliasedModule2"], function (require, exports, n1, n2, r1, aliasedModule2_1, aliasedModule3_1, ns) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); r1; aliasedModule2_1.p1; - aliasedModule3_1["default"]; + aliasedModule3_1.default; ns; }); diff --git a/tests/baselines/reference/amdImportAsPrimaryExpression.js b/tests/baselines/reference/amdImportAsPrimaryExpression.js index 69d3e095dc7e3..012b5ea94e0ca 100644 --- a/tests/baselines/reference/amdImportAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportAsPrimaryExpression.js @@ -15,7 +15,7 @@ if(foo.E1.A === 0){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var E1; (function (E1) { E1[E1["A"] = 0] = "A"; @@ -26,7 +26,7 @@ define(["require", "exports"], function (require, exports) { //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); if (foo.E1.A === 0) { // Should cause runtime import - interesting optimization possibility, as gets inlined to 0. } diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js index 651ae7a6d3945..01b7b0b2630d5 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js @@ -34,7 +34,7 @@ var e: number = 0; //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { this.m1 = 42; @@ -53,7 +53,7 @@ define(["require", "exports"], function (require, exports) { //// [foo_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var i; var x = {}; var y = false; diff --git a/tests/baselines/reference/anyIdenticalToItself.errors.txt b/tests/baselines/reference/anyIdenticalToItself.errors.txt index bcd3b52daef1d..09ace6d3909f7 100644 --- a/tests/baselines/reference/anyIdenticalToItself.errors.txt +++ b/tests/baselines/reference/anyIdenticalToItself.errors.txt @@ -1,9 +1,7 @@ tests/cases/compiler/anyIdenticalToItself.ts(1,10): error TS2394: Overload signature is not compatible with function implementation. -tests/cases/compiler/anyIdenticalToItself.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/anyIdenticalToItself.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/anyIdenticalToItself.ts (3 errors) ==== +==== tests/cases/compiler/anyIdenticalToItself.ts (1 errors) ==== function foo(x: any); ~~~ !!! error TS2394: Overload signature is not compatible with function implementation. @@ -12,13 +10,9 @@ tests/cases/compiler/anyIdenticalToItself.ts(10,9): error TS1056: Accessors are class C { get X(): any { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var y: any; return y; } set X(v: any) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/asOperator4.js b/tests/baselines/reference/asOperator4.js index d0eac5bb1137b..f6ee97fa17e0b 100644 --- a/tests/baselines/reference/asOperator4.js +++ b/tests/baselines/reference/asOperator4.js @@ -13,12 +13,12 @@ import { foo } from './foo'; //// [foo.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { } exports.foo = foo; //// [bar.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo_1 = require("./foo"); // These should emit identically foo_1.foo; diff --git a/tests/baselines/reference/assignmentCompatBug3.errors.txt b/tests/baselines/reference/assignmentCompatBug3.errors.txt deleted file mode 100644 index fe7ff5bbddcfd..0000000000000 --- a/tests/baselines/reference/assignmentCompatBug3.errors.txt +++ /dev/null @@ -1,37 +0,0 @@ -tests/cases/compiler/assignmentCompatBug3.ts(3,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/assignmentCompatBug3.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/assignmentCompatBug3.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/assignmentCompatBug3.ts (3 errors) ==== - function makePoint(x: number, y: number) { - return { - get x() { return x;}, // shouldn't be "void" - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - get y() { return y;}, // shouldn't be "void" - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - //x: "yo", - //y: "boo", - dist: function () { - return Math.sqrt(x*x+y*y); // shouldn't be picking up "x" and "y" from the object lit - } - } - } - - class C { - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 0; - } - } - - function foo(test: string) { } - - var x: any; - var y: any; - - foo(x); - foo(x + y); \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatBug3.symbols b/tests/baselines/reference/assignmentCompatBug3.symbols new file mode 100644 index 0000000000000..6545195d4b8ec --- /dev/null +++ b/tests/baselines/reference/assignmentCompatBug3.symbols @@ -0,0 +1,61 @@ +=== tests/cases/compiler/assignmentCompatBug3.ts === +function makePoint(x: number, y: number) { +>makePoint : Symbol(makePoint, Decl(assignmentCompatBug3.ts, 0, 0)) +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 0, 19)) +>y : Symbol(y, Decl(assignmentCompatBug3.ts, 0, 29)) + + return { + get x() { return x;}, // shouldn't be "void" +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 1, 12)) +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 0, 19)) + + get y() { return y;}, // shouldn't be "void" +>y : Symbol(y, Decl(assignmentCompatBug3.ts, 2, 29)) +>y : Symbol(y, Decl(assignmentCompatBug3.ts, 0, 29)) + + //x: "yo", + //y: "boo", + dist: function () { +>dist : Symbol(dist, Decl(assignmentCompatBug3.ts, 3, 29)) + + return Math.sqrt(x*x+y*y); // shouldn't be picking up "x" and "y" from the object lit +>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 0, 19)) +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 0, 19)) +>y : Symbol(y, Decl(assignmentCompatBug3.ts, 0, 29)) +>y : Symbol(y, Decl(assignmentCompatBug3.ts, 0, 29)) + } + } +} + +class C { +>C : Symbol(C, Decl(assignmentCompatBug3.ts, 10, 1)) + + get x() { +>x : Symbol(C.x, Decl(assignmentCompatBug3.ts, 12, 9)) + + return 0; + } +} + +function foo(test: string) { } +>foo : Symbol(foo, Decl(assignmentCompatBug3.ts, 16, 1)) +>test : Symbol(test, Decl(assignmentCompatBug3.ts, 18, 13)) + +var x: any; +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 20, 3)) + +var y: any; +>y : Symbol(y, Decl(assignmentCompatBug3.ts, 21, 3)) + +foo(x); +>foo : Symbol(foo, Decl(assignmentCompatBug3.ts, 16, 1)) +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 20, 3)) + +foo(x + y); +>foo : Symbol(foo, Decl(assignmentCompatBug3.ts, 16, 1)) +>x : Symbol(x, Decl(assignmentCompatBug3.ts, 20, 3)) +>y : Symbol(y, Decl(assignmentCompatBug3.ts, 21, 3)) + diff --git a/tests/baselines/reference/assignmentCompatBug3.types b/tests/baselines/reference/assignmentCompatBug3.types new file mode 100644 index 0000000000000..1c4581e2f196f --- /dev/null +++ b/tests/baselines/reference/assignmentCompatBug3.types @@ -0,0 +1,72 @@ +=== tests/cases/compiler/assignmentCompatBug3.ts === +function makePoint(x: number, y: number) { +>makePoint : (x: number, y: number) => { readonly x: number; readonly y: number; dist: () => number; } +>x : number +>y : number + + return { +>{ get x() { return x;}, // shouldn't be "void" get y() { return y;}, // shouldn't be "void" //x: "yo", //y: "boo", dist: function () { return Math.sqrt(x*x+y*y); // shouldn't be picking up "x" and "y" from the object lit } } : { readonly x: number; readonly y: number; dist: () => number; } + + get x() { return x;}, // shouldn't be "void" +>x : number +>x : number + + get y() { return y;}, // shouldn't be "void" +>y : number +>y : number + + //x: "yo", + //y: "boo", + dist: function () { +>dist : () => number +>function () { return Math.sqrt(x*x+y*y); // shouldn't be picking up "x" and "y" from the object lit } : () => number + + return Math.sqrt(x*x+y*y); // shouldn't be picking up "x" and "y" from the object lit +>Math.sqrt(x*x+y*y) : number +>Math.sqrt : (x: number) => number +>Math : Math +>sqrt : (x: number) => number +>x*x+y*y : number +>x*x : number +>x : number +>x : number +>y*y : number +>y : number +>y : number + } + } +} + +class C { +>C : C + + get x() { +>x : number + + return 0; +>0 : 0 + } +} + +function foo(test: string) { } +>foo : (test: string) => void +>test : string + +var x: any; +>x : any + +var y: any; +>y : any + +foo(x); +>foo(x) : void +>foo : (test: string) => void +>x : any + +foo(x + y); +>foo(x + y) : void +>foo : (test: string) => void +>x + y : any +>x : any +>y : any + diff --git a/tests/baselines/reference/augmentExportEquals1.js b/tests/baselines/reference/augmentExportEquals1.js index 99a6e2e4bb00d..4fa10b893d7e1 100644 --- a/tests/baselines/reference/augmentExportEquals1.js +++ b/tests/baselines/reference/augmentExportEquals1.js @@ -27,11 +27,11 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file3.js] define(["require", "exports", "./file2"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; // should not work }); diff --git a/tests/baselines/reference/augmentExportEquals1_1.js b/tests/baselines/reference/augmentExportEquals1_1.js index 780043c81ca17..a640a212e8f6c 100644 --- a/tests/baselines/reference/augmentExportEquals1_1.js +++ b/tests/baselines/reference/augmentExportEquals1_1.js @@ -24,11 +24,11 @@ let a: x.A; // should not work //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file3.js] define(["require", "exports", "file2"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; // should not work }); diff --git a/tests/baselines/reference/augmentExportEquals2.js b/tests/baselines/reference/augmentExportEquals2.js index 8ce1bb9010157..7f3a825133794 100644 --- a/tests/baselines/reference/augmentExportEquals2.js +++ b/tests/baselines/reference/augmentExportEquals2.js @@ -26,11 +26,11 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file3.js] define(["require", "exports", "./file2"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; // should not work }); diff --git a/tests/baselines/reference/augmentExportEquals2_1.js b/tests/baselines/reference/augmentExportEquals2_1.js index 93b76c0259c80..10bc5541bc5c1 100644 --- a/tests/baselines/reference/augmentExportEquals2_1.js +++ b/tests/baselines/reference/augmentExportEquals2_1.js @@ -23,11 +23,11 @@ let a: x.A; // should not work //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file3.js] define(["require", "exports", "file2"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; // should not work }); diff --git a/tests/baselines/reference/augmentExportEquals3.js b/tests/baselines/reference/augmentExportEquals3.js index 3ff5f574488e4..82ed6ddc3b57c 100644 --- a/tests/baselines/reference/augmentExportEquals3.js +++ b/tests/baselines/reference/augmentExportEquals3.js @@ -35,13 +35,13 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports", "./file1"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); x.b = 1; }); //// [file3.js] define(["require", "exports", "./file1", "./file2"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = x.b; }); diff --git a/tests/baselines/reference/augmentExportEquals3_1.js b/tests/baselines/reference/augmentExportEquals3_1.js index e91ca4498dd86..a644d08286b4f 100644 --- a/tests/baselines/reference/augmentExportEquals3_1.js +++ b/tests/baselines/reference/augmentExportEquals3_1.js @@ -30,13 +30,13 @@ let b = x.b; //// [file2.js] define(["require", "exports", "file1"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); x.b = 1; }); //// [file3.js] define(["require", "exports", "file1", "file2"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = x.b; }); diff --git a/tests/baselines/reference/augmentExportEquals4.js b/tests/baselines/reference/augmentExportEquals4.js index 3ca522bbc0865..6a969c7894b04 100644 --- a/tests/baselines/reference/augmentExportEquals4.js +++ b/tests/baselines/reference/augmentExportEquals4.js @@ -39,13 +39,13 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports", "./file1"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); x.b = 1; }); //// [file3.js] define(["require", "exports", "./file1", "./file2"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = x.b; }); diff --git a/tests/baselines/reference/augmentExportEquals4_1.js b/tests/baselines/reference/augmentExportEquals4_1.js index cd2f54599699e..1b0c4a028a4a2 100644 --- a/tests/baselines/reference/augmentExportEquals4_1.js +++ b/tests/baselines/reference/augmentExportEquals4_1.js @@ -30,13 +30,13 @@ let b = x.b; //// [file2.js] define(["require", "exports", "file1"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); x.b = 1; }); //// [file3.js] define(["require", "exports", "file1", "file2"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = x.b; }); diff --git a/tests/baselines/reference/augmentExportEquals5.js b/tests/baselines/reference/augmentExportEquals5.js index e028b2331daf5..7dcea50441d56 100644 --- a/tests/baselines/reference/augmentExportEquals5.js +++ b/tests/baselines/reference/augmentExportEquals5.js @@ -83,12 +83,12 @@ const y = x.id; //// [augmentation.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [consumer.js] define(["require", "exports", "./augmentation"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x; var y = x.id; }); diff --git a/tests/baselines/reference/augmentExportEquals6.js b/tests/baselines/reference/augmentExportEquals6.js index 1f6904a4664c6..c1b95b4040d8b 100644 --- a/tests/baselines/reference/augmentExportEquals6.js +++ b/tests/baselines/reference/augmentExportEquals6.js @@ -51,13 +51,13 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports", "./file1"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); x.B.b = 1; }); //// [file3.js] define(["require", "exports", "./file1", "./file2"], function (require, exports, x) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = a.a; var c = x.B.b; diff --git a/tests/baselines/reference/augmentExportEquals6_1.js b/tests/baselines/reference/augmentExportEquals6_1.js index d1c7170993b9e..4a3442327afe3 100644 --- a/tests/baselines/reference/augmentExportEquals6_1.js +++ b/tests/baselines/reference/augmentExportEquals6_1.js @@ -28,12 +28,12 @@ let b = a.a; //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file3.js] define(["require", "exports", "file2"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = a.a; }); diff --git a/tests/baselines/reference/augmentedTypesExternalModule1.js b/tests/baselines/reference/augmentedTypesExternalModule1.js index 0a8b7404bd1c5..b30966c3a72cc 100644 --- a/tests/baselines/reference/augmentedTypesExternalModule1.js +++ b/tests/baselines/reference/augmentedTypesExternalModule1.js @@ -6,7 +6,7 @@ module c5 { } // should be ok everywhere //// [augmentedTypesExternalModule1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 1; var c5 = (function () { function c5() { diff --git a/tests/baselines/reference/badExternalModuleReference.js b/tests/baselines/reference/badExternalModuleReference.js index c1608b4c57e20..c2375ed9c4cff 100644 --- a/tests/baselines/reference/badExternalModuleReference.js +++ b/tests/baselines/reference/badExternalModuleReference.js @@ -9,5 +9,5 @@ export declare var a: { //// [badExternalModuleReference.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/bangInModuleName.js b/tests/baselines/reference/bangInModuleName.js index 1a6961f59da5c..dbd6d4ef3ccb4 100644 --- a/tests/baselines/reference/bangInModuleName.js +++ b/tests/baselines/reference/bangInModuleName.js @@ -18,5 +18,5 @@ import * as http from 'intern/dojo/node!http'; /// define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/baseConstraintOfDecorator.js b/tests/baselines/reference/baseConstraintOfDecorator.js index 0bceaca2509a5..4902051136a62 100644 --- a/tests/baselines/reference/baseConstraintOfDecorator.js +++ b/tests/baselines/reference/baseConstraintOfDecorator.js @@ -21,7 +21,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function classExtender(superClass, _instanceModifier) { return (function (_super) { __extends(decoratorFunc, _super); diff --git a/tests/baselines/reference/bluebirdStaticThis.js b/tests/baselines/reference/bluebirdStaticThis.js index 1d8d8f2ec43a2..65dc2ece9788e 100644 --- a/tests/baselines/reference/bluebirdStaticThis.js +++ b/tests/baselines/reference/bluebirdStaticThis.js @@ -140,17 +140,17 @@ fooProm = Promise.try(Promise, () => { //// [bluebirdStaticThis.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; var arr; var foo; var fooProm; -fooProm = Promise["try"](Promise, function () { +fooProm = Promise.try(Promise, function () { return foo; }); -fooProm = Promise["try"](Promise, function () { +fooProm = Promise.try(Promise, function () { return foo; }, arr); -fooProm = Promise["try"](Promise, function () { +fooProm = Promise.try(Promise, function () { return foo; }, arr, x); diff --git a/tests/baselines/reference/cacheResolutions.js b/tests/baselines/reference/cacheResolutions.js index 8c986c8fa14dd..ff71f2e722326 100644 --- a/tests/baselines/reference/cacheResolutions.js +++ b/tests/baselines/reference/cacheResolutions.js @@ -12,18 +12,18 @@ export let x = 1; //// [app.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [lib1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [lib2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); diff --git a/tests/baselines/reference/cachedModuleResolution1.js b/tests/baselines/reference/cachedModuleResolution1.js index cd83308f922cf..2a8211b1e600f 100644 --- a/tests/baselines/reference/cachedModuleResolution1.js +++ b/tests/baselines/reference/cachedModuleResolution1.js @@ -11,7 +11,7 @@ import {x} from "foo"; //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution2.js b/tests/baselines/reference/cachedModuleResolution2.js index 8ecb42a32ae04..d649b3c53ee37 100644 --- a/tests/baselines/reference/cachedModuleResolution2.js +++ b/tests/baselines/reference/cachedModuleResolution2.js @@ -12,7 +12,7 @@ import {x} from "foo"; //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution3.js b/tests/baselines/reference/cachedModuleResolution3.js index f5da694009969..3fce23e3f228c 100644 --- a/tests/baselines/reference/cachedModuleResolution3.js +++ b/tests/baselines/reference/cachedModuleResolution3.js @@ -11,7 +11,7 @@ import {x} from "foo"; //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution4.js b/tests/baselines/reference/cachedModuleResolution4.js index f5417960d4692..2236fdf34ce4c 100644 --- a/tests/baselines/reference/cachedModuleResolution4.js +++ b/tests/baselines/reference/cachedModuleResolution4.js @@ -12,7 +12,7 @@ import {x} from "foo"; //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution5.js b/tests/baselines/reference/cachedModuleResolution5.js index 4fe641e917e61..dee5a46122c61 100644 --- a/tests/baselines/reference/cachedModuleResolution5.js +++ b/tests/baselines/reference/cachedModuleResolution5.js @@ -11,7 +11,7 @@ import {x} from "foo"; //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution6.js b/tests/baselines/reference/cachedModuleResolution6.js index 364ad55aa6ce1..8a19b1465bc61 100644 --- a/tests/baselines/reference/cachedModuleResolution6.js +++ b/tests/baselines/reference/cachedModuleResolution6.js @@ -8,7 +8,7 @@ import {x} from "foo"; //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution7.js b/tests/baselines/reference/cachedModuleResolution7.js index 9b103fdd9bf16..8c9855b143520 100644 --- a/tests/baselines/reference/cachedModuleResolution7.js +++ b/tests/baselines/reference/cachedModuleResolution7.js @@ -9,7 +9,7 @@ import {x} from "foo"; //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution8.js b/tests/baselines/reference/cachedModuleResolution8.js index 9e8b67fabf7ae..c071c1dbf94ec 100644 --- a/tests/baselines/reference/cachedModuleResolution8.js +++ b/tests/baselines/reference/cachedModuleResolution8.js @@ -8,7 +8,7 @@ import {x} from "foo"; //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/cachedModuleResolution9.js b/tests/baselines/reference/cachedModuleResolution9.js index 8de0a1ff17340..17ef035df3a8c 100644 --- a/tests/baselines/reference/cachedModuleResolution9.js +++ b/tests/baselines/reference/cachedModuleResolution9.js @@ -10,7 +10,7 @@ import {x} from "foo"; //// [lib.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/chainedImportAlias.js b/tests/baselines/reference/chainedImportAlias.js index 8fcdd501707c4..52ed01c77b170 100644 --- a/tests/baselines/reference/chainedImportAlias.js +++ b/tests/baselines/reference/chainedImportAlias.js @@ -13,7 +13,7 @@ y.m.foo(); //// [chainedImportAlias_file0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m; (function (m) { function foo() { } @@ -21,7 +21,7 @@ var m; })(m = exports.m || (exports.m = {})); //// [chainedImportAlias_file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = require("./chainedImportAlias_file0"); var y = x; y.m.foo(); diff --git a/tests/baselines/reference/checkJsxChildrenProperty1.js b/tests/baselines/reference/checkJsxChildrenProperty1.js index 44c1ca8a72945..8609e012d74f0 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty1.js +++ b/tests/baselines/reference/checkJsxChildrenProperty1.js @@ -24,7 +24,7 @@ let k2 = //// [file.jsx] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function Comp(p) { return
{p.b}
; diff --git a/tests/baselines/reference/checkJsxChildrenProperty2.js b/tests/baselines/reference/checkJsxChildrenProperty2.js index dd92bb5dba899..ff7b6585188b1 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty2.js +++ b/tests/baselines/reference/checkJsxChildrenProperty2.js @@ -54,7 +54,7 @@ let k5 = //// [file.jsx] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function Comp(p) { return
{p.b}
; diff --git a/tests/baselines/reference/checkJsxChildrenProperty3.js b/tests/baselines/reference/checkJsxChildrenProperty3.js index 49247925523d0..eb589a41de0d8 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty3.js +++ b/tests/baselines/reference/checkJsxChildrenProperty3.js @@ -51,7 +51,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var FetchUser = (function (_super) { __extends(FetchUser, _super); diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.js b/tests/baselines/reference/checkJsxChildrenProperty4.js index d163ffb0f41b5..4c56807a69a99 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.js +++ b/tests/baselines/reference/checkJsxChildrenProperty4.js @@ -56,7 +56,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var FetchUser = (function (_super) { __extends(FetchUser, _super); diff --git a/tests/baselines/reference/checkJsxChildrenProperty5.js b/tests/baselines/reference/checkJsxChildrenProperty5.js index a08dae2f25214..3bae0a003ee86 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty5.js +++ b/tests/baselines/reference/checkJsxChildrenProperty5.js @@ -42,7 +42,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Button = (function (_super) { __extends(Button, _super); diff --git a/tests/baselines/reference/checkJsxChildrenProperty6.js b/tests/baselines/reference/checkJsxChildrenProperty6.js index e433bc520dbe3..657b769e03b92 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty6.js +++ b/tests/baselines/reference/checkJsxChildrenProperty6.js @@ -55,7 +55,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Button = (function (_super) { __extends(Button, _super); diff --git a/tests/baselines/reference/checkJsxChildrenProperty7.js b/tests/baselines/reference/checkJsxChildrenProperty7.js index 6a82233f0bc09..009793aa89334 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty7.js +++ b/tests/baselines/reference/checkJsxChildrenProperty7.js @@ -40,7 +40,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Button = (function (_super) { __extends(Button, _super); diff --git a/tests/baselines/reference/checkJsxChildrenProperty8.js b/tests/baselines/reference/checkJsxChildrenProperty8.js index a2cd6a43fa500..6e285e6fd8e5c 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty8.js +++ b/tests/baselines/reference/checkJsxChildrenProperty8.js @@ -41,7 +41,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Button = (function (_super) { __extends(Button, _super); diff --git a/tests/baselines/reference/checkJsxChildrenProperty9.js b/tests/baselines/reference/checkJsxChildrenProperty9.js index 017fb3ac41fa6..c1f0c893aac73 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty9.js +++ b/tests/baselines/reference/checkJsxChildrenProperty9.js @@ -8,7 +8,7 @@ let k3 =
{1} {"That is a number"}
; //// [file.jsx] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); // OK var k1 =

Hello

world

; diff --git a/tests/baselines/reference/circularReference.js b/tests/baselines/reference/circularReference.js index 198a886f0267c..f835e928f0837 100644 --- a/tests/baselines/reference/circularReference.js +++ b/tests/baselines/reference/circularReference.js @@ -35,7 +35,7 @@ export module M1 { //// [foo1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo2 = require("./foo2"); var M1; (function (M1) { @@ -51,7 +51,7 @@ var M1; })(M1 = exports.M1 || (exports.M1 = {})); //// [foo2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo1 = require("./foo1"); var M1; (function (M1) { diff --git a/tests/baselines/reference/circularReferenceInImport.js b/tests/baselines/reference/circularReferenceInImport.js index 432a03d090cac..b9ad09c687b48 100644 --- a/tests/baselines/reference/circularReferenceInImport.js +++ b/tests/baselines/reference/circularReferenceInImport.js @@ -16,7 +16,7 @@ export function foo() { //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return new Object(); } diff --git a/tests/baselines/reference/classAbstractManyKeywords.js b/tests/baselines/reference/classAbstractManyKeywords.js index c2af09eb4d8f8..64d8f54fe8ca1 100644 --- a/tests/baselines/reference/classAbstractManyKeywords.js +++ b/tests/baselines/reference/classAbstractManyKeywords.js @@ -6,13 +6,13 @@ import abstract class D {} //// [classAbstractManyKeywords.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } return A; }()); -exports["default"] = A; +exports.default = A; var B = (function () { function B() { } diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js index d4df05f2ea353..5a3f3fad9a33d 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping3.js @@ -21,7 +21,7 @@ export class Test1 { var field1; //// [classMemberInitializerWithLamdaScoping3_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Test1 = (function () { function Test1(field1) { this.field1 = field1; diff --git a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js index 76835e757e074..f42478e397ca1 100644 --- a/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js +++ b/tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js @@ -17,10 +17,10 @@ export class Test1 { //// [classMemberInitializerWithLamdaScoping3_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [classMemberInitializerWithLamdaScoping3_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Test1 = (function () { function Test1(field1) { this.field1 = field1; diff --git a/tests/baselines/reference/classMethodWithKeywordName1.js b/tests/baselines/reference/classMethodWithKeywordName1.js index a7cb994bfb397..6e1faee005cc0 100644 --- a/tests/baselines/reference/classMethodWithKeywordName1.js +++ b/tests/baselines/reference/classMethodWithKeywordName1.js @@ -7,6 +7,6 @@ class C { var C = (function () { function C() { } - C["try"] = function () { }; + C.try = function () { }; return C; }()); diff --git a/tests/baselines/reference/classPropertyAsPrivate.errors.txt b/tests/baselines/reference/classPropertyAsPrivate.errors.txt index 4cc38cb049f34..62dc6a6e77477 100644 --- a/tests/baselines/reference/classPropertyAsPrivate.errors.txt +++ b/tests/baselines/reference/classPropertyAsPrivate.errors.txt @@ -1,7 +1,3 @@ -tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(3,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(4,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(8,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(9,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(15,3): error TS2341: Property 'x' is private and only accessible within class 'C'. tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(16,3): error TS2341: Property 'y' is private and only accessible within class 'C'. tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(17,3): error TS2341: Property 'y' is private and only accessible within class 'C'. @@ -12,24 +8,16 @@ tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts( tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts(23,3): error TS2341: Property 'foo' is private and only accessible within class 'C'. -==== tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts (12 errors) ==== +==== tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts (8 errors) ==== class C { private x: string; private get y() { return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private set y(x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private foo() { } private static a: string; private static get b() { return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set b(x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static foo() { } } diff --git a/tests/baselines/reference/classPropertyAsProtected.errors.txt b/tests/baselines/reference/classPropertyAsProtected.errors.txt index acfba42f9e3fb..e1eda21b9eba2 100644 --- a/tests/baselines/reference/classPropertyAsProtected.errors.txt +++ b/tests/baselines/reference/classPropertyAsProtected.errors.txt @@ -1,7 +1,3 @@ -tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(3,19): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(4,19): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(8,26): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(9,26): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(15,3): error TS2445: Property 'x' is protected and only accessible within class 'C' and its subclasses. tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(16,3): error TS2445: Property 'y' is protected and only accessible within class 'C' and its subclasses. tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(17,3): error TS2445: Property 'y' is protected and only accessible within class 'C' and its subclasses. @@ -12,24 +8,16 @@ tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.t tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts(23,3): error TS2445: Property 'foo' is protected and only accessible within class 'C' and its subclasses. -==== tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts (12 errors) ==== +==== tests/cases/conformance/classes/members/accessibility/classPropertyAsProtected.ts (8 errors) ==== class C { protected x: string; protected get y() { return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. protected set y(x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. protected foo() { } protected static a: string; protected static get b() { return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. protected static set b(x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. protected static foo() { } } diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt b/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt deleted file mode 100644 index 1d200f6e2e797..0000000000000 --- a/tests/baselines/reference/classPropertyIsPublicByDefault.errors.txt +++ /dev/null @@ -1,37 +0,0 @@ -tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts (4 errors) ==== - class C { - x: string; - get y() { return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set y(x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - foo() { } - - static a: string; - static get b() { return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set b(x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static foo() { } - } - - var c: C; - c.x; - c.y; - c.y = 1; - c.foo(); - - C.a; - C.b(); - C.b = 1; - C.foo(); \ No newline at end of file diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.symbols b/tests/baselines/reference/classPropertyIsPublicByDefault.symbols new file mode 100644 index 0000000000000..5ef62364af752 --- /dev/null +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.symbols @@ -0,0 +1,75 @@ +=== tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts === +class C { +>C : Symbol(C, Decl(classPropertyIsPublicByDefault.ts, 0, 0)) + + x: string; +>x : Symbol(C.x, Decl(classPropertyIsPublicByDefault.ts, 0, 9)) + + get y() { return null; } +>y : Symbol(C.y, Decl(classPropertyIsPublicByDefault.ts, 1, 14), Decl(classPropertyIsPublicByDefault.ts, 2, 28)) + + set y(x) { } +>y : Symbol(C.y, Decl(classPropertyIsPublicByDefault.ts, 1, 14), Decl(classPropertyIsPublicByDefault.ts, 2, 28)) +>x : Symbol(x, Decl(classPropertyIsPublicByDefault.ts, 3, 10)) + + foo() { } +>foo : Symbol(C.foo, Decl(classPropertyIsPublicByDefault.ts, 3, 16)) + + static a: string; +>a : Symbol(C.a, Decl(classPropertyIsPublicByDefault.ts, 4, 13)) + + static get b() { return null; } +>b : Symbol(C.b, Decl(classPropertyIsPublicByDefault.ts, 6, 21), Decl(classPropertyIsPublicByDefault.ts, 7, 35)) + + static set b(x) { } +>b : Symbol(C.b, Decl(classPropertyIsPublicByDefault.ts, 6, 21), Decl(classPropertyIsPublicByDefault.ts, 7, 35)) +>x : Symbol(x, Decl(classPropertyIsPublicByDefault.ts, 8, 17)) + + static foo() { } +>foo : Symbol(C.foo, Decl(classPropertyIsPublicByDefault.ts, 8, 23)) +} + +var c: C; +>c : Symbol(c, Decl(classPropertyIsPublicByDefault.ts, 12, 3)) +>C : Symbol(C, Decl(classPropertyIsPublicByDefault.ts, 0, 0)) + +c.x; +>c.x : Symbol(C.x, Decl(classPropertyIsPublicByDefault.ts, 0, 9)) +>c : Symbol(c, Decl(classPropertyIsPublicByDefault.ts, 12, 3)) +>x : Symbol(C.x, Decl(classPropertyIsPublicByDefault.ts, 0, 9)) + +c.y; +>c.y : Symbol(C.y, Decl(classPropertyIsPublicByDefault.ts, 1, 14), Decl(classPropertyIsPublicByDefault.ts, 2, 28)) +>c : Symbol(c, Decl(classPropertyIsPublicByDefault.ts, 12, 3)) +>y : Symbol(C.y, Decl(classPropertyIsPublicByDefault.ts, 1, 14), Decl(classPropertyIsPublicByDefault.ts, 2, 28)) + +c.y = 1; +>c.y : Symbol(C.y, Decl(classPropertyIsPublicByDefault.ts, 1, 14), Decl(classPropertyIsPublicByDefault.ts, 2, 28)) +>c : Symbol(c, Decl(classPropertyIsPublicByDefault.ts, 12, 3)) +>y : Symbol(C.y, Decl(classPropertyIsPublicByDefault.ts, 1, 14), Decl(classPropertyIsPublicByDefault.ts, 2, 28)) + +c.foo(); +>c.foo : Symbol(C.foo, Decl(classPropertyIsPublicByDefault.ts, 3, 16)) +>c : Symbol(c, Decl(classPropertyIsPublicByDefault.ts, 12, 3)) +>foo : Symbol(C.foo, Decl(classPropertyIsPublicByDefault.ts, 3, 16)) + +C.a; +>C.a : Symbol(C.a, Decl(classPropertyIsPublicByDefault.ts, 4, 13)) +>C : Symbol(C, Decl(classPropertyIsPublicByDefault.ts, 0, 0)) +>a : Symbol(C.a, Decl(classPropertyIsPublicByDefault.ts, 4, 13)) + +C.b(); +>C.b : Symbol(C.b, Decl(classPropertyIsPublicByDefault.ts, 6, 21), Decl(classPropertyIsPublicByDefault.ts, 7, 35)) +>C : Symbol(C, Decl(classPropertyIsPublicByDefault.ts, 0, 0)) +>b : Symbol(C.b, Decl(classPropertyIsPublicByDefault.ts, 6, 21), Decl(classPropertyIsPublicByDefault.ts, 7, 35)) + +C.b = 1; +>C.b : Symbol(C.b, Decl(classPropertyIsPublicByDefault.ts, 6, 21), Decl(classPropertyIsPublicByDefault.ts, 7, 35)) +>C : Symbol(C, Decl(classPropertyIsPublicByDefault.ts, 0, 0)) +>b : Symbol(C.b, Decl(classPropertyIsPublicByDefault.ts, 6, 21), Decl(classPropertyIsPublicByDefault.ts, 7, 35)) + +C.foo(); +>C.foo : Symbol(C.foo, Decl(classPropertyIsPublicByDefault.ts, 8, 23)) +>C : Symbol(C, Decl(classPropertyIsPublicByDefault.ts, 0, 0)) +>foo : Symbol(C.foo, Decl(classPropertyIsPublicByDefault.ts, 8, 23)) + diff --git a/tests/baselines/reference/classPropertyIsPublicByDefault.types b/tests/baselines/reference/classPropertyIsPublicByDefault.types new file mode 100644 index 0000000000000..24f18b8a1a454 --- /dev/null +++ b/tests/baselines/reference/classPropertyIsPublicByDefault.types @@ -0,0 +1,84 @@ +=== tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts === +class C { +>C : C + + x: string; +>x : string + + get y() { return null; } +>y : any +>null : null + + set y(x) { } +>y : any +>x : any + + foo() { } +>foo : () => void + + static a: string; +>a : string + + static get b() { return null; } +>b : any +>null : null + + static set b(x) { } +>b : any +>x : any + + static foo() { } +>foo : () => void +} + +var c: C; +>c : C +>C : C + +c.x; +>c.x : string +>c : C +>x : string + +c.y; +>c.y : any +>c : C +>y : any + +c.y = 1; +>c.y = 1 : 1 +>c.y : any +>c : C +>y : any +>1 : 1 + +c.foo(); +>c.foo() : void +>c.foo : () => void +>c : C +>foo : () => void + +C.a; +>C.a : string +>C : typeof C +>a : string + +C.b(); +>C.b() : any +>C.b : any +>C : typeof C +>b : any + +C.b = 1; +>C.b = 1 : 1 +>C.b : any +>C : typeof C +>b : any +>1 : 1 + +C.foo(); +>C.foo() : void +>C.foo : () => void +>C : typeof C +>foo : () => void + diff --git a/tests/baselines/reference/classWithStaticMembers.errors.txt b/tests/baselines/reference/classWithStaticMembers.errors.txt deleted file mode 100644 index 814cb9343e8a4..0000000000000 --- a/tests/baselines/reference/classWithStaticMembers.errors.txt +++ /dev/null @@ -1,28 +0,0 @@ -tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts(4,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts (2 errors) ==== - class C { - static fn() { return this; } - static get x() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set x(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - constructor(public a: number, private b: number) { } - static foo: string; - } - - var r = C.fn(); - var r2 = r.x; - var r3 = r.foo; - - class D extends C { - bar: string; - } - - var r = D.fn(); - var r2 = r.x; - var r3 = r.foo; \ No newline at end of file diff --git a/tests/baselines/reference/classWithStaticMembers.symbols b/tests/baselines/reference/classWithStaticMembers.symbols new file mode 100644 index 0000000000000..3c52f7f8052a1 --- /dev/null +++ b/tests/baselines/reference/classWithStaticMembers.symbols @@ -0,0 +1,67 @@ +=== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts === +class C { +>C : Symbol(C, Decl(classWithStaticMembers.ts, 0, 0)) + + static fn() { return this; } +>fn : Symbol(C.fn, Decl(classWithStaticMembers.ts, 0, 9)) +>this : Symbol(C, Decl(classWithStaticMembers.ts, 0, 0)) + + static get x() { return 1; } +>x : Symbol(C.x, Decl(classWithStaticMembers.ts, 1, 32), Decl(classWithStaticMembers.ts, 2, 32)) + + static set x(v) { } +>x : Symbol(C.x, Decl(classWithStaticMembers.ts, 1, 32), Decl(classWithStaticMembers.ts, 2, 32)) +>v : Symbol(v, Decl(classWithStaticMembers.ts, 3, 17)) + + constructor(public a: number, private b: number) { } +>a : Symbol(C.a, Decl(classWithStaticMembers.ts, 4, 16)) +>b : Symbol(C.b, Decl(classWithStaticMembers.ts, 4, 33)) + + static foo: string; +>foo : Symbol(C.foo, Decl(classWithStaticMembers.ts, 4, 56)) +} + +var r = C.fn(); +>r : Symbol(r, Decl(classWithStaticMembers.ts, 8, 3), Decl(classWithStaticMembers.ts, 16, 3)) +>C.fn : Symbol(C.fn, Decl(classWithStaticMembers.ts, 0, 9)) +>C : Symbol(C, Decl(classWithStaticMembers.ts, 0, 0)) +>fn : Symbol(C.fn, Decl(classWithStaticMembers.ts, 0, 9)) + +var r2 = r.x; +>r2 : Symbol(r2, Decl(classWithStaticMembers.ts, 9, 3), Decl(classWithStaticMembers.ts, 17, 3)) +>r.x : Symbol(C.x, Decl(classWithStaticMembers.ts, 1, 32), Decl(classWithStaticMembers.ts, 2, 32)) +>r : Symbol(r, Decl(classWithStaticMembers.ts, 8, 3), Decl(classWithStaticMembers.ts, 16, 3)) +>x : Symbol(C.x, Decl(classWithStaticMembers.ts, 1, 32), Decl(classWithStaticMembers.ts, 2, 32)) + +var r3 = r.foo; +>r3 : Symbol(r3, Decl(classWithStaticMembers.ts, 10, 3), Decl(classWithStaticMembers.ts, 18, 3)) +>r.foo : Symbol(C.foo, Decl(classWithStaticMembers.ts, 4, 56)) +>r : Symbol(r, Decl(classWithStaticMembers.ts, 8, 3), Decl(classWithStaticMembers.ts, 16, 3)) +>foo : Symbol(C.foo, Decl(classWithStaticMembers.ts, 4, 56)) + +class D extends C { +>D : Symbol(D, Decl(classWithStaticMembers.ts, 10, 15)) +>C : Symbol(C, Decl(classWithStaticMembers.ts, 0, 0)) + + bar: string; +>bar : Symbol(D.bar, Decl(classWithStaticMembers.ts, 12, 19)) +} + +var r = D.fn(); +>r : Symbol(r, Decl(classWithStaticMembers.ts, 8, 3), Decl(classWithStaticMembers.ts, 16, 3)) +>D.fn : Symbol(C.fn, Decl(classWithStaticMembers.ts, 0, 9)) +>D : Symbol(D, Decl(classWithStaticMembers.ts, 10, 15)) +>fn : Symbol(C.fn, Decl(classWithStaticMembers.ts, 0, 9)) + +var r2 = r.x; +>r2 : Symbol(r2, Decl(classWithStaticMembers.ts, 9, 3), Decl(classWithStaticMembers.ts, 17, 3)) +>r.x : Symbol(C.x, Decl(classWithStaticMembers.ts, 1, 32), Decl(classWithStaticMembers.ts, 2, 32)) +>r : Symbol(r, Decl(classWithStaticMembers.ts, 8, 3), Decl(classWithStaticMembers.ts, 16, 3)) +>x : Symbol(C.x, Decl(classWithStaticMembers.ts, 1, 32), Decl(classWithStaticMembers.ts, 2, 32)) + +var r3 = r.foo; +>r3 : Symbol(r3, Decl(classWithStaticMembers.ts, 10, 3), Decl(classWithStaticMembers.ts, 18, 3)) +>r.foo : Symbol(C.foo, Decl(classWithStaticMembers.ts, 4, 56)) +>r : Symbol(r, Decl(classWithStaticMembers.ts, 8, 3), Decl(classWithStaticMembers.ts, 16, 3)) +>foo : Symbol(C.foo, Decl(classWithStaticMembers.ts, 4, 56)) + diff --git a/tests/baselines/reference/classWithStaticMembers.types b/tests/baselines/reference/classWithStaticMembers.types new file mode 100644 index 0000000000000..aee780fc0e6a1 --- /dev/null +++ b/tests/baselines/reference/classWithStaticMembers.types @@ -0,0 +1,70 @@ +=== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts === +class C { +>C : C + + static fn() { return this; } +>fn : () => typeof C +>this : typeof C + + static get x() { return 1; } +>x : number +>1 : 1 + + static set x(v) { } +>x : number +>v : number + + constructor(public a: number, private b: number) { } +>a : number +>b : number + + static foo: string; +>foo : string +} + +var r = C.fn(); +>r : typeof C +>C.fn() : typeof C +>C.fn : () => typeof C +>C : typeof C +>fn : () => typeof C + +var r2 = r.x; +>r2 : number +>r.x : number +>r : typeof C +>x : number + +var r3 = r.foo; +>r3 : string +>r.foo : string +>r : typeof C +>foo : string + +class D extends C { +>D : D +>C : C + + bar: string; +>bar : string +} + +var r = D.fn(); +>r : typeof C +>D.fn() : typeof C +>D.fn : () => typeof C +>D : typeof D +>fn : () => typeof C + +var r2 = r.x; +>r2 : number +>r.x : number +>r : typeof C +>x : number + +var r3 = r.foo; +>r3 : string +>r.foo : string +>r : typeof C +>foo : string + diff --git a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt index 914088f6c1925..f1ba6b73571a3 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember1.errors.txt @@ -1,5 +1,3 @@ -tests/cases/compiler/cloduleWithDuplicateMember1.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/cloduleWithDuplicateMember1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/cloduleWithDuplicateMember1.ts(3,16): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/cloduleWithDuplicateMember1.ts(6,12): error TS2300: Duplicate identifier 'foo'. tests/cases/compiler/cloduleWithDuplicateMember1.ts(10,16): error TS2300: Duplicate identifier 'x'. @@ -7,15 +5,11 @@ tests/cases/compiler/cloduleWithDuplicateMember1.ts(13,21): error TS2300: Duplic tests/cases/compiler/cloduleWithDuplicateMember1.ts(14,21): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/cloduleWithDuplicateMember1.ts (7 errors) ==== +==== tests/cases/compiler/cloduleWithDuplicateMember1.ts (5 errors) ==== class C { get x() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get x() { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. return ''; } diff --git a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt index 55d2fdbddf26c..fee68785cbba3 100644 --- a/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt +++ b/tests/baselines/reference/cloduleWithDuplicateMember2.errors.txt @@ -1,17 +1,11 @@ -tests/cases/compiler/cloduleWithDuplicateMember2.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/cloduleWithDuplicateMember2.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/cloduleWithDuplicateMember2.ts(7,16): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/cloduleWithDuplicateMember2.ts(10,21): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/cloduleWithDuplicateMember2.ts (4 errors) ==== +==== tests/cases/compiler/cloduleWithDuplicateMember2.ts (2 errors) ==== class C { set x(y) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set y(z) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } module C { diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt deleted file mode 100644 index 9ba074a1cae23..0000000000000 --- a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.errors.txt +++ /dev/null @@ -1,63 +0,0 @@ -tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(14,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(24,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(32,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts(41,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts (5 errors) ==== - module M { - export var x = 3; - class c { - private y; - set Z(M) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - this.y = x; - } - } - } - - module M { - class d { - private y; - set Z(p) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var M = 10; - this.y = x; - } - } - } - - module M { // Shouldnt be _M - class e { - private y; - set M(p) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - this.y = x; - } - } - } - - module M { - class f { - get Z() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var M = 10; - return x; - } - } - } - - module M { // Shouldnt be _M - class e { - get M() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return x; - } - } - } \ No newline at end of file diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.symbols b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.symbols new file mode 100644 index 0000000000000..d3236ab72cb7b --- /dev/null +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.symbols @@ -0,0 +1,105 @@ +=== tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts === +module M { +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) + + export var x = 3; +>x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) + + class c { +>c : Symbol(c, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 21)) + + private y; +>y : Symbol(c.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 2, 13)) + + set Z(M) { +>Z : Symbol(c.Z, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 3, 18)) +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 4, 14)) + + this.y = x; +>this.y : Symbol(c.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 2, 13)) +>this : Symbol(c, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 21)) +>y : Symbol(c.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 2, 13)) +>x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) + } + } +} + +module M { +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) + + class d { +>d : Symbol(d, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 10, 10)) + + private y; +>y : Symbol(d.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 11, 13)) + + set Z(p) { +>Z : Symbol(d.Z, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 12, 18)) +>p : Symbol(p, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 13, 14)) + + var M = 10; +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 14, 15)) + + this.y = x; +>this.y : Symbol(d.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 11, 13)) +>this : Symbol(d, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 10, 10)) +>y : Symbol(d.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 11, 13)) +>x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) + } + } +} + +module M { // Shouldnt be _M +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) + + class e { +>e : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 20, 10)) + + private y; +>y : Symbol(e.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 21, 13)) + + set M(p) { +>M : Symbol(e.M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 22, 18)) +>p : Symbol(p, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 23, 14)) + + this.y = x; +>this.y : Symbol(e.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 21, 13)) +>this : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 20, 10)) +>y : Symbol(e.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 21, 13)) +>x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) + } + } +} + +module M { +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) + + class f { +>f : Symbol(f, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 29, 10)) + + get Z() { +>Z : Symbol(f.Z, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 30, 13)) + + var M = 10; +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 32, 15)) + + return x; +>x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) + } + } +} + +module M { // Shouldnt be _M +>M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) + + class e { +>e : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 38, 10)) + + get M() { +>M : Symbol(e.M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 39, 13)) + + return x; +>x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) + } + } +} diff --git a/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types new file mode 100644 index 0000000000000..121c9bda818fd --- /dev/null +++ b/tests/baselines/reference/collisionCodeGenModuleWithAccessorChildren.types @@ -0,0 +1,111 @@ +=== tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts === +module M { +>M : typeof M + + export var x = 3; +>x : number +>3 : 3 + + class c { +>c : c + + private y; +>y : any + + set Z(M) { +>Z : any +>M : any + + this.y = x; +>this.y = x : number +>this.y : any +>this : this +>y : any +>x : number + } + } +} + +module M { +>M : typeof M + + class d { +>d : d + + private y; +>y : any + + set Z(p) { +>Z : any +>p : any + + var M = 10; +>M : number +>10 : 10 + + this.y = x; +>this.y = x : number +>this.y : any +>this : this +>y : any +>x : number + } + } +} + +module M { // Shouldnt be _M +>M : typeof M + + class e { +>e : e + + private y; +>y : any + + set M(p) { +>M : any +>p : any + + this.y = x; +>this.y = x : number +>this.y : any +>this : this +>y : any +>x : number + } + } +} + +module M { +>M : typeof M + + class f { +>f : f + + get Z() { +>Z : number + + var M = 10; +>M : number +>10 : 10 + + return x; +>x : number + } + } +} + +module M { // Shouldnt be _M +>M : typeof M + + class e { +>e : e + + get M() { +>M : number + + return x; +>x : number + } + } +} diff --git a/tests/baselines/reference/collisionExportsRequireAndAlias.js b/tests/baselines/reference/collisionExportsRequireAndAlias.js index 487553bb00492..15c1754e75875 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAlias.js +++ b/tests/baselines/reference/collisionExportsRequireAndAlias.js @@ -20,7 +20,7 @@ export function foo2() { //// [collisionExportsRequireAndAlias_file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function bar() { } exports.bar = bar; @@ -28,7 +28,7 @@ define(["require", "exports"], function (require, exports) { //// [collisionExportsRequireAndAlias_file3333.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function bar2() { } exports.bar2 = bar2; @@ -36,7 +36,7 @@ define(["require", "exports"], function (require, exports) { //// [collisionExportsRequireAndAlias_file2.js] define(["require", "exports", "collisionExportsRequireAndAlias_file1", "collisionExportsRequireAndAlias_file3333"], function (require, exports, require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo() { require.bar(); } diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js b/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js index 1a16f4a2d5f95..19e18fec62ed9 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientClass.js @@ -40,7 +40,7 @@ module m4 { //// [collisionExportsRequireAndAmbientClass_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m2; (function (m2) { })(m2 || (m2 = {})); diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js b/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js index 0e717b01d3bd0..d34102f1bbd2a 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientEnum.js @@ -63,7 +63,7 @@ module m4 { //// [collisionExportsRequireAndAmbientEnum_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m2; (function (m2) { })(m2 || (m2 = {})); diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js index 050799d4c2b7b..fe39d0d15e77f 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientFunction.js @@ -16,7 +16,7 @@ module m2 { //// [collisionExportsRequireAndAmbientFunction.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m2; (function (m2) { var a = 10; diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js index 2eb5ea74f920e..2aafba497b2b2 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientModule.js @@ -97,7 +97,7 @@ module m4 { //// [collisionExportsRequireAndAmbientModule_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return null; } diff --git a/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js b/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js index 8454248845a61..3599b9f4133ad 100644 --- a/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js +++ b/tests/baselines/reference/collisionExportsRequireAndAmbientVar.js @@ -29,7 +29,7 @@ module m4 { //// [collisionExportsRequireAndAmbientVar_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m2; (function (m2) { var a = 10; diff --git a/tests/baselines/reference/collisionExportsRequireAndClass.js b/tests/baselines/reference/collisionExportsRequireAndClass.js index 0bc56b97cf111..d963975219e69 100644 --- a/tests/baselines/reference/collisionExportsRequireAndClass.js +++ b/tests/baselines/reference/collisionExportsRequireAndClass.js @@ -39,7 +39,7 @@ module m4 { //// [collisionExportsRequireAndClass_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var require = (function () { function require() { } diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.js b/tests/baselines/reference/collisionExportsRequireAndEnum.js index 4bb6614ffe768..d2367cfd77b5b 100644 --- a/tests/baselines/reference/collisionExportsRequireAndEnum.js +++ b/tests/baselines/reference/collisionExportsRequireAndEnum.js @@ -63,7 +63,7 @@ module m4 { //// [collisionExportsRequireAndEnum_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var require; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; diff --git a/tests/baselines/reference/collisionExportsRequireAndFunction.js b/tests/baselines/reference/collisionExportsRequireAndFunction.js index 1da8cf29d665f..1c0e19d3ca57e 100644 --- a/tests/baselines/reference/collisionExportsRequireAndFunction.js +++ b/tests/baselines/reference/collisionExportsRequireAndFunction.js @@ -25,7 +25,7 @@ module m2 { //// [collisionExportsRequireAndFunction.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function exports() { return 1; } diff --git a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js index 9cb3c4e797e0e..b6edbbbe0427f 100644 --- a/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js +++ b/tests/baselines/reference/collisionExportsRequireAndInternalModuleAlias.js @@ -25,7 +25,7 @@ module m2 { //// [collisionExportsRequireAndInternalModuleAlias.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m; (function (m) { var c = (function () { diff --git a/tests/baselines/reference/collisionExportsRequireAndModule.js b/tests/baselines/reference/collisionExportsRequireAndModule.js index 4282095500408..fbd7d6ead405a 100644 --- a/tests/baselines/reference/collisionExportsRequireAndModule.js +++ b/tests/baselines/reference/collisionExportsRequireAndModule.js @@ -94,7 +94,7 @@ module m4 { //// [collisionExportsRequireAndModule_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var require; (function (require) { var C = (function () { diff --git a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js index b9552c16223f2..042a5ca38e40c 100644 --- a/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js +++ b/tests/baselines/reference/collisionExportsRequireAndUninstantiatedModule.js @@ -17,7 +17,7 @@ export function foo2(): exports.I { //// [collisionExportsRequireAndUninstantiatedModule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return null; } diff --git a/tests/baselines/reference/collisionExportsRequireAndVar.js b/tests/baselines/reference/collisionExportsRequireAndVar.js index 9a20472ea685b..f7d5237c0c3b9 100644 --- a/tests/baselines/reference/collisionExportsRequireAndVar.js +++ b/tests/baselines/reference/collisionExportsRequireAndVar.js @@ -29,7 +29,7 @@ module m4 { //// [collisionExportsRequireAndVar_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo() { } exports.foo = foo; diff --git a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt index 16b4edced7be8..973ab2e67bb8d 100644 --- a/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalFunctionInAccessors.errors.txt @@ -1,37 +1,25 @@ -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(16,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(20,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(21,18): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(28,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(33,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -==== tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts (10 errors) ==== +==== tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts (4 errors) ==== function _super() { // No error } class Foo { get prop1(): number { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // No error } return 10; } set prop1(val: number) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // No error } } } class b extends Foo { get prop2(): number { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. @@ -39,8 +27,6 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,22): error return 10; } set prop2(val: number) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. function _super() { // Should be error ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. @@ -49,8 +35,6 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,22): error } class c extends Foo { get prop2(): number { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error ~~~~~~ @@ -60,8 +44,6 @@ tests/cases/compiler/collisionSuperAndLocalFunctionInAccessors.ts(35,22): error return 10; } set prop2(val: number) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { function _super() { // Should be error ~~~~~~ diff --git a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt index 7e0f80f0658c7..cfd0839bf543b 100644 --- a/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/collisionSuperAndLocalVarInAccessors.errors.txt @@ -1,42 +1,28 @@ -tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(13,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(17,13): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(21,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(23,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(27,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(29,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -==== tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts (10 errors) ==== +==== tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts (4 errors) ==== var _super = 10; // No Error class Foo { get prop1(): number { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // No error return 10; } set prop1(val: number) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // No error } } class b extends Foo { get prop2(): number { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // Should be error ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. return 10; } set prop2(val: number) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _super = 10; // Should be error ~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. @@ -44,8 +30,6 @@ tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(29,17): error TS240 } class c extends Foo { get prop2(): number { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { var _super = 10; // Should be error ~~~~~~ @@ -54,8 +38,6 @@ tests/cases/compiler/collisionSuperAndLocalVarInAccessors.ts(29,17): error TS240 return 10; } set prop2(val: number) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = () => { var _super = 10; // Should be error ~~~~~~ diff --git a/tests/baselines/reference/collisionSuperAndParameter.errors.txt b/tests/baselines/reference/collisionSuperAndParameter.errors.txt index 65dddd95d4883..c495d5a9ed3a1 100644 --- a/tests/baselines/reference/collisionSuperAndParameter.errors.txt +++ b/tests/baselines/reference/collisionSuperAndParameter.errors.txt @@ -1,7 +1,5 @@ -tests/cases/compiler/collisionSuperAndParameter.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndParameter.ts(17,22): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. tests/cases/compiler/collisionSuperAndParameter.ts(21,7): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -tests/cases/compiler/collisionSuperAndParameter.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionSuperAndParameter.ts(26,11): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. tests/cases/compiler/collisionSuperAndParameter.ts(32,19): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. tests/cases/compiler/collisionSuperAndParameter.ts(35,17): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. @@ -9,7 +7,7 @@ tests/cases/compiler/collisionSuperAndParameter.ts(52,17): error TS2401: Duplica tests/cases/compiler/collisionSuperAndParameter.ts(57,7): error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. -==== tests/cases/compiler/collisionSuperAndParameter.ts (9 errors) ==== +==== tests/cases/compiler/collisionSuperAndParameter.ts (7 errors) ==== class Foo { a() { var lamda = (_super: number) => { // No Error @@ -22,8 +20,6 @@ tests/cases/compiler/collisionSuperAndParameter.ts(57,7): error TS2401: Duplicat } } set c(_super: number) { // No error - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class Foo2 extends Foo { @@ -42,8 +38,6 @@ tests/cases/compiler/collisionSuperAndParameter.ts(57,7): error TS2401: Duplicat } } set z(_super: number) { // Error - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~~~~~ !!! error TS2401: Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference. } diff --git a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt index cbe371c5934b8..1ec1ab96410e3 100644 --- a/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt +++ b/tests/baselines/reference/collisionThisExpressionAndLocalVarInAccessors.errors.txt @@ -1,18 +1,12 @@ -tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(5,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. -tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(15,21): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. -tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(25,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. -tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(34,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(35,13): error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. -==== tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts (8 errors) ==== +==== tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts (4 errors) ==== class class1 { get a(): number { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; @@ -25,8 +19,6 @@ tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(35,13): er return 10; } set a(val: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x2 = { doStuff: (callback) => () => { var _this = 2; @@ -41,8 +33,6 @@ tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(35,13): er class class2 { get a(): number { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; ~~~~~ !!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. @@ -55,8 +45,6 @@ tests/cases/compiler/collisionThisExpressionAndLocalVarInAccessors.ts(35,13): er return 10; } set a(val: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var _this = 2; ~~~~~ !!! error TS2399: Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference. diff --git a/tests/baselines/reference/commentOnClassAccessor1.errors.txt b/tests/baselines/reference/commentOnClassAccessor1.errors.txt deleted file mode 100644 index 4ec9a1e1052e8..0000000000000 --- a/tests/baselines/reference/commentOnClassAccessor1.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -tests/cases/compiler/commentOnClassAccessor1.ts(5,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/commentOnClassAccessor1.ts (1 errors) ==== - class C { - /** - * @type {number} - */ - get bar(): number { return 1;} - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/commentOnClassAccessor1.symbols b/tests/baselines/reference/commentOnClassAccessor1.symbols new file mode 100644 index 0000000000000..d539344b51014 --- /dev/null +++ b/tests/baselines/reference/commentOnClassAccessor1.symbols @@ -0,0 +1,10 @@ +=== tests/cases/compiler/commentOnClassAccessor1.ts === +class C { +>C : Symbol(C, Decl(commentOnClassAccessor1.ts, 0, 0)) + + /** + * @type {number} + */ + get bar(): number { return 1;} +>bar : Symbol(C.bar, Decl(commentOnClassAccessor1.ts, 0, 9)) +} diff --git a/tests/baselines/reference/commentOnClassAccessor1.types b/tests/baselines/reference/commentOnClassAccessor1.types new file mode 100644 index 0000000000000..afdf3c016b5cf --- /dev/null +++ b/tests/baselines/reference/commentOnClassAccessor1.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/commentOnClassAccessor1.ts === +class C { +>C : C + + /** + * @type {number} + */ + get bar(): number { return 1;} +>bar : number +>1 : 1 +} diff --git a/tests/baselines/reference/commentOnClassAccessor2.errors.txt b/tests/baselines/reference/commentOnClassAccessor2.errors.txt deleted file mode 100644 index 959a708e05cfc..0000000000000 --- a/tests/baselines/reference/commentOnClassAccessor2.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -tests/cases/compiler/commentOnClassAccessor2.ts(5,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/commentOnClassAccessor2.ts(10,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/commentOnClassAccessor2.ts (2 errors) ==== - class C { - /** - * Getter. - */ - get bar(): number { return 1;} - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - /** - * Setter. - */ - set bar(v) { } - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/commentOnClassAccessor2.symbols b/tests/baselines/reference/commentOnClassAccessor2.symbols new file mode 100644 index 0000000000000..5eb9acd8309b2 --- /dev/null +++ b/tests/baselines/reference/commentOnClassAccessor2.symbols @@ -0,0 +1,17 @@ +=== tests/cases/compiler/commentOnClassAccessor2.ts === +class C { +>C : Symbol(C, Decl(commentOnClassAccessor2.ts, 0, 0)) + + /** + * Getter. + */ + get bar(): number { return 1;} +>bar : Symbol(C.bar, Decl(commentOnClassAccessor2.ts, 0, 9), Decl(commentOnClassAccessor2.ts, 4, 32)) + + /** + * Setter. + */ + set bar(v) { } +>bar : Symbol(C.bar, Decl(commentOnClassAccessor2.ts, 0, 9), Decl(commentOnClassAccessor2.ts, 4, 32)) +>v : Symbol(v, Decl(commentOnClassAccessor2.ts, 9, 10)) +} diff --git a/tests/baselines/reference/commentOnClassAccessor2.types b/tests/baselines/reference/commentOnClassAccessor2.types new file mode 100644 index 0000000000000..34f46135ae641 --- /dev/null +++ b/tests/baselines/reference/commentOnClassAccessor2.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/commentOnClassAccessor2.ts === +class C { +>C : C + + /** + * Getter. + */ + get bar(): number { return 1;} +>bar : number +>1 : 1 + + /** + * Setter. + */ + set bar(v) { } +>bar : number +>v : number +} diff --git a/tests/baselines/reference/commentOnExportEnumDeclaration.js b/tests/baselines/reference/commentOnExportEnumDeclaration.js index 353b70f4d3c08..7e2b0c9012d06 100644 --- a/tests/baselines/reference/commentOnExportEnumDeclaration.js +++ b/tests/baselines/reference/commentOnExportEnumDeclaration.js @@ -8,7 +8,7 @@ export enum Color { //// [commentOnExportEnumDeclaration.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /** * comment */ diff --git a/tests/baselines/reference/commentOnImportStatement1.js b/tests/baselines/reference/commentOnImportStatement1.js index a9d68d299ce19..a62c67e5c7f47 100644 --- a/tests/baselines/reference/commentOnImportStatement1.js +++ b/tests/baselines/reference/commentOnImportStatement1.js @@ -8,5 +8,5 @@ import foo = require('./foo'); /* Copyright */ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/commentOnImportStatement2.js b/tests/baselines/reference/commentOnImportStatement2.js index 5156fcdd0d1a5..32d1b600503ab 100644 --- a/tests/baselines/reference/commentOnImportStatement2.js +++ b/tests/baselines/reference/commentOnImportStatement2.js @@ -4,4 +4,4 @@ import foo = require('./foo'); //// [commentOnImportStatement2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/commentOnImportStatement3.js b/tests/baselines/reference/commentOnImportStatement3.js index decc7a7878e72..83d1e9c525ec2 100644 --- a/tests/baselines/reference/commentOnImportStatement3.js +++ b/tests/baselines/reference/commentOnImportStatement3.js @@ -7,4 +7,4 @@ import foo = require('./foo'); //// [commentOnImportStatement3.js] "use strict"; /* copyright */ -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/commentsBeforeVariableStatement1.js b/tests/baselines/reference/commentsBeforeVariableStatement1.js index 9a06a3e7c228c..06645ec1529f7 100644 --- a/tests/baselines/reference/commentsBeforeVariableStatement1.js +++ b/tests/baselines/reference/commentsBeforeVariableStatement1.js @@ -6,5 +6,5 @@ export var b: number; //// [commentsBeforeVariableStatement1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js index cd62c1583bcff..bbbef2cf48511 100644 --- a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js @@ -15,7 +15,7 @@ if(foo.C1.s1){ //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { this.m1 = 42; @@ -26,7 +26,7 @@ C1.s1 = true; exports.C1 = C1; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./foo_0"); if (foo.C1.s1) { // Should cause runtime import diff --git a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js index 5ac0e3fcc649e..584d6b53f7f60 100644 --- a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js @@ -33,7 +33,7 @@ var e: number = 0; //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { this.m1 = 42; @@ -50,7 +50,7 @@ var E1; })(E1 = exports.E1 || (exports.E1 = {})); //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var i; var x = {}; var y = false; diff --git a/tests/baselines/reference/commonSourceDir5.js b/tests/baselines/reference/commonSourceDir5.js index 78517e4e51527..5e1c64c3d819e 100644 --- a/tests/baselines/reference/commonSourceDir5.js +++ b/tests/baselines/reference/commonSourceDir5.js @@ -18,18 +18,18 @@ export var y = x * i; //// [concat.js] define("B:/baz", ["require", "exports", "A:/bar", "A:/foo"], function (require, exports, bar_1, foo_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.pi = Math.PI; exports.y = bar_1.x * foo_1.i; }); define("A:/foo", ["require", "exports", "B:/baz"], function (require, exports, baz_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.i = Math.sqrt(-1); exports.z = baz_1.pi * baz_1.pi; }); define("A:/bar", ["require", "exports", "A:/foo"], function (require, exports, foo_2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = foo_2.z + foo_2.z; }); diff --git a/tests/baselines/reference/commonSourceDir6.js b/tests/baselines/reference/commonSourceDir6.js index 071953afcdc76..fb225d7408e5e 100644 --- a/tests/baselines/reference/commonSourceDir6.js +++ b/tests/baselines/reference/commonSourceDir6.js @@ -18,18 +18,18 @@ export var y = x * i; //// [concat.js] define("baz", ["require", "exports", "a/bar", "a/foo"], function (require, exports, bar_1, foo_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.pi = Math.PI; exports.y = bar_1.x * foo_1.i; }); define("a/foo", ["require", "exports", "baz"], function (require, exports, baz_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.i = Math.sqrt(-1); exports.z = baz_1.pi * baz_1.pi; }); define("a/bar", ["require", "exports", "a/foo"], function (require, exports, foo_2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = foo_2.z + foo_2.z; }); diff --git a/tests/baselines/reference/commonSourceDirectory.js b/tests/baselines/reference/commonSourceDirectory.js index 5569ae6d52b77..83c19ba44c2b9 100644 --- a/tests/baselines/reference/commonSourceDirectory.js +++ b/tests/baselines/reference/commonSourceDirectory.js @@ -19,7 +19,7 @@ x + y; //// [/app/bin/index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foo_1 = require("foo"); var bar_1 = require("bar"); diff --git a/tests/baselines/reference/commonSourceDirectory.sourcemap.txt b/tests/baselines/reference/commonSourceDirectory.sourcemap.txt index c880d2d0059fb..725986497a6d4 100644 --- a/tests/baselines/reference/commonSourceDirectory.sourcemap.txt +++ b/tests/baselines/reference/commonSourceDirectory.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:/app/bin/index.js sourceFile:index.ts ------------------------------------------------------------------- >>>"use strict"; ->>>exports.__esModule = true; +>>>Object.defineProperty(exports, "__esModule", { value: true }); >>>/// 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/commonSourceDirectory_dts.js b/tests/baselines/reference/commonSourceDirectory_dts.js index 249edecedddaa..8396a69745c85 100644 --- a/tests/baselines/reference/commonSourceDirectory_dts.js +++ b/tests/baselines/reference/commonSourceDirectory_dts.js @@ -12,7 +12,7 @@ export const x = y; //// [/app/bin/index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// exports.x = y; //# sourceMappingURL=/app/myMapRoot/index.js.map diff --git a/tests/baselines/reference/commonSourceDirectory_dts.sourcemap.txt b/tests/baselines/reference/commonSourceDirectory_dts.sourcemap.txt index 925a3d30ed4a2..f547bd854262e 100644 --- a/tests/baselines/reference/commonSourceDirectory_dts.sourcemap.txt +++ b/tests/baselines/reference/commonSourceDirectory_dts.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:/app/bin/index.js sourceFile:index.ts ------------------------------------------------------------------- >>>"use strict"; ->>>exports.__esModule = true; +>>>Object.defineProperty(exports, "__esModule", { value: true }); >>>/// 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/complexNarrowingWithAny.js b/tests/baselines/reference/complexNarrowingWithAny.js index 4531cde9f3ed3..4e8da8a1e58a4 100644 --- a/tests/baselines/reference/complexNarrowingWithAny.js +++ b/tests/baselines/reference/complexNarrowingWithAny.js @@ -562,7 +562,7 @@ export function viewFactory_AppComponent0(viewUtils:any,parentInjector:any,decla //// [complexNarrowingWithAny.js] "use strict"; // Repro from #10869 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /** * This file is generated by the Angular 2 template compiler. * Do not edit. diff --git a/tests/baselines/reference/computedPropertyNames49_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames49_ES5.errors.txt index 02721368a0dfd..d803e40819626 100644 --- a/tests/baselines/reference/computedPropertyNames49_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames49_ES5.errors.txt @@ -1,36 +1,26 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(13,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(9,9): error TS1049: A 'set' accessor must have exactly one parameter. tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(13,9): error TS2300: Duplicate identifier 'foo'. -tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(18,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(18,9): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts (8 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts (4 errors) ==== var x = { p1: 10, get [1 + 1]() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. throw 10; }, get [1 + 1]() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; }, set [1 + 1]() { ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1049: A 'set' accessor must have exactly one parameter. // just throw throw 10; }, get foo() { ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'foo'. if (1 == 1) { return 10; @@ -38,8 +28,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts(18 }, get foo() { ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. ~~~ !!! error TS2300: Duplicate identifier 'foo'. diff --git a/tests/baselines/reference/computedPropertyNames50_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames50_ES5.errors.txt index 12d3dde29508b..a02485e218ba7 100644 --- a/tests/baselines/reference/computedPropertyNames50_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames50_ES5.errors.txt @@ -1,45 +1,33 @@ -tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(3,9): error TS2300: Duplicate identifier 'foo'. -tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(11,9): error TS1049: A 'set' accessor must have exactly one parameter. tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(18,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts(18,9): error TS2300: Duplicate identifier 'foo'. -==== tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts (8 errors) ==== +==== tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES5.ts (4 errors) ==== var x = { p1: 10, get foo() { ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'foo'. if (1 == 1) { return 10; } }, get [1 + 1]() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. throw 10; }, set [1 + 1]() { ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1049: A 'set' accessor must have exactly one parameter. // just throw throw 10; }, get [1 + 1]() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; }, get foo() { ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. ~~~ !!! error TS2300: Duplicate identifier 'foo'. diff --git a/tests/baselines/reference/constEnumExternalModule.js b/tests/baselines/reference/constEnumExternalModule.js index 8ea5625ac0797..fe029f2c9f5af 100644 --- a/tests/baselines/reference/constEnumExternalModule.js +++ b/tests/baselines/reference/constEnumExternalModule.js @@ -13,11 +13,11 @@ var v = A.V; //// [m1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [m2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var v = 100 /* V */; }); diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js index 8e9dc6da68831..a747d54ec126a 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.js @@ -296,7 +296,7 @@ var TypeScriptAllInOne; (function (TypeScriptAllInOne) { var Program = (function () { function Program() { - this["case"] = bfs.STATEMENTS(4); + this.case = bfs.STATEMENTS(4); } Program.Main = function () { var args = []; @@ -309,13 +309,13 @@ var TypeScriptAllInOne; retValue = bfs.VARIABLES(); if (retValue != 0) ^= { - "return": 1 + return: 1 }; } finally { } }; - Program.prototype["if"] = function (retValue) { + Program.prototype.if = function (retValue) { if (retValue === void 0) { retValue = != 0; } return 1; ^ @@ -331,7 +331,7 @@ var TypeScriptAllInOne; return 1; } }; - Program.prototype["catch"] = function (e) { + Program.prototype.catch = function (e) { console.log(e); }; return Program; @@ -368,7 +368,7 @@ var BasicFeatures = (function () { ; var quoted = '"', quoted2 = "'"; var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, "instanceof": function () { return 'objLit{42}'; } }; + var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof: function () { return 'objLit{42}'; } }; var weekday = Weekdays.Monday; var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; // diff --git a/tests/baselines/reference/contextualTypingOfAccessors.errors.txt b/tests/baselines/reference/contextualTypingOfAccessors.errors.txt deleted file mode 100644 index 8d5b732d5f7a9..0000000000000 --- a/tests/baselines/reference/contextualTypingOfAccessors.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -tests/cases/compiler/contextualTypingOfAccessors.ts(8,8): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/contextualTypingOfAccessors.ts(11,8): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/contextualTypingOfAccessors.ts (2 errors) ==== - // not contextually typing accessors - - var x: { - foo: (x: number) => number; - } - - x = { - get foo() { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return (n)=>n - }, - set foo(x) {} - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfAccessors.symbols b/tests/baselines/reference/contextualTypingOfAccessors.symbols new file mode 100644 index 0000000000000..da1cfd0178ada --- /dev/null +++ b/tests/baselines/reference/contextualTypingOfAccessors.symbols @@ -0,0 +1,27 @@ +=== tests/cases/compiler/contextualTypingOfAccessors.ts === +// not contextually typing accessors + +var x: { +>x : Symbol(x, Decl(contextualTypingOfAccessors.ts, 2, 3)) + + foo: (x: number) => number; +>foo : Symbol(foo, Decl(contextualTypingOfAccessors.ts, 2, 8)) +>x : Symbol(x, Decl(contextualTypingOfAccessors.ts, 3, 9)) +} + +x = { +>x : Symbol(x, Decl(contextualTypingOfAccessors.ts, 2, 3)) + + get foo() { +>foo : Symbol(foo, Decl(contextualTypingOfAccessors.ts, 6, 5), Decl(contextualTypingOfAccessors.ts, 9, 5)) + + return (n)=>n +>n : Symbol(n, Decl(contextualTypingOfAccessors.ts, 8, 14)) +>n : Symbol(n, Decl(contextualTypingOfAccessors.ts, 8, 14)) + + }, + set foo(x) {} +>foo : Symbol(foo, Decl(contextualTypingOfAccessors.ts, 6, 5), Decl(contextualTypingOfAccessors.ts, 9, 5)) +>x : Symbol(x, Decl(contextualTypingOfAccessors.ts, 10, 11)) +} + diff --git a/tests/baselines/reference/contextualTypingOfAccessors.types b/tests/baselines/reference/contextualTypingOfAccessors.types new file mode 100644 index 0000000000000..3dff909e3c1d3 --- /dev/null +++ b/tests/baselines/reference/contextualTypingOfAccessors.types @@ -0,0 +1,30 @@ +=== tests/cases/compiler/contextualTypingOfAccessors.ts === +// not contextually typing accessors + +var x: { +>x : { foo: (x: number) => number; } + + foo: (x: number) => number; +>foo : (x: number) => number +>x : number +} + +x = { +>x = { get foo() { return (n)=>n }, set foo(x) {}} : { foo: (n: any) => any; } +>x : { foo: (x: number) => number; } +>{ get foo() { return (n)=>n }, set foo(x) {}} : { foo: (n: any) => any; } + + get foo() { +>foo : (n: any) => any + + return (n)=>n +>(n)=>n : (n: any) => any +>n : any +>n : any + + }, + set foo(x) {} +>foo : (n: any) => any +>x : (n: any) => any +} + diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js index 9eb261b9d7a23..47ee7f8b6205a 100644 --- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js +++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.js @@ -40,7 +40,7 @@ const d1 = ; // goTo has type "home" | //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function MainButton(props) { var linkProps = props; if (linkProps.goTo) { diff --git a/tests/baselines/reference/controlFlowBinaryOrExpression.js b/tests/baselines/reference/controlFlowBinaryOrExpression.js index 752479cf4e9b2..982d7150113a7 100644 --- a/tests/baselines/reference/controlFlowBinaryOrExpression.js +++ b/tests/baselines/reference/controlFlowBinaryOrExpression.js @@ -38,7 +38,7 @@ if (isNodeList(sourceObj) || isHTMLCollection(sourceObj)) { //// [controlFlowBinaryOrExpression.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; var cond; (x = "") || (x = 0); diff --git a/tests/baselines/reference/controlFlowPropertyDeclarations.js b/tests/baselines/reference/controlFlowPropertyDeclarations.js index ab286b27f06ef..22ca0457f8620 100644 --- a/tests/baselines/reference/controlFlowPropertyDeclarations.js +++ b/tests/baselines/reference/controlFlowPropertyDeclarations.js @@ -151,7 +151,7 @@ export class StyleParser { //// [controlFlowPropertyDeclarations.js] "use strict"; // Repro from ##8913 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig'); // Populate property map with ReactJS's attribute and property mappings // TODO handle/use .Properties value eg: MUST_USE_PROPERTY is not HTML attr diff --git a/tests/baselines/reference/controlFlowSelfReferentialLoop.js b/tests/baselines/reference/controlFlowSelfReferentialLoop.js index 4781f2776fbf5..9ef6ee95ea999 100644 --- a/tests/baselines/reference/controlFlowSelfReferentialLoop.js +++ b/tests/baselines/reference/controlFlowSelfReferentialLoop.js @@ -103,7 +103,7 @@ export default md5; //// [controlFlowSelfReferentialLoop.js] "use strict"; // Repro from #12319 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function md5(string) { function FF(a, b, c, d, x, s, ac) { return 0; @@ -203,4 +203,4 @@ function md5(string) { b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391); } } -exports["default"] = md5; +exports.default = md5; diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js index b7bd60e4a9535..ba3c661d1d031 100644 --- a/tests/baselines/reference/convertKeywordsYes.js +++ b/tests/baselines/reference/convertKeywordsYes.js @@ -344,43 +344,43 @@ var bigObject = { string: 0, get: 0, yield: 0, - "break": 0, - "case": 0, - "catch": 0, - "class": 0, - "continue": 0, - "const": 0, - "debugger": 0, + break: 0, + case: 0, + catch: 0, + class: 0, + continue: 0, + const: 0, + debugger: 0, declare: 0, - "default": 0, - "delete": 0, - "do": 0, - "else": 0, - "enum": 0, - "export": 0, - "extends": 0, - "false": 0, - "finally": 0, - "for": 0, - "function": 0, - "if": 0, - "import": 0, - "in": 0, - "instanceof": 0, - "new": 0, - "null": 0, - "return": 0, - "super": 0, - "switch": 0, - "this": 0, - "throw": 0, - "true": 0, - "try": 0, - "typeof": 0, - "var": 0, - "void": 0, - "while": 0, - "with": 0 + default: 0, + delete: 0, + do: 0, + else: 0, + enum: 0, + export: 0, + extends: 0, + false: 0, + finally: 0, + for: 0, + function: 0, + if: 0, + import: 0, + in: 0, + instanceof: 0, + new: 0, + null: 0, + return: 0, + super: 0, + switch: 0, + this: 0, + throw: 0, + true: 0, + try: 0, + typeof: 0, + var: 0, + void: 0, + while: 0, + with: 0 }; var bigClass = (function () { function bigClass() { @@ -401,43 +401,43 @@ var bigClass = (function () { this.string = 0; this.get = 0; this.yield = 0; - this["break"] = 0; - this["case"] = 0; - this["catch"] = 0; - this["class"] = 0; - this["continue"] = 0; - this["const"] = 0; - this["debugger"] = 0; + this.break = 0; + this.case = 0; + this.catch = 0; + this.class = 0; + this.continue = 0; + this.const = 0; + this.debugger = 0; this.declare = 0; - this["default"] = 0; - this["delete"] = 0; - this["do"] = 0; - this["else"] = 0; - this["enum"] = 0; - this["export"] = 0; - this["extends"] = 0; - this["false"] = 0; - this["finally"] = 0; - this["for"] = 0; - this["function"] = 0; - this["if"] = 0; - this["import"] = 0; - this["in"] = 0; - this["instanceof"] = 0; - this["new"] = 0; - this["null"] = 0; - this["return"] = 0; - this["super"] = 0; - this["switch"] = 0; - this["this"] = 0; - this["throw"] = 0; - this["true"] = 0; - this["try"] = 0; - this["typeof"] = 0; - this["var"] = 0; - this["void"] = 0; - this["while"] = 0; - this["with"] = 0; + this.default = 0; + this.delete = 0; + this.do = 0; + this.else = 0; + this.enum = 0; + this.export = 0; + this.extends = 0; + this.false = 0; + this.finally = 0; + this.for = 0; + this.function = 0; + this.if = 0; + this.import = 0; + this.in = 0; + this.instanceof = 0; + this.new = 0; + this.null = 0; + this.return = 0; + this.super = 0; + this.switch = 0; + this.this = 0; + this.throw = 0; + this.true = 0; + this.try = 0; + this.typeof = 0; + this.var = 0; + this.void = 0; + this.while = 0; + this.with = 0; } return bigClass; }()); diff --git a/tests/baselines/reference/copyrightWithNewLine1.js b/tests/baselines/reference/copyrightWithNewLine1.js index f7c1ac602dd6d..e055de43ac712 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.js +++ b/tests/baselines/reference/copyrightWithNewLine1.js @@ -15,7 +15,7 @@ greeter.start(); ****************************/ define(["require", "exports", "./greeter"], function (require, exports, model) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.js b/tests/baselines/reference/copyrightWithoutNewLine1.js index 0f479c3db7f26..cf4317b8df0d9 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.js +++ b/tests/baselines/reference/copyrightWithoutNewLine1.js @@ -11,7 +11,7 @@ greeter.start(); //// [copyrightWithoutNewLine1.js] define(["require", "exports", "./greeter"], function (require, exports, model) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/crashIntypeCheckInvocationExpression.js b/tests/baselines/reference/crashIntypeCheckInvocationExpression.js index d555d3f3bcafe..5cc253fbacb33 100644 --- a/tests/baselines/reference/crashIntypeCheckInvocationExpression.js +++ b/tests/baselines/reference/crashIntypeCheckInvocationExpression.js @@ -15,7 +15,7 @@ export var compileServer = task(() => { //// [crashIntypeCheckInvocationExpression.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var nake; function doCompile(fileset, moduleType) { return undefined; diff --git a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js index a115e7ab0a3aa..470a106b0f533 100644 --- a/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js +++ b/tests/baselines/reference/crashIntypeCheckObjectCreationExpression.js @@ -11,7 +11,7 @@ export class BuildWorkspaceService { //// [crashIntypeCheckObjectCreationExpression.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var BuildWorkspaceService = (function () { function BuildWorkspaceService() { } diff --git a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js index 2269f85996f92..4d16599c330e2 100644 --- a/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js +++ b/tests/baselines/reference/declFileAliasUseBeforeDeclaration.js @@ -9,7 +9,7 @@ import foo = require("./declFileAliasUseBeforeDeclaration_foo"); //// [declFileAliasUseBeforeDeclaration_foo.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } @@ -18,7 +18,7 @@ var Foo = (function () { exports.Foo = Foo; //// [declFileAliasUseBeforeDeclaration_test.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function bar(a) { } exports.bar = bar; diff --git a/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js b/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js index 627a1865d8fc8..37ac0e5c020a3 100644 --- a/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js +++ b/tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js @@ -20,7 +20,7 @@ export var x: SubModule.m.m3.c; //// [declFileAmbientExternalModuleWithSingleExportedModule_0.js] //// [declFileAmbientExternalModuleWithSingleExportedModule_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [declFileAmbientExternalModuleWithSingleExportedModule_0.d.ts] diff --git a/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js b/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js index 4ac309c1a6b21..eb0907fd2b7e5 100644 --- a/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js +++ b/tests/baselines/reference/declFileClassWithStaticMethodReturningConstructor.js @@ -7,7 +7,7 @@ export class Enhancement { //// [declFileClassWithStaticMethodReturningConstructor.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Enhancement = (function () { function Enhancement() { } diff --git a/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js b/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js index cefff0be4eac9..7a6f0d0c95048 100644 --- a/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js +++ b/tests/baselines/reference/declFileExportAssignmentOfGenericInterface.js @@ -14,12 +14,12 @@ x.a; //// [declFileExportAssignmentOfGenericInterface_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [declFileExportAssignmentOfGenericInterface_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x.a; }); diff --git a/tests/baselines/reference/declFileExportImportChain.js b/tests/baselines/reference/declFileExportImportChain.js index fe1b36d76fa48..d67b13ff17b43 100644 --- a/tests/baselines/reference/declFileExportImportChain.js +++ b/tests/baselines/reference/declFileExportImportChain.js @@ -43,7 +43,7 @@ define(["require", "exports"], function (require, exports) { //// [declFileExportImportChain_b.js] define(["require", "exports", "declFileExportImportChain_a"], function (require, exports, a) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = a; }); //// [declFileExportImportChain_b1.js] @@ -54,13 +54,13 @@ define(["require", "exports", "declFileExportImportChain_b"], function (require, //// [declFileExportImportChain_c.js] define(["require", "exports", "declFileExportImportChain_b1"], function (require, exports, b1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.b1 = b1; }); //// [declFileExportImportChain_d.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/declFileExportImportChain2.js b/tests/baselines/reference/declFileExportImportChain2.js index ec7629ebed13b..41ae21434efb4 100644 --- a/tests/baselines/reference/declFileExportImportChain2.js +++ b/tests/baselines/reference/declFileExportImportChain2.js @@ -45,13 +45,13 @@ define(["require", "exports", "declFileExportImportChain2_a"], function (require //// [declFileExportImportChain2_c.js] define(["require", "exports", "declFileExportImportChain2_b"], function (require, exports, b) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.b = b; }); //// [declFileExportImportChain2_d.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/declFileForExportedImport.js b/tests/baselines/reference/declFileForExportedImport.js index 809f01878d4a9..6e0421f22d9f0 100644 --- a/tests/baselines/reference/declFileForExportedImport.js +++ b/tests/baselines/reference/declFileForExportedImport.js @@ -13,10 +13,10 @@ var z = b.x; //// [declFileForExportedImport_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [declFileForExportedImport_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// exports.a = require("./declFileForExportedImport_0"); var y = exports.a.x; diff --git a/tests/baselines/reference/declFileGenericType.js b/tests/baselines/reference/declFileGenericType.js index f56abaf6b97d7..fe5d23925f146 100644 --- a/tests/baselines/reference/declFileGenericType.js +++ b/tests/baselines/reference/declFileGenericType.js @@ -51,7 +51,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C; (function (C) { var A = (function () { diff --git a/tests/baselines/reference/declFileImportModuleWithExportAssignment.js b/tests/baselines/reference/declFileImportModuleWithExportAssignment.js index 5215d3d1431a5..a648ee957805d 100644 --- a/tests/baselines/reference/declFileImportModuleWithExportAssignment.js +++ b/tests/baselines/reference/declFileImportModuleWithExportAssignment.js @@ -31,7 +31,7 @@ var m2; module.exports = m2; //// [declFileImportModuleWithExportAssignment_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /**This is on import declaration*/ var a1 = require("./declFileImportModuleWithExportAssignment_0"); exports.a = a1; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends3.js b/tests/baselines/reference/declarationEmitExpressionInExtends3.js index 7cc58772ec23f..5cb5b39554687 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends3.js +++ b/tests/baselines/reference/declarationEmitExpressionInExtends3.js @@ -54,7 +54,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ExportedClass = (function () { function ExportedClass() { } diff --git a/tests/baselines/reference/declarationEmitIdentifierPredicates01.js b/tests/baselines/reference/declarationEmitIdentifierPredicates01.js index 5bf62608fb81e..81bb5936b9418 100644 --- a/tests/baselines/reference/declarationEmitIdentifierPredicates01.js +++ b/tests/baselines/reference/declarationEmitIdentifierPredicates01.js @@ -5,7 +5,7 @@ export function f(x: any): x is number { //// [declarationEmitIdentifierPredicates01.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function f(x) { return typeof x === "number"; } diff --git a/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.js b/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.js index 74da01ce683ca..cafd3bbaaebec 100644 --- a/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.js +++ b/tests/baselines/reference/declarationEmitIdentifierPredicatesWithPrivateName01.js @@ -9,7 +9,7 @@ export function f(x: any): x is I { //// [declarationEmitIdentifierPredicatesWithPrivateName01.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function f(x) { return typeof x.a === "number"; } diff --git a/tests/baselines/reference/declarationEmitIndexTypeNotFound.js b/tests/baselines/reference/declarationEmitIndexTypeNotFound.js index f28f33f88e6f0..6f7639a08cab5 100644 --- a/tests/baselines/reference/declarationEmitIndexTypeNotFound.js +++ b/tests/baselines/reference/declarationEmitIndexTypeNotFound.js @@ -6,4 +6,4 @@ export interface Test { //// [declarationEmitIndexTypeNotFound.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/declarationEmitInferedDefaultExportType.js b/tests/baselines/reference/declarationEmitInferedDefaultExportType.js index 4d9eb47641a99..76171dceca935 100644 --- a/tests/baselines/reference/declarationEmitInferedDefaultExportType.js +++ b/tests/baselines/reference/declarationEmitInferedDefaultExportType.js @@ -8,9 +8,9 @@ export default { //// [declarationEmitInferedDefaultExportType.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // test.ts -exports["default"] = { +exports.default = { foo: [], bar: undefined, baz: null diff --git a/tests/baselines/reference/declarationEmitInferedTypeAlias1.js b/tests/baselines/reference/declarationEmitInferedTypeAlias1.js index 091e7f97a0efe..d07655587b86f 100644 --- a/tests/baselines/reference/declarationEmitInferedTypeAlias1.js +++ b/tests/baselines/reference/declarationEmitInferedTypeAlias1.js @@ -13,13 +13,13 @@ export { v } //// [0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); { var obj = true; } //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var v = "str" || true; exports.v = v; diff --git a/tests/baselines/reference/declarationEmitInferedTypeAlias2.js b/tests/baselines/reference/declarationEmitInferedTypeAlias2.js index d99a1abc34621..6000a36093d0a 100644 --- a/tests/baselines/reference/declarationEmitInferedTypeAlias2.js +++ b/tests/baselines/reference/declarationEmitInferedTypeAlias2.js @@ -16,13 +16,13 @@ export { v, bar } //// [0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); { var obj = true; } //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var v = "str" || true; exports.v = v; function bar() { diff --git a/tests/baselines/reference/declarationEmitInferedTypeAlias3.js b/tests/baselines/reference/declarationEmitInferedTypeAlias3.js index 4621aa8db2fa1..543bc71b13133 100644 --- a/tests/baselines/reference/declarationEmitInferedTypeAlias3.js +++ b/tests/baselines/reference/declarationEmitInferedTypeAlias3.js @@ -13,15 +13,15 @@ export default x; //// [0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); { var obj = true; } //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = "hi" || 5; -exports["default"] = x; +exports.default = x; //// [0.d.ts] diff --git a/tests/baselines/reference/declarationEmitInferedTypeAlias5.js b/tests/baselines/reference/declarationEmitInferedTypeAlias5.js index a20c4da52e099..e3328f16f1a72 100644 --- a/tests/baselines/reference/declarationEmitInferedTypeAlias5.js +++ b/tests/baselines/reference/declarationEmitInferedTypeAlias5.js @@ -12,11 +12,11 @@ export { v } //// [0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var obj = true; //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //let v2: Z.Data; var v = "str" || true; exports.v = v; diff --git a/tests/baselines/reference/declarationEmitInferedTypeAlias6.js b/tests/baselines/reference/declarationEmitInferedTypeAlias6.js index 0b98e0bdeb03b..b3f68d92266d4 100644 --- a/tests/baselines/reference/declarationEmitInferedTypeAlias6.js +++ b/tests/baselines/reference/declarationEmitInferedTypeAlias6.js @@ -13,13 +13,13 @@ export { v } //// [0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); { var obj = true; } //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var v = "str" || true; exports.v = v; diff --git a/tests/baselines/reference/declarationEmitInferedTypeAlias7.js b/tests/baselines/reference/declarationEmitInferedTypeAlias7.js index 187913b0fd81e..85e9a1f00675d 100644 --- a/tests/baselines/reference/declarationEmitInferedTypeAlias7.js +++ b/tests/baselines/reference/declarationEmitInferedTypeAlias7.js @@ -10,11 +10,11 @@ export { v } //// [0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var obj = true; //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var v = "str" || true; exports.v = v; diff --git a/tests/baselines/reference/declarationEmitInferedTypeAlias9.js b/tests/baselines/reference/declarationEmitInferedTypeAlias9.js index 3f237f2dc44c9..7c4a6aeb2e08a 100644 --- a/tests/baselines/reference/declarationEmitInferedTypeAlias9.js +++ b/tests/baselines/reference/declarationEmitInferedTypeAlias9.js @@ -8,7 +8,7 @@ export function returnSomeGlobalValue() { //// [declarationEmitInferedTypeAlias9.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; function returnSomeGlobalValue() { return x; diff --git a/tests/baselines/reference/declarationEmitInvalidExport.js b/tests/baselines/reference/declarationEmitInvalidExport.js index be71312b98eab..c2d81fe723a3d 100644 --- a/tests/baselines/reference/declarationEmitInvalidExport.js +++ b/tests/baselines/reference/declarationEmitInvalidExport.js @@ -8,7 +8,7 @@ export type MyClass = typeof myClass; //// [declarationEmitInvalidExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); if (false) { export var myClass = 0; } diff --git a/tests/baselines/reference/declarationEmitNameConflicts.js b/tests/baselines/reference/declarationEmitNameConflicts.js index 5440f3d358400..05a027d6921f5 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts.js +++ b/tests/baselines/reference/declarationEmitNameConflicts.js @@ -63,7 +63,7 @@ var f; module.exports = f; //// [declarationEmit_nameConflicts_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var im = require("./declarationEmit_nameConflicts_1"); var M; (function (M) { diff --git a/tests/baselines/reference/declarationEmitNameConflictsWithAlias.js b/tests/baselines/reference/declarationEmitNameConflictsWithAlias.js index 4b4aca4f4b2d3..b3718dcbb8763 100644 --- a/tests/baselines/reference/declarationEmitNameConflictsWithAlias.js +++ b/tests/baselines/reference/declarationEmitNameConflictsWithAlias.js @@ -8,7 +8,7 @@ export module M { //// [declarationEmitNameConflictsWithAlias.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var M; (function (M) { })(M = exports.M || (exports.M = {})); diff --git a/tests/baselines/reference/declarationEmitThisPredicates01.js b/tests/baselines/reference/declarationEmitThisPredicates01.js index 70ed3147a9e06..0dca441abbe6f 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates01.js +++ b/tests/baselines/reference/declarationEmitThisPredicates01.js @@ -20,7 +20,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/declarationEmitThisPredicates02.js b/tests/baselines/reference/declarationEmitThisPredicates02.js index f763a1cba46be..914bfd8be5d31 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates02.js +++ b/tests/baselines/reference/declarationEmitThisPredicates02.js @@ -14,7 +14,7 @@ export const obj = { //// [declarationEmitThisPredicates02.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.obj = { m: function () { var dis = this; diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js index e7c4c9998b914..9ba9ec715e46d 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName01.js @@ -20,7 +20,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.js b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.js index 86fb2e0560711..469f28bada8d9 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.js +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.js @@ -14,7 +14,7 @@ export const obj = { //// [declarationEmitThisPredicatesWithPrivateName02.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.obj = { m: function () { var dis = this; diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js index d2110bea4fe9f..e376f7fd632a3 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js @@ -5,7 +5,7 @@ export const y = (x: Foo) => 1 //// [declarationEmitTypeAliasWithTypeParameters1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.y = function (x) { return 1; }; diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js index 5c76056ac622b..adf443a49ce55 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js @@ -6,7 +6,7 @@ export const y = (x: Baa) => 1 //// [declarationEmitTypeAliasWithTypeParameters2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.y = function (x) { return 1; }; diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.js b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.js index cee701c045588..6b4f4709164f4 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.js +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters5.js @@ -11,7 +11,7 @@ function foo() { //// [declarationEmitTypeAliasWithTypeParameters5.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return {}; } diff --git a/tests/baselines/reference/declarationMerging2.js b/tests/baselines/reference/declarationMerging2.js index b360d9af3f770..443fd8b47c4f6 100644 --- a/tests/baselines/reference/declarationMerging2.js +++ b/tests/baselines/reference/declarationMerging2.js @@ -17,7 +17,7 @@ declare module "./a" { //// [a.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -29,5 +29,5 @@ define(["require", "exports"], function (require, exports) { //// [b.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/decoratorOnImportEquals2.js b/tests/baselines/reference/decoratorOnImportEquals2.js index aa8273699e38e..f37056ee60d2c 100644 --- a/tests/baselines/reference/decoratorOnImportEquals2.js +++ b/tests/baselines/reference/decoratorOnImportEquals2.js @@ -11,7 +11,7 @@ declare function dec(target: T): T; //// [decoratorOnImportEquals2_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [decoratorOnImportEquals2_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/decoratorWithUnderscoreMethod.js b/tests/baselines/reference/decoratorWithUnderscoreMethod.js index 9ac2a88aa5162..f2b505a979cdc 100644 --- a/tests/baselines/reference/decoratorWithUnderscoreMethod.js +++ b/tests/baselines/reference/decoratorWithUnderscoreMethod.js @@ -33,4 +33,4 @@ var A = (function () { }()); __decorate([ dec() -], A.prototype, "__foo"); +], A.prototype, "__foo", null); diff --git a/tests/baselines/reference/dependencyViaImportAlias.js b/tests/baselines/reference/dependencyViaImportAlias.js index 285cfbcda16e6..63376250c9cd3 100644 --- a/tests/baselines/reference/dependencyViaImportAlias.js +++ b/tests/baselines/reference/dependencyViaImportAlias.js @@ -13,7 +13,7 @@ export = A; //// [A.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } diff --git a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt index f8e237a83ceb0..a6d614a282404 100644 --- a/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt +++ b/tests/baselines/reference/derivedClassFunctionOverridesBaseClassAccessor.errors.txt @@ -1,21 +1,15 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(10,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. Types of property 'x' are incompatible. Type '() => number' is not assignable to type 'number'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts(11,5): error TS2426: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member function. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts (4 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassFunctionOverridesBaseClassAccessor.ts (2 errors) ==== class Base { get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set x(v) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt b/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt deleted file mode 100644 index f8e52d3e57514..0000000000000 --- a/tests/baselines/reference/derivedClassIncludesInheritedMembers.errors.txt +++ /dev/null @@ -1,55 +0,0 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts (4 errors) ==== - class Base { - a: string; - b() { } - get c() { return ''; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set c(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - static r: string; - static s() { } - static get t() { return ''; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set t(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - constructor(x) { } - } - - class Derived extends Base { - } - - var d: Derived = new Derived(1); - var r1 = d.a; - var r2 = d.b(); - var r3 = d.c; - d.c = ''; - var r4 = Derived.r; - var r5 = Derived.s(); - var r6 = Derived.t; - Derived.t = ''; - - class Base2 { - [x: string]: Object; - [x: number]: Date; - } - - class Derived2 extends Base2 { - } - - var d2: Derived2; - var r7 = d2['']; - var r8 = d2[1]; - - \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.symbols b/tests/baselines/reference/derivedClassIncludesInheritedMembers.symbols new file mode 100644 index 0000000000000..6cbc7a28707dd --- /dev/null +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.symbols @@ -0,0 +1,120 @@ +=== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts === +class Base { +>Base : Symbol(Base, Decl(derivedClassIncludesInheritedMembers.ts, 0, 0)) + + a: string; +>a : Symbol(Base.a, Decl(derivedClassIncludesInheritedMembers.ts, 0, 12)) + + b() { } +>b : Symbol(Base.b, Decl(derivedClassIncludesInheritedMembers.ts, 1, 14)) + + get c() { return ''; } +>c : Symbol(Base.c, Decl(derivedClassIncludesInheritedMembers.ts, 2, 11), Decl(derivedClassIncludesInheritedMembers.ts, 3, 26)) + + set c(v) { } +>c : Symbol(Base.c, Decl(derivedClassIncludesInheritedMembers.ts, 2, 11), Decl(derivedClassIncludesInheritedMembers.ts, 3, 26)) +>v : Symbol(v, Decl(derivedClassIncludesInheritedMembers.ts, 4, 10)) + + static r: string; +>r : Symbol(Base.r, Decl(derivedClassIncludesInheritedMembers.ts, 4, 16)) + + static s() { } +>s : Symbol(Base.s, Decl(derivedClassIncludesInheritedMembers.ts, 6, 21)) + + static get t() { return ''; } +>t : Symbol(Base.t, Decl(derivedClassIncludesInheritedMembers.ts, 7, 18), Decl(derivedClassIncludesInheritedMembers.ts, 8, 33)) + + static set t(v) { } +>t : Symbol(Base.t, Decl(derivedClassIncludesInheritedMembers.ts, 7, 18), Decl(derivedClassIncludesInheritedMembers.ts, 8, 33)) +>v : Symbol(v, Decl(derivedClassIncludesInheritedMembers.ts, 9, 17)) + + constructor(x) { } +>x : Symbol(x, Decl(derivedClassIncludesInheritedMembers.ts, 11, 16)) +} + +class Derived extends Base { +>Derived : Symbol(Derived, Decl(derivedClassIncludesInheritedMembers.ts, 12, 1)) +>Base : Symbol(Base, Decl(derivedClassIncludesInheritedMembers.ts, 0, 0)) +} + +var d: Derived = new Derived(1); +>d : Symbol(d, Decl(derivedClassIncludesInheritedMembers.ts, 17, 3)) +>Derived : Symbol(Derived, Decl(derivedClassIncludesInheritedMembers.ts, 12, 1)) +>Derived : Symbol(Derived, Decl(derivedClassIncludesInheritedMembers.ts, 12, 1)) + +var r1 = d.a; +>r1 : Symbol(r1, Decl(derivedClassIncludesInheritedMembers.ts, 18, 3)) +>d.a : Symbol(Base.a, Decl(derivedClassIncludesInheritedMembers.ts, 0, 12)) +>d : Symbol(d, Decl(derivedClassIncludesInheritedMembers.ts, 17, 3)) +>a : Symbol(Base.a, Decl(derivedClassIncludesInheritedMembers.ts, 0, 12)) + +var r2 = d.b(); +>r2 : Symbol(r2, Decl(derivedClassIncludesInheritedMembers.ts, 19, 3)) +>d.b : Symbol(Base.b, Decl(derivedClassIncludesInheritedMembers.ts, 1, 14)) +>d : Symbol(d, Decl(derivedClassIncludesInheritedMembers.ts, 17, 3)) +>b : Symbol(Base.b, Decl(derivedClassIncludesInheritedMembers.ts, 1, 14)) + +var r3 = d.c; +>r3 : Symbol(r3, Decl(derivedClassIncludesInheritedMembers.ts, 20, 3)) +>d.c : Symbol(Base.c, Decl(derivedClassIncludesInheritedMembers.ts, 2, 11), Decl(derivedClassIncludesInheritedMembers.ts, 3, 26)) +>d : Symbol(d, Decl(derivedClassIncludesInheritedMembers.ts, 17, 3)) +>c : Symbol(Base.c, Decl(derivedClassIncludesInheritedMembers.ts, 2, 11), Decl(derivedClassIncludesInheritedMembers.ts, 3, 26)) + +d.c = ''; +>d.c : Symbol(Base.c, Decl(derivedClassIncludesInheritedMembers.ts, 2, 11), Decl(derivedClassIncludesInheritedMembers.ts, 3, 26)) +>d : Symbol(d, Decl(derivedClassIncludesInheritedMembers.ts, 17, 3)) +>c : Symbol(Base.c, Decl(derivedClassIncludesInheritedMembers.ts, 2, 11), Decl(derivedClassIncludesInheritedMembers.ts, 3, 26)) + +var r4 = Derived.r; +>r4 : Symbol(r4, Decl(derivedClassIncludesInheritedMembers.ts, 22, 3)) +>Derived.r : Symbol(Base.r, Decl(derivedClassIncludesInheritedMembers.ts, 4, 16)) +>Derived : Symbol(Derived, Decl(derivedClassIncludesInheritedMembers.ts, 12, 1)) +>r : Symbol(Base.r, Decl(derivedClassIncludesInheritedMembers.ts, 4, 16)) + +var r5 = Derived.s(); +>r5 : Symbol(r5, Decl(derivedClassIncludesInheritedMembers.ts, 23, 3)) +>Derived.s : Symbol(Base.s, Decl(derivedClassIncludesInheritedMembers.ts, 6, 21)) +>Derived : Symbol(Derived, Decl(derivedClassIncludesInheritedMembers.ts, 12, 1)) +>s : Symbol(Base.s, Decl(derivedClassIncludesInheritedMembers.ts, 6, 21)) + +var r6 = Derived.t; +>r6 : Symbol(r6, Decl(derivedClassIncludesInheritedMembers.ts, 24, 3)) +>Derived.t : Symbol(Base.t, Decl(derivedClassIncludesInheritedMembers.ts, 7, 18), Decl(derivedClassIncludesInheritedMembers.ts, 8, 33)) +>Derived : Symbol(Derived, Decl(derivedClassIncludesInheritedMembers.ts, 12, 1)) +>t : Symbol(Base.t, Decl(derivedClassIncludesInheritedMembers.ts, 7, 18), Decl(derivedClassIncludesInheritedMembers.ts, 8, 33)) + +Derived.t = ''; +>Derived.t : Symbol(Base.t, Decl(derivedClassIncludesInheritedMembers.ts, 7, 18), Decl(derivedClassIncludesInheritedMembers.ts, 8, 33)) +>Derived : Symbol(Derived, Decl(derivedClassIncludesInheritedMembers.ts, 12, 1)) +>t : Symbol(Base.t, Decl(derivedClassIncludesInheritedMembers.ts, 7, 18), Decl(derivedClassIncludesInheritedMembers.ts, 8, 33)) + +class Base2 { +>Base2 : Symbol(Base2, Decl(derivedClassIncludesInheritedMembers.ts, 25, 15)) + + [x: string]: Object; +>x : Symbol(x, Decl(derivedClassIncludesInheritedMembers.ts, 28, 5)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + [x: number]: Date; +>x : Symbol(x, Decl(derivedClassIncludesInheritedMembers.ts, 29, 5)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +} + +class Derived2 extends Base2 { +>Derived2 : Symbol(Derived2, Decl(derivedClassIncludesInheritedMembers.ts, 30, 1)) +>Base2 : Symbol(Base2, Decl(derivedClassIncludesInheritedMembers.ts, 25, 15)) +} + +var d2: Derived2; +>d2 : Symbol(d2, Decl(derivedClassIncludesInheritedMembers.ts, 35, 3)) +>Derived2 : Symbol(Derived2, Decl(derivedClassIncludesInheritedMembers.ts, 30, 1)) + +var r7 = d2['']; +>r7 : Symbol(r7, Decl(derivedClassIncludesInheritedMembers.ts, 36, 3)) +>d2 : Symbol(d2, Decl(derivedClassIncludesInheritedMembers.ts, 35, 3)) + +var r8 = d2[1]; +>r8 : Symbol(r8, Decl(derivedClassIncludesInheritedMembers.ts, 37, 3)) +>d2 : Symbol(d2, Decl(derivedClassIncludesInheritedMembers.ts, 35, 3)) + + diff --git a/tests/baselines/reference/derivedClassIncludesInheritedMembers.types b/tests/baselines/reference/derivedClassIncludesInheritedMembers.types new file mode 100644 index 0000000000000..71ec00a753e3d --- /dev/null +++ b/tests/baselines/reference/derivedClassIncludesInheritedMembers.types @@ -0,0 +1,134 @@ +=== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassIncludesInheritedMembers.ts === +class Base { +>Base : Base + + a: string; +>a : string + + b() { } +>b : () => void + + get c() { return ''; } +>c : string +>'' : "" + + set c(v) { } +>c : string +>v : string + + static r: string; +>r : string + + static s() { } +>s : () => void + + static get t() { return ''; } +>t : string +>'' : "" + + static set t(v) { } +>t : string +>v : string + + constructor(x) { } +>x : any +} + +class Derived extends Base { +>Derived : Derived +>Base : Base +} + +var d: Derived = new Derived(1); +>d : Derived +>Derived : Derived +>new Derived(1) : Derived +>Derived : typeof Derived +>1 : 1 + +var r1 = d.a; +>r1 : string +>d.a : string +>d : Derived +>a : string + +var r2 = d.b(); +>r2 : void +>d.b() : void +>d.b : () => void +>d : Derived +>b : () => void + +var r3 = d.c; +>r3 : string +>d.c : string +>d : Derived +>c : string + +d.c = ''; +>d.c = '' : "" +>d.c : string +>d : Derived +>c : string +>'' : "" + +var r4 = Derived.r; +>r4 : string +>Derived.r : string +>Derived : typeof Derived +>r : string + +var r5 = Derived.s(); +>r5 : void +>Derived.s() : void +>Derived.s : () => void +>Derived : typeof Derived +>s : () => void + +var r6 = Derived.t; +>r6 : string +>Derived.t : string +>Derived : typeof Derived +>t : string + +Derived.t = ''; +>Derived.t = '' : "" +>Derived.t : string +>Derived : typeof Derived +>t : string +>'' : "" + +class Base2 { +>Base2 : Base2 + + [x: string]: Object; +>x : string +>Object : Object + + [x: number]: Date; +>x : number +>Date : Date +} + +class Derived2 extends Base2 { +>Derived2 : Derived2 +>Base2 : Base2 +} + +var d2: Derived2; +>d2 : Derived2 +>Derived2 : Derived2 + +var r7 = d2['']; +>r7 : Object +>d2[''] : Object +>d2 : Derived2 +>'' : "" + +var r8 = d2[1]; +>r8 : Date +>d2[1] : Date +>d2 : Derived2 +>1 : 1 + + diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt b/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt deleted file mode 100644 index 9292ff64411d5..0000000000000 --- a/tests/baselines/reference/derivedClassOverridesPublicMembers.errors.txt +++ /dev/null @@ -1,89 +0,0 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(13,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(29,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts(30,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts (8 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - a: typeof x; - b(a: typeof x) { } - get c() { return x; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set c(v: typeof x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - static get t() { return x; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set t(v: typeof x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static u: (a: typeof x) => void; - - constructor(a: typeof x) { } - } - - class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - get c() { return y; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set c(v: typeof y) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - static get t() { return y; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set t(a: typeof y) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } - } - - var d: Derived = new Derived(y); - var r1 = d.a; - var r2 = d.b(y); - var r3 = d.c; - var r3a = d.d; - d.c = y; - var r4 = Derived.r; - var r5 = Derived.s(y); - var r6 = Derived.t; - var r6a = Derived.u; - Derived.t = y; - - class Base2 { - [i: string]: Object; - [i: number]: typeof x; - } - - class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; - } - - var d2: Derived2; - var r7 = d2['']; - var r8 = d2[1]; - - \ No newline at end of file diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.symbols b/tests/baselines/reference/derivedClassOverridesPublicMembers.symbols new file mode 100644 index 0000000000000..45c0faecf409c --- /dev/null +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.symbols @@ -0,0 +1,227 @@ +=== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts === +var x: { foo: string; } +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) +>foo : Symbol(foo, Decl(derivedClassOverridesPublicMembers.ts, 0, 8)) + +var y: { foo: string; bar: string; } +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) +>foo : Symbol(foo, Decl(derivedClassOverridesPublicMembers.ts, 1, 8)) +>bar : Symbol(bar, Decl(derivedClassOverridesPublicMembers.ts, 1, 21)) + +class Base { +>Base : Symbol(Base, Decl(derivedClassOverridesPublicMembers.ts, 1, 36)) + + a: typeof x; +>a : Symbol(Base.a, Decl(derivedClassOverridesPublicMembers.ts, 3, 12)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + b(a: typeof x) { } +>b : Symbol(Base.b, Decl(derivedClassOverridesPublicMembers.ts, 4, 16)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 5, 6)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + get c() { return x; } +>c : Symbol(Base.c, Decl(derivedClassOverridesPublicMembers.ts, 5, 22), Decl(derivedClassOverridesPublicMembers.ts, 6, 25)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + set c(v: typeof x) { } +>c : Symbol(Base.c, Decl(derivedClassOverridesPublicMembers.ts, 5, 22), Decl(derivedClassOverridesPublicMembers.ts, 6, 25)) +>v : Symbol(v, Decl(derivedClassOverridesPublicMembers.ts, 7, 10)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + d: (a: typeof x) => void; +>d : Symbol(Base.d, Decl(derivedClassOverridesPublicMembers.ts, 7, 26)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 8, 8)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + static r: typeof x; +>r : Symbol(Base.r, Decl(derivedClassOverridesPublicMembers.ts, 8, 29)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + static s(a: typeof x) { } +>s : Symbol(Base.s, Decl(derivedClassOverridesPublicMembers.ts, 10, 23)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 11, 13)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + static get t() { return x; } +>t : Symbol(Base.t, Decl(derivedClassOverridesPublicMembers.ts, 11, 29), Decl(derivedClassOverridesPublicMembers.ts, 12, 32)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + static set t(v: typeof x) { } +>t : Symbol(Base.t, Decl(derivedClassOverridesPublicMembers.ts, 11, 29), Decl(derivedClassOverridesPublicMembers.ts, 12, 32)) +>v : Symbol(v, Decl(derivedClassOverridesPublicMembers.ts, 13, 17)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + static u: (a: typeof x) => void; +>u : Symbol(Base.u, Decl(derivedClassOverridesPublicMembers.ts, 13, 33)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 14, 15)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + constructor(a: typeof x) { } +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 16, 16)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) +} + +class Derived extends Base { +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>Base : Symbol(Base, Decl(derivedClassOverridesPublicMembers.ts, 1, 36)) + + a: typeof y; +>a : Symbol(Derived.a, Decl(derivedClassOverridesPublicMembers.ts, 19, 28)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + b(a: typeof y) { } +>b : Symbol(Derived.b, Decl(derivedClassOverridesPublicMembers.ts, 20, 16)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 21, 6)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + get c() { return y; } +>c : Symbol(Derived.c, Decl(derivedClassOverridesPublicMembers.ts, 21, 22), Decl(derivedClassOverridesPublicMembers.ts, 22, 25)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + set c(v: typeof y) { } +>c : Symbol(Derived.c, Decl(derivedClassOverridesPublicMembers.ts, 21, 22), Decl(derivedClassOverridesPublicMembers.ts, 22, 25)) +>v : Symbol(v, Decl(derivedClassOverridesPublicMembers.ts, 23, 10)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + d: (a: typeof y) => void; +>d : Symbol(Derived.d, Decl(derivedClassOverridesPublicMembers.ts, 23, 26)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 24, 8)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + static r: typeof y; +>r : Symbol(Derived.r, Decl(derivedClassOverridesPublicMembers.ts, 24, 29)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + static s(a: typeof y) { } +>s : Symbol(Derived.s, Decl(derivedClassOverridesPublicMembers.ts, 26, 23)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 27, 13)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + static get t() { return y; } +>t : Symbol(Derived.t, Decl(derivedClassOverridesPublicMembers.ts, 27, 29), Decl(derivedClassOverridesPublicMembers.ts, 28, 32)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + static set t(a: typeof y) { } +>t : Symbol(Derived.t, Decl(derivedClassOverridesPublicMembers.ts, 27, 29), Decl(derivedClassOverridesPublicMembers.ts, 28, 32)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 29, 17)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + static u: (a: typeof y) => void; +>u : Symbol(Derived.u, Decl(derivedClassOverridesPublicMembers.ts, 29, 33)) +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 30, 15)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + + constructor(a: typeof y) { super(x) } +>a : Symbol(a, Decl(derivedClassOverridesPublicMembers.ts, 32, 16)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) +>super : Symbol(Base, Decl(derivedClassOverridesPublicMembers.ts, 1, 36)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) +} + +var d: Derived = new Derived(y); +>d : Symbol(d, Decl(derivedClassOverridesPublicMembers.ts, 35, 3)) +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + +var r1 = d.a; +>r1 : Symbol(r1, Decl(derivedClassOverridesPublicMembers.ts, 36, 3)) +>d.a : Symbol(Derived.a, Decl(derivedClassOverridesPublicMembers.ts, 19, 28)) +>d : Symbol(d, Decl(derivedClassOverridesPublicMembers.ts, 35, 3)) +>a : Symbol(Derived.a, Decl(derivedClassOverridesPublicMembers.ts, 19, 28)) + +var r2 = d.b(y); +>r2 : Symbol(r2, Decl(derivedClassOverridesPublicMembers.ts, 37, 3)) +>d.b : Symbol(Derived.b, Decl(derivedClassOverridesPublicMembers.ts, 20, 16)) +>d : Symbol(d, Decl(derivedClassOverridesPublicMembers.ts, 35, 3)) +>b : Symbol(Derived.b, Decl(derivedClassOverridesPublicMembers.ts, 20, 16)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + +var r3 = d.c; +>r3 : Symbol(r3, Decl(derivedClassOverridesPublicMembers.ts, 38, 3)) +>d.c : Symbol(Derived.c, Decl(derivedClassOverridesPublicMembers.ts, 21, 22), Decl(derivedClassOverridesPublicMembers.ts, 22, 25)) +>d : Symbol(d, Decl(derivedClassOverridesPublicMembers.ts, 35, 3)) +>c : Symbol(Derived.c, Decl(derivedClassOverridesPublicMembers.ts, 21, 22), Decl(derivedClassOverridesPublicMembers.ts, 22, 25)) + +var r3a = d.d; +>r3a : Symbol(r3a, Decl(derivedClassOverridesPublicMembers.ts, 39, 3)) +>d.d : Symbol(Derived.d, Decl(derivedClassOverridesPublicMembers.ts, 23, 26)) +>d : Symbol(d, Decl(derivedClassOverridesPublicMembers.ts, 35, 3)) +>d : Symbol(Derived.d, Decl(derivedClassOverridesPublicMembers.ts, 23, 26)) + +d.c = y; +>d.c : Symbol(Derived.c, Decl(derivedClassOverridesPublicMembers.ts, 21, 22), Decl(derivedClassOverridesPublicMembers.ts, 22, 25)) +>d : Symbol(d, Decl(derivedClassOverridesPublicMembers.ts, 35, 3)) +>c : Symbol(Derived.c, Decl(derivedClassOverridesPublicMembers.ts, 21, 22), Decl(derivedClassOverridesPublicMembers.ts, 22, 25)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + +var r4 = Derived.r; +>r4 : Symbol(r4, Decl(derivedClassOverridesPublicMembers.ts, 41, 3)) +>Derived.r : Symbol(Derived.r, Decl(derivedClassOverridesPublicMembers.ts, 24, 29)) +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>r : Symbol(Derived.r, Decl(derivedClassOverridesPublicMembers.ts, 24, 29)) + +var r5 = Derived.s(y); +>r5 : Symbol(r5, Decl(derivedClassOverridesPublicMembers.ts, 42, 3)) +>Derived.s : Symbol(Derived.s, Decl(derivedClassOverridesPublicMembers.ts, 26, 23)) +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>s : Symbol(Derived.s, Decl(derivedClassOverridesPublicMembers.ts, 26, 23)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + +var r6 = Derived.t; +>r6 : Symbol(r6, Decl(derivedClassOverridesPublicMembers.ts, 43, 3)) +>Derived.t : Symbol(Derived.t, Decl(derivedClassOverridesPublicMembers.ts, 27, 29), Decl(derivedClassOverridesPublicMembers.ts, 28, 32)) +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>t : Symbol(Derived.t, Decl(derivedClassOverridesPublicMembers.ts, 27, 29), Decl(derivedClassOverridesPublicMembers.ts, 28, 32)) + +var r6a = Derived.u; +>r6a : Symbol(r6a, Decl(derivedClassOverridesPublicMembers.ts, 44, 3)) +>Derived.u : Symbol(Derived.u, Decl(derivedClassOverridesPublicMembers.ts, 29, 33)) +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>u : Symbol(Derived.u, Decl(derivedClassOverridesPublicMembers.ts, 29, 33)) + +Derived.t = y; +>Derived.t : Symbol(Derived.t, Decl(derivedClassOverridesPublicMembers.ts, 27, 29), Decl(derivedClassOverridesPublicMembers.ts, 28, 32)) +>Derived : Symbol(Derived, Decl(derivedClassOverridesPublicMembers.ts, 17, 1)) +>t : Symbol(Derived.t, Decl(derivedClassOverridesPublicMembers.ts, 27, 29), Decl(derivedClassOverridesPublicMembers.ts, 28, 32)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) + +class Base2 { +>Base2 : Symbol(Base2, Decl(derivedClassOverridesPublicMembers.ts, 45, 14)) + + [i: string]: Object; +>i : Symbol(i, Decl(derivedClassOverridesPublicMembers.ts, 48, 5)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + + [i: number]: typeof x; +>i : Symbol(i, Decl(derivedClassOverridesPublicMembers.ts, 49, 5)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) +} + +class Derived2 extends Base2 { +>Derived2 : Symbol(Derived2, Decl(derivedClassOverridesPublicMembers.ts, 50, 1)) +>Base2 : Symbol(Base2, Decl(derivedClassOverridesPublicMembers.ts, 45, 14)) + + [i: string]: typeof x; +>i : Symbol(i, Decl(derivedClassOverridesPublicMembers.ts, 53, 5)) +>x : Symbol(x, Decl(derivedClassOverridesPublicMembers.ts, 0, 3)) + + [i: number]: typeof y; +>i : Symbol(i, Decl(derivedClassOverridesPublicMembers.ts, 54, 5)) +>y : Symbol(y, Decl(derivedClassOverridesPublicMembers.ts, 1, 3)) +} + +var d2: Derived2; +>d2 : Symbol(d2, Decl(derivedClassOverridesPublicMembers.ts, 57, 3)) +>Derived2 : Symbol(Derived2, Decl(derivedClassOverridesPublicMembers.ts, 50, 1)) + +var r7 = d2['']; +>r7 : Symbol(r7, Decl(derivedClassOverridesPublicMembers.ts, 58, 3)) +>d2 : Symbol(d2, Decl(derivedClassOverridesPublicMembers.ts, 57, 3)) + +var r8 = d2[1]; +>r8 : Symbol(r8, Decl(derivedClassOverridesPublicMembers.ts, 59, 3)) +>d2 : Symbol(d2, Decl(derivedClassOverridesPublicMembers.ts, 57, 3)) + + diff --git a/tests/baselines/reference/derivedClassOverridesPublicMembers.types b/tests/baselines/reference/derivedClassOverridesPublicMembers.types new file mode 100644 index 0000000000000..cb6727a72c992 --- /dev/null +++ b/tests/baselines/reference/derivedClassOverridesPublicMembers.types @@ -0,0 +1,237 @@ +=== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts === +var x: { foo: string; } +>x : { foo: string; } +>foo : string + +var y: { foo: string; bar: string; } +>y : { foo: string; bar: string; } +>foo : string +>bar : string + +class Base { +>Base : Base + + a: typeof x; +>a : { foo: string; } +>x : { foo: string; } + + b(a: typeof x) { } +>b : (a: { foo: string; }) => void +>a : { foo: string; } +>x : { foo: string; } + + get c() { return x; } +>c : { foo: string; } +>x : { foo: string; } + + set c(v: typeof x) { } +>c : { foo: string; } +>v : { foo: string; } +>x : { foo: string; } + + d: (a: typeof x) => void; +>d : (a: { foo: string; }) => void +>a : { foo: string; } +>x : { foo: string; } + + static r: typeof x; +>r : { foo: string; } +>x : { foo: string; } + + static s(a: typeof x) { } +>s : (a: { foo: string; }) => void +>a : { foo: string; } +>x : { foo: string; } + + static get t() { return x; } +>t : { foo: string; } +>x : { foo: string; } + + static set t(v: typeof x) { } +>t : { foo: string; } +>v : { foo: string; } +>x : { foo: string; } + + static u: (a: typeof x) => void; +>u : (a: { foo: string; }) => void +>a : { foo: string; } +>x : { foo: string; } + + constructor(a: typeof x) { } +>a : { foo: string; } +>x : { foo: string; } +} + +class Derived extends Base { +>Derived : Derived +>Base : Base + + a: typeof y; +>a : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + b(a: typeof y) { } +>b : (a: { foo: string; bar: string; }) => void +>a : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + get c() { return y; } +>c : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + set c(v: typeof y) { } +>c : { foo: string; bar: string; } +>v : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + d: (a: typeof y) => void; +>d : (a: { foo: string; bar: string; }) => void +>a : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + static r: typeof y; +>r : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + static s(a: typeof y) { } +>s : (a: { foo: string; bar: string; }) => void +>a : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + static get t() { return y; } +>t : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + static set t(a: typeof y) { } +>t : { foo: string; bar: string; } +>a : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + static u: (a: typeof y) => void; +>u : (a: { foo: string; bar: string; }) => void +>a : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + + constructor(a: typeof y) { super(x) } +>a : { foo: string; bar: string; } +>y : { foo: string; bar: string; } +>super(x) : void +>super : typeof Base +>x : { foo: string; } +} + +var d: Derived = new Derived(y); +>d : Derived +>Derived : Derived +>new Derived(y) : Derived +>Derived : typeof Derived +>y : { foo: string; bar: string; } + +var r1 = d.a; +>r1 : { foo: string; bar: string; } +>d.a : { foo: string; bar: string; } +>d : Derived +>a : { foo: string; bar: string; } + +var r2 = d.b(y); +>r2 : void +>d.b(y) : void +>d.b : (a: { foo: string; bar: string; }) => void +>d : Derived +>b : (a: { foo: string; bar: string; }) => void +>y : { foo: string; bar: string; } + +var r3 = d.c; +>r3 : { foo: string; bar: string; } +>d.c : { foo: string; bar: string; } +>d : Derived +>c : { foo: string; bar: string; } + +var r3a = d.d; +>r3a : (a: { foo: string; bar: string; }) => void +>d.d : (a: { foo: string; bar: string; }) => void +>d : Derived +>d : (a: { foo: string; bar: string; }) => void + +d.c = y; +>d.c = y : { foo: string; bar: string; } +>d.c : { foo: string; bar: string; } +>d : Derived +>c : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + +var r4 = Derived.r; +>r4 : { foo: string; bar: string; } +>Derived.r : { foo: string; bar: string; } +>Derived : typeof Derived +>r : { foo: string; bar: string; } + +var r5 = Derived.s(y); +>r5 : void +>Derived.s(y) : void +>Derived.s : (a: { foo: string; bar: string; }) => void +>Derived : typeof Derived +>s : (a: { foo: string; bar: string; }) => void +>y : { foo: string; bar: string; } + +var r6 = Derived.t; +>r6 : { foo: string; bar: string; } +>Derived.t : { foo: string; bar: string; } +>Derived : typeof Derived +>t : { foo: string; bar: string; } + +var r6a = Derived.u; +>r6a : (a: { foo: string; bar: string; }) => void +>Derived.u : (a: { foo: string; bar: string; }) => void +>Derived : typeof Derived +>u : (a: { foo: string; bar: string; }) => void + +Derived.t = y; +>Derived.t = y : { foo: string; bar: string; } +>Derived.t : { foo: string; bar: string; } +>Derived : typeof Derived +>t : { foo: string; bar: string; } +>y : { foo: string; bar: string; } + +class Base2 { +>Base2 : Base2 + + [i: string]: Object; +>i : string +>Object : Object + + [i: number]: typeof x; +>i : number +>x : { foo: string; } +} + +class Derived2 extends Base2 { +>Derived2 : Derived2 +>Base2 : Base2 + + [i: string]: typeof x; +>i : string +>x : { foo: string; } + + [i: number]: typeof y; +>i : number +>y : { foo: string; bar: string; } +} + +var d2: Derived2; +>d2 : Derived2 +>Derived2 : Derived2 + +var r7 = d2['']; +>r7 : { foo: string; } +>d2[''] : { foo: string; } +>d2 : Derived2 +>'' : "" + +var r8 = d2[1]; +>r8 : { foo: string; bar: string; } +>d2[1] : { foo: string; bar: string; } +>d2 : Derived2 +>1 : 1 + + diff --git a/tests/baselines/reference/derivedClassWithAny.errors.txt b/tests/baselines/reference/derivedClassWithAny.errors.txt index aa91979706b51..0c26846ff5267 100644 --- a/tests/baselines/reference/derivedClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedClassWithAny.errors.txt @@ -1,28 +1,18 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(38,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(44,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts(57,1): error TS2322: Type 'E' is not assignable to type 'C'. Types of property 'x' are incompatible. Type 'string' is not assignable to type 'number'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts (7 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithAny.ts (1 errors) ==== class C { x: number; get X(): number { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): number { return 1; } static y: number; static get Y(): number { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } static bar(): number { @@ -33,8 +23,6 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit class D extends C { x: any; get X(): any { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } foo(): any { @@ -43,8 +31,6 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit static y: any; static get Y(): any { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } static bar(): any { @@ -56,16 +42,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit class E extends D { x: string; get X(): string{ return ''; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): string { return ''; } static y: string; static get Y(): string { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } static bar(): string { diff --git a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt index 6aeb5a7ec23a7..944ce487c4ce1 100644 --- a/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateInstanceShadowingPublicInstance.errors.txt @@ -1,9 +1,5 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(12,7): error TS2415: Class 'Derived' incorrectly extends base class 'Base'. Property 'x' is private in type 'Derived' but not in type 'Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(18,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(19,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(22,14): error TS2339: Property 'x' does not exist on type 'typeof Base'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(23,18): error TS2339: Property 'x' does not exist on type 'typeof Derived'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(25,15): error TS2339: Property 'fn' does not exist on type 'typeof Base'. @@ -14,7 +10,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts(32,9): error TS2339: Property 'a' does not exist on type 'typeof Derived'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts (13 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateInstanceShadowingPublicInstance.ts (9 errors) ==== class Base { public x: string; public fn(): string { @@ -22,11 +18,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit } public get a() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set a(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } // error, not a subtype @@ -40,11 +32,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit } private get a() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private set a(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var r = Base.x; // ok diff --git a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt index 88ec9eb44a855..9fcb8313f3923 100644 --- a/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt +++ b/tests/baselines/reference/derivedClassWithPrivateStaticShadowingPublicStatic.errors.txt @@ -1,16 +1,12 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(7,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(8,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(13,7): error TS2417: Class static side 'typeof Derived' incorrectly extends base class static side 'typeof Base'. Property 'x' is private in type 'typeof Derived' but not in type 'typeof Base'. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(19,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(20,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(24,18): error TS2341: Property 'x' is private and only accessible within class 'Derived'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(27,18): error TS2341: Property 'fn' is private and only accessible within class 'Derived'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(32,18): error TS2341: Property 'a' is private and only accessible within class 'Derived'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts(33,9): error TS2341: Property 'a' is private and only accessible within class 'Derived'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts (9 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWithPrivateStaticShadowingPublicStatic.ts (5 errors) ==== class Base { public static x: string; public static fn(): string { @@ -18,11 +14,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit } public static get a() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public static set a(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } // BUG 847404 @@ -37,11 +29,7 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassWit } private static get a() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. private static set a(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } var r = Base.x; // ok diff --git a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt index 359fab212e909..b68261f2df86b 100644 --- a/tests/baselines/reference/derivedGenericClassWithAny.errors.txt +++ b/tests/baselines/reference/derivedGenericClassWithAny.errors.txt @@ -1,7 +1,3 @@ -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,18): error TS2322: Type '""' is not assignable to type 'T'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,9): error TS2322: Type '""' is not assignable to type 'T'. tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2322: Type 'E' is not assignable to type 'C'. @@ -9,12 +5,10 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC Type 'string' is not assignable to type 'number'. -==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts (7 errors) ==== +==== tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts (3 errors) ==== class C { x: T; get X(): T { return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo(): T { return null; } @@ -23,8 +17,6 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC class D extends C { x: any; get X(): any { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } foo(): any { @@ -33,8 +25,6 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC static y: any; static get Y(): any { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } static bar(): any { @@ -46,8 +36,6 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC class E extends D { x: T; get X(): T { return ''; } // error - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~~~~ !!! error TS2322: Type '""' is not assignable to type 'T'. foo(): T { diff --git a/tests/baselines/reference/destructuringParameterDeclaration6.js b/tests/baselines/reference/destructuringParameterDeclaration6.js index a8c7f65211f75..44387820368de 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration6.js +++ b/tests/baselines/reference/destructuringParameterDeclaration6.js @@ -27,7 +27,7 @@ b2({ while: 1 }); "use strict"; // Error function a(_a) { - var = _a["while"]; + var = _a.while; } function a1(_a) { var public = _a.public; @@ -56,13 +56,13 @@ function a7() { a[_i] = arguments[_i]; } } -a({ "while": 1 }); +a({ while: 1 }); // No Error function b1(_a) { var x = _a.public; } function b2(_a) { - var y = _a["while"]; + var y = _a.while; } b1({ public: 1 }); -b2({ "while": 1 }); +b2({ while: 1 }); diff --git a/tests/baselines/reference/duplicateClassElements.errors.txt b/tests/baselines/reference/duplicateClassElements.errors.txt index 7579190db7194..16873c5581211 100644 --- a/tests/baselines/reference/duplicateClassElements.errors.txt +++ b/tests/baselines/reference/duplicateClassElements.errors.txt @@ -2,29 +2,19 @@ tests/cases/compiler/duplicateClassElements.ts(3,12): error TS2300: Duplicate id tests/cases/compiler/duplicateClassElements.ts(4,12): error TS2393: Duplicate function implementation. tests/cases/compiler/duplicateClassElements.ts(6,12): error TS2393: Duplicate function implementation. tests/cases/compiler/duplicateClassElements.ts(8,12): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateClassElements.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(9,9): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateClassElements.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(12,9): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/duplicateClassElements.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/duplicateClassElements.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(21,12): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/duplicateClassElements.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(23,9): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/duplicateClassElements.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(26,9): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/duplicateClassElements.ts(29,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/duplicateClassElements.ts(32,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2300: Duplicate identifier 'x2'. tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2403: Subsequent variable declarations must have the same type. Variable 'x2' must be of type 'number', but here has type 'any'. -tests/cases/compiler/duplicateClassElements.ts(36,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(36,9): error TS2300: Duplicate identifier 'z2'. -tests/cases/compiler/duplicateClassElements.ts(39,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/duplicateClassElements.ts(39,9): error TS2300: Duplicate identifier 'z2'. tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate identifier 'z2'. -==== tests/cases/compiler/duplicateClassElements.ts (24 errors) ==== +==== tests/cases/compiler/duplicateClassElements.ts (14 errors) ==== class a { public a; public a; @@ -43,26 +33,18 @@ tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate i !!! error TS2300: Duplicate identifier 'x'. get x() { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. return 10; } set x(_x: number) { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. } get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "Hello"; } set y(_y: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public z() { @@ -71,26 +53,18 @@ tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate i } get z() { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'z'. return "Hello"; } set z(_y: string) { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'z'. } get x2() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } set x2(_x: number) { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } public x2; ~~ @@ -100,15 +74,11 @@ tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate i get z2() { ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~ !!! error TS2300: Duplicate identifier 'z2'. return "Hello"; } set z2(_y: string) { ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~ !!! error TS2300: Duplicate identifier 'z2'. } public z2() { diff --git a/tests/baselines/reference/duplicateLocalVariable1.js b/tests/baselines/reference/duplicateLocalVariable1.js index 61e8dcd02f872..87f730668b9d3 100644 --- a/tests/baselines/reference/duplicateLocalVariable1.js +++ b/tests/baselines/reference/duplicateLocalVariable1.js @@ -346,7 +346,7 @@ export var tests: TestRunner = (function () { //// [duplicateLocalVariable1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); / /; commonjs; var TestFileDir = ".\\TempTestFiles"; diff --git a/tests/baselines/reference/duplicateLocalVariable2.js b/tests/baselines/reference/duplicateLocalVariable2.js index 2962e544b9b94..b799d03ba16e8 100644 --- a/tests/baselines/reference/duplicateLocalVariable2.js +++ b/tests/baselines/reference/duplicateLocalVariable2.js @@ -38,7 +38,7 @@ export var tests: TestRunner = (function () { //// [duplicateLocalVariable2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var TestCase = (function () { function TestCase(name, test, errorMessageRegEx) { this.name = name; diff --git a/tests/baselines/reference/duplicateStringNamedProperty1.js b/tests/baselines/reference/duplicateStringNamedProperty1.js index 5a6d5d7a8db64..f1b83ece11fa3 100644 --- a/tests/baselines/reference/duplicateStringNamedProperty1.js +++ b/tests/baselines/reference/duplicateStringNamedProperty1.js @@ -6,4 +6,4 @@ export interface Album { //// [duplicateStringNamedProperty1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.js b/tests/baselines/reference/duplicateSymbolsExportMatching.js index 5f5590e2b417e..ebf9cec0eb24a 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.js +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.js @@ -68,7 +68,7 @@ export interface D { } //// [duplicateSymbolsExportMatching.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // Should report error only once for instantiated module var M; (function (M) { diff --git a/tests/baselines/reference/dynamicModuleTypecheckError.js b/tests/baselines/reference/dynamicModuleTypecheckError.js index 2c94e692dd015..7e8e47c68a61e 100644 --- a/tests/baselines/reference/dynamicModuleTypecheckError.js +++ b/tests/baselines/reference/dynamicModuleTypecheckError.js @@ -10,7 +10,7 @@ for(var i = 0; i < 30; i++) { //// [dynamicModuleTypecheckError.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; for (var i = 0; i < 30; i++) { exports.x = i * 1000; // should not be an error here diff --git a/tests/baselines/reference/elidingImportNames.js b/tests/baselines/reference/elidingImportNames.js index 6b1d7968c9bb6..9bc8d28731f33 100644 --- a/tests/baselines/reference/elidingImportNames.js +++ b/tests/baselines/reference/elidingImportNames.js @@ -16,15 +16,15 @@ export var main = 10; //// [elidingImportNames_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.main = 10; //// [elidingImportNames_main1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.main = 10; //// [elidingImportNames_test.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a = require("./elidingImportNames_main"); // alias used in typeof var b = a; var x; diff --git a/tests/baselines/reference/emptyModuleName.js b/tests/baselines/reference/emptyModuleName.js index d98359d94bbab..81c552de9b655 100644 --- a/tests/baselines/reference/emptyModuleName.js +++ b/tests/baselines/reference/emptyModuleName.js @@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = require(""); var B = (function (_super) { __extends(B, _super); diff --git a/tests/baselines/reference/enumFromExternalModule.js b/tests/baselines/reference/enumFromExternalModule.js index 2a1865d3ccd0d..845253ce65636 100644 --- a/tests/baselines/reference/enumFromExternalModule.js +++ b/tests/baselines/reference/enumFromExternalModule.js @@ -12,14 +12,14 @@ var x = f.Mode.Open; //// [enumFromExternalModule_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Mode; (function (Mode) { Mode[Mode["Open"] = 0] = "Open"; })(Mode = exports.Mode || (exports.Mode = {})); //// [enumFromExternalModule_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var f = require("./enumFromExternalModule_0"); var x = f.Mode.Open; diff --git a/tests/baselines/reference/errorSuperPropertyAccess.errors.txt b/tests/baselines/reference/errorSuperPropertyAccess.errors.txt index 7fd6e467eafdc..bb404b9530914 100644 --- a/tests/baselines/reference/errorSuperPropertyAccess.errors.txt +++ b/tests/baselines/reference/errorSuperPropertyAccess.errors.txt @@ -5,32 +5,24 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(15,9): error TS2335: 'super' can only be referenced in a derived class. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(16,9): error TS2335: 'super' can only be referenced in a derived class. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(21,9): error TS2335: 'super' can only be referenced in a derived class. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(24,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(25,9): error TS2335: 'super' can only be referenced in a derived class. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(29,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(30,9): error TS2335: 'super' can only be referenced in a derived class. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(57,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(61,23): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(64,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(65,23): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(68,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(69,19): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(73,13): error TS2660: 'super' can only be referenced in members of derived classes or object literal expressions. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(76,40): error TS2660: 'super' can only be referenced in members of derived classes or object literal expressions. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(87,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(91,23): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(94,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(95,23): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(98,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(99,19): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(109,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(110,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(111,15): error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(113,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(114,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(115,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(116,15): error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'. -tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(119,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(120,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(121,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(122,15): error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'. @@ -38,7 +30,7 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts(127,30): error TS2660: 'super' can only be referenced in members of derived classes or object literal expressions. -==== tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts (38 errors) ==== +==== tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess.ts (30 errors) ==== //super property access in constructor of class with no base type //super property access in instance member function of class with no base type //super property access in instance member accessor(get and set) of class with no base type @@ -77,8 +69,6 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess } public static get static2() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.hasOwnProperty(''); ~~~~~ !!! error TS2335: 'super' can only be referenced in a derived class. @@ -86,8 +76,6 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess } public static set static2(n) { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.hasOwnProperty(''); ~~~~~ !!! error TS2335: 'super' can only be referenced in a derived class. @@ -129,16 +117,12 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess } get a() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = super.publicMember; ~~~~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. return undefined; } set a(n) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. n = super.publicMember; ~~~~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. @@ -175,16 +159,12 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess } get a() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var x = super.privateMember; ~~~~~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. return undefined; } set a(n) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. n = super.privateMember; ~~~~~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. @@ -208,8 +188,6 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess !!! error TS2341: Property 'privateStaticFunc' is private and only accessible within class 'SomeBase'. } static get a() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. @@ -222,8 +200,6 @@ tests/cases/conformance/expressions/superPropertyAccess/errorSuperPropertyAccess return ''; } static set a(n) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.publicStaticMember = 3; ~~~~~~~~~~~~~~~~~~ !!! error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. diff --git a/tests/baselines/reference/errorsInGenericTypeReference.errors.txt b/tests/baselines/reference/errorsInGenericTypeReference.errors.txt index c459eee92901a..3c4f7d2dc2ca1 100644 --- a/tests/baselines/reference/errorsInGenericTypeReference.errors.txt +++ b/tests/baselines/reference/errorsInGenericTypeReference.errors.txt @@ -2,7 +2,6 @@ tests/cases/compiler/errorsInGenericTypeReference.ts(11,17): error TS2304: Canno tests/cases/compiler/errorsInGenericTypeReference.ts(17,31): error TS2304: Cannot find name 'V'. tests/cases/compiler/errorsInGenericTypeReference.ts(22,29): error TS2304: Cannot find name 'V'. tests/cases/compiler/errorsInGenericTypeReference.ts(23,36): error TS2304: Cannot find name 'V'. -tests/cases/compiler/errorsInGenericTypeReference.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/errorsInGenericTypeReference.ts(24,27): error TS2304: Cannot find name 'V'. tests/cases/compiler/errorsInGenericTypeReference.ts(25,24): error TS2304: Cannot find name 'V'. tests/cases/compiler/errorsInGenericTypeReference.ts(30,36): error TS2304: Cannot find name 'V'. @@ -22,7 +21,7 @@ tests/cases/compiler/errorsInGenericTypeReference.ts(67,40): error TS2304: Canno tests/cases/compiler/errorsInGenericTypeReference.ts(68,24): error TS2304: Cannot find name 'V'. -==== tests/cases/compiler/errorsInGenericTypeReference.ts (22 errors) ==== +==== tests/cases/compiler/errorsInGenericTypeReference.ts (21 errors) ==== interface IFoo { } class Foo { } @@ -55,8 +54,6 @@ tests/cases/compiler/errorsInGenericTypeReference.ts(68,24): error TS2304: Canno ~ !!! error TS2304: Cannot find name 'V'. set a(value: Foo<{ x: V }>) { } // error: could not find symbol V - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS2304: Cannot find name 'V'. property: Foo<{ x: V }>; // error: could not find symbol V diff --git a/tests/baselines/reference/es3-oldStyleOctalLiteralInEnums.errors.txt b/tests/baselines/reference/es3-oldStyleOctalLiteralInEnums.errors.txt index 137b76f660d0a..1faa57d122dad 100644 --- a/tests/baselines/reference/es3-oldStyleOctalLiteralInEnums.errors.txt +++ b/tests/baselines/reference/es3-oldStyleOctalLiteralInEnums.errors.txt @@ -1,13 +1,13 @@ -tests/cases/compiler/es3-oldStyleOctalLiteralInEnums.ts(2,7): error TS8018: Octal literals are not allowed in enums members initializer. Use the syntax '-0o1'. -tests/cases/compiler/es3-oldStyleOctalLiteralInEnums.ts(3,7): error TS8018: Octal literals are not allowed in enums members initializer. Use the syntax '0o2'. +tests/cases/compiler/es3-oldStyleOctalLiteralInEnums.ts(2,7): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. +tests/cases/compiler/es3-oldStyleOctalLiteralInEnums.ts(3,7): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2'. ==== tests/cases/compiler/es3-oldStyleOctalLiteralInEnums.ts (2 errors) ==== enum E { x = -01, ~~~ -!!! error TS8018: Octal literals are not allowed in enums members initializer. Use the syntax '-0o1'. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. y = 02, ~~ -!!! error TS8018: Octal literals are not allowed in enums members initializer. Use the syntax '0o2'. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2'. } \ No newline at end of file diff --git a/tests/baselines/reference/es3-oldStyleOctalLiteralTypes.errors.txt b/tests/baselines/reference/es3-oldStyleOctalLiteralTypes.errors.txt index 5fc9843989cec..a628ec16f64a6 100644 --- a/tests/baselines/reference/es3-oldStyleOctalLiteralTypes.errors.txt +++ b/tests/baselines/reference/es3-oldStyleOctalLiteralTypes.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/es3-oldStyleOctalLiteralTypes.ts(1,8): error TS8017: Octal literal types must use ES2015 syntax. Use the syntax '0o10'. -tests/cases/compiler/es3-oldStyleOctalLiteralTypes.ts(2,8): error TS8017: Octal literal types must use ES2015 syntax. Use the syntax '-0o20'. +tests/cases/compiler/es3-oldStyleOctalLiteralTypes.ts(1,8): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o10'. +tests/cases/compiler/es3-oldStyleOctalLiteralTypes.ts(2,8): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o20'. ==== tests/cases/compiler/es3-oldStyleOctalLiteralTypes.ts (2 errors) ==== let x: 010; ~~~ -!!! error TS8017: Octal literal types must use ES2015 syntax. Use the syntax '0o10'. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o10'. let y: -020; ~~~~ -!!! error TS8017: Octal literal types must use ES2015 syntax. Use the syntax '-0o20'. +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o20'. \ No newline at end of file diff --git a/tests/baselines/reference/es3defaultAliasIsQuoted.js b/tests/baselines/reference/es3defaultAliasIsQuoted.js index ea12fc7a3d62d..531bf64488e90 100644 --- a/tests/baselines/reference/es3defaultAliasIsQuoted.js +++ b/tests/baselines/reference/es3defaultAliasIsQuoted.js @@ -15,7 +15,7 @@ assert(Foo.CONSTANT === "Foo"); //// [es3defaultAliasQuoted_file0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } @@ -27,9 +27,9 @@ function assert(value) { if (!value) throw new Error("Assertion failed!"); } -exports["default"] = assert; +exports.default = assert; //// [es3defaultAliasQuoted_file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var es3defaultAliasQuoted_file0_1 = require("./es3defaultAliasQuoted_file0"); -es3defaultAliasQuoted_file0_1["default"](es3defaultAliasQuoted_file0_1.Foo.CONSTANT === "Foo"); +es3defaultAliasQuoted_file0_1.default(es3defaultAliasQuoted_file0_1.Foo.CONSTANT === "Foo"); diff --git a/tests/baselines/reference/es6ClassTest2.errors.txt b/tests/baselines/reference/es6ClassTest2.errors.txt index 0b68e1cd784e4..d00f9b9232ad3 100644 --- a/tests/baselines/reference/es6ClassTest2.errors.txt +++ b/tests/baselines/reference/es6ClassTest2.errors.txt @@ -1,9 +1,7 @@ tests/cases/compiler/es6ClassTest2.ts(17,1): error TS2304: Cannot find name 'console'. -tests/cases/compiler/es6ClassTest2.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/es6ClassTest2.ts(35,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/es6ClassTest2.ts (3 errors) ==== +==== tests/cases/compiler/es6ClassTest2.ts (1 errors) ==== class BasicMonster { constructor(public name: string, public health: number) { @@ -36,15 +34,11 @@ tests/cases/compiler/es6ClassTest2.ts(35,9): error TS1056: Accessors are only av // a curly body defines a getter in the same way that "get" // defines one in an object literal. get isAlive() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this._health > 0; } // Likewise, "set" can be used to define setters. set health(value: number) { - ~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. if (value < 0) { throw new Error('Health must be non-negative.') } diff --git a/tests/baselines/reference/es6ClassTest5.js b/tests/baselines/reference/es6ClassTest5.js index 7d4238fda65b1..b909fac58b50f 100644 --- a/tests/baselines/reference/es6ClassTest5.js +++ b/tests/baselines/reference/es6ClassTest5.js @@ -23,7 +23,7 @@ var C1T5 = (function () { }()); var bigClass = (function () { function bigClass() { - this["break"] = 1; + this.break = 1; } return bigClass; }()); diff --git a/tests/baselines/reference/es6ExportEqualsInterop.js b/tests/baselines/reference/es6ExportEqualsInterop.js index 5e04221df8b8f..a9564e8936b12 100644 --- a/tests/baselines/reference/es6ExportEqualsInterop.js +++ b/tests/baselines/reference/es6ExportEqualsInterop.js @@ -212,7 +212,7 @@ export * from "class-module"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var z2 = require("variable"); var z3 = require("interface-variable"); var z4 = require("module"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js index 0809a5278f0c6..e348c83aa3d5e 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportDts.js @@ -25,7 +25,7 @@ export var x6 = new m(); //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a = (function () { function a() { } @@ -64,7 +64,7 @@ var x11 = (function () { exports.x11 = x11; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var server_1 = require("./server"); exports.x1 = new server_1.a(); var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js index b153fb042eb6c..d70719585647f 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js @@ -9,7 +9,7 @@ export var x = new nameSpaceBinding.a(); //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a = (function () { function a() { } @@ -18,7 +18,7 @@ var a = (function () { exports.a = a; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var nameSpaceBinding = require("./server"); exports.x = new nameSpaceBinding.a(); diff --git a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js index ded9e2811a270..230f1a5069c70 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js +++ b/tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js @@ -9,11 +9,11 @@ export var x: number = nameSpaceBinding.a; //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var nameSpaceBinding = require("./server"); exports.x = nameSpaceBinding.a; diff --git a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js index 0b233910696c7..66870d1c03d17 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js +++ b/tests/baselines/reference/es6ImportDefaultBindingNoDefaultProperty.js @@ -9,8 +9,8 @@ import defaultBinding from "./es6ImportDefaultBindingNoDefaultProperty_0"; //// [es6ImportDefaultBindingNoDefaultProperty_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; //// [es6ImportDefaultBindingNoDefaultProperty_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/es6ImportNameSpaceImportAmd.js b/tests/baselines/reference/es6ImportNameSpaceImportAmd.js index 44a0635f7a2db..ecb945dfd9172 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportAmd.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportAmd.js @@ -12,13 +12,13 @@ import * as nameSpaceBinding2 from "es6ImportNameSpaceImportAmd_0"; // elide thi //// [es6ImportNameSpaceImportAmd_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; }); //// [es6ImportNameSpaceImportAmd_1.js] define(["require", "exports", "es6ImportNameSpaceImportAmd_0"], function (require, exports, nameSpaceBinding) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = nameSpaceBinding.a; }); diff --git a/tests/baselines/reference/es6ImportNameSpaceImportDts.js b/tests/baselines/reference/es6ImportNameSpaceImportDts.js index d57f881de91ad..04530f523fc0b 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportDts.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportDts.js @@ -10,7 +10,7 @@ import * as nameSpaceBinding2 from "./server"; // unreferenced //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var c = (function () { function c() { } @@ -20,7 +20,7 @@ exports.c = c; ; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var nameSpaceBinding = require("./server"); exports.x = new nameSpaceBinding.c(); diff --git a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js index 57aa0cf0c05c3..28a3baf24eac1 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js +++ b/tests/baselines/reference/es6ImportNameSpaceImportWithExport.js @@ -12,13 +12,13 @@ export import * as nameSpaceBinding2 from "server"; // Not referenced imports //// [server.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; }); //// [client.js] define(["require", "exports", "server"], function (require, exports, nameSpaceBinding) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = nameSpaceBinding.a; }); diff --git a/tests/baselines/reference/es6ImportNamedImportAmd.js b/tests/baselines/reference/es6ImportNamedImportAmd.js index 8f1a7cb013b2f..74bc50d8abceb 100644 --- a/tests/baselines/reference/es6ImportNamedImportAmd.js +++ b/tests/baselines/reference/es6ImportNamedImportAmd.js @@ -43,7 +43,7 @@ import { aaaa as bbbb } from "es6ImportNamedImportAmd_0"; //// [es6ImportNamedImportAmd_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; exports.x = exports.a; exports.m = exports.a; @@ -56,7 +56,7 @@ define(["require", "exports"], function (require, exports) { //// [es6ImportNamedImportAmd_1.js] define(["require", "exports", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0"], function (require, exports, es6ImportNamedImportAmd_0_1, es6ImportNamedImportAmd_0_2, es6ImportNamedImportAmd_0_3, es6ImportNamedImportAmd_0_4, es6ImportNamedImportAmd_0_5, es6ImportNamedImportAmd_0_6, es6ImportNamedImportAmd_0_7, es6ImportNamedImportAmd_0_8, es6ImportNamedImportAmd_0_9) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var xxxx = es6ImportNamedImportAmd_0_1.a; var xxxx = es6ImportNamedImportAmd_0_2.a; var xxxx = es6ImportNamedImportAmd_0_3.x; diff --git a/tests/baselines/reference/es6ImportNamedImportDts.js b/tests/baselines/reference/es6ImportNamedImportDts.js index 0ce09d4b180bf..ea802612dfbb0 100644 --- a/tests/baselines/reference/es6ImportNamedImportDts.js +++ b/tests/baselines/reference/es6ImportNamedImportDts.js @@ -47,7 +47,7 @@ import { aaaa1 as bbbb } from "./server"; //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a = (function () { function a() { } @@ -134,7 +134,7 @@ var aaaa1 = (function () { exports.aaaa1 = aaaa1; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var server_1 = require("./server"); exports.xxxx = new server_1.a(); var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js index 3acd2f9c4a075..9427a87080252 100644 --- a/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js +++ b/tests/baselines/reference/es6ImportNamedImportInIndirectExportAssignment.js @@ -13,7 +13,7 @@ export = x; //// [es6ImportNamedImportInIndirectExportAssignment_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var c = (function () { diff --git a/tests/baselines/reference/es6ImportNamedImportMergeErrors.js b/tests/baselines/reference/es6ImportNamedImportMergeErrors.js index 61b2cbf76b3e2..ac85375fdfcb5 100644 --- a/tests/baselines/reference/es6ImportNamedImportMergeErrors.js +++ b/tests/baselines/reference/es6ImportNamedImportMergeErrors.js @@ -21,13 +21,13 @@ import { z1 as z } from "./es6ImportNamedImportMergeErrors_0"; // should be erro //// [es6ImportNamedImportMergeErrors_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; exports.x = exports.a; exports.z = exports.a; exports.z1 = exports.a; //// [es6ImportNamedImportMergeErrors_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = 10; var x44 = 10; diff --git a/tests/baselines/reference/es6ImportNamedImportNoExportMember.js b/tests/baselines/reference/es6ImportNamedImportNoExportMember.js index 2c8e9fe5fecfd..557fcdb62472f 100644 --- a/tests/baselines/reference/es6ImportNamedImportNoExportMember.js +++ b/tests/baselines/reference/es6ImportNamedImportNoExportMember.js @@ -10,9 +10,9 @@ import { x1 as x } from "./es6ImportNamedImportNoExportMember_0"; //// [es6ImportNamedImportNoExportMember_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; exports.x = exports.a; //// [es6ImportNamedImport_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/es6ImportNamedImportWithExport.js b/tests/baselines/reference/es6ImportNamedImportWithExport.js index b864f86258ef1..0a791ed67b570 100644 --- a/tests/baselines/reference/es6ImportNamedImportWithExport.js +++ b/tests/baselines/reference/es6ImportNamedImportWithExport.js @@ -41,7 +41,7 @@ export import { aaaa as bbbb } from "./server"; //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; exports.x = exports.a; exports.m = exports.a; @@ -52,7 +52,7 @@ exports.z2 = 10; exports.aaaa = 10; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var server_1 = require("./server"); exports.xxxx = server_1.a; var server_2 = require("./server"); diff --git a/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js b/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js index 2a00feccd3b59..a89090fa4f373 100644 --- a/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js +++ b/tests/baselines/reference/es6ImportNamedImportWithTypesAndValues.js @@ -21,7 +21,7 @@ export var cVal = new C(); //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { this.prop = "hello"; @@ -38,7 +38,7 @@ var C2 = (function () { exports.C2 = C2; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var server_1 = require("./server"); // Shouldnt emit I and C2 into the js file and emit C and I in .d.ts file exports.cVal = new server_1.C(); diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js b/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js index f6134e3d89956..627c4473c8cdb 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js +++ b/tests/baselines/reference/es6ImportWithoutFromClauseAmd.js @@ -15,19 +15,19 @@ var _b = 10; //// [es6ImportWithoutFromClauseAmd_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; }); //// [es6ImportWithoutFromClauseAmd_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.b = 10; }); //// [es6ImportWithoutFromClauseAmd_2.js] define(["require", "exports", "es6ImportWithoutFromClauseAmd_0", "es6ImportWithoutFromClauseAmd_2"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var _a = 10; var _b = 10; }); diff --git a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js index 755ec99d2584c..e5ff286a39b55 100644 --- a/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js +++ b/tests/baselines/reference/es6ImportWithoutFromClauseWithExport.js @@ -8,11 +8,11 @@ export import "server"; //// [server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; //// [client.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("server"); diff --git a/tests/baselines/reference/exportAndImport-es3-amd.js b/tests/baselines/reference/exportAndImport-es3-amd.js index ff341f922b5f2..289dc26c6605a 100644 --- a/tests/baselines/reference/exportAndImport-es3-amd.js +++ b/tests/baselines/reference/exportAndImport-es3-amd.js @@ -14,17 +14,17 @@ export default function f2() { //// [m1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function f1() { } - exports["default"] = f1; + exports.default = f1; }); //// [m2.js] define(["require", "exports", "./m1"], function (require, exports, m1_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function f2() { - m1_1["default"](); + m1_1.default(); } - exports["default"] = f2; + exports.default = f2; }); diff --git a/tests/baselines/reference/exportAndImport-es3.js b/tests/baselines/reference/exportAndImport-es3.js index 48b3e94a2f218..3be0240b16dca 100644 --- a/tests/baselines/reference/exportAndImport-es3.js +++ b/tests/baselines/reference/exportAndImport-es3.js @@ -13,15 +13,15 @@ export default function f2() { //// [m1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function f1() { } -exports["default"] = f1; +exports.default = f1; //// [m2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1_1 = require("./m1"); function f2() { - m1_1["default"](); + m1_1.default(); } -exports["default"] = f2; +exports.default = f2; diff --git a/tests/baselines/reference/exportArrayBindingPattern.js b/tests/baselines/reference/exportArrayBindingPattern.js index b556810976362..2cbd4e5000b93 100644 --- a/tests/baselines/reference/exportArrayBindingPattern.js +++ b/tests/baselines/reference/exportArrayBindingPattern.js @@ -5,7 +5,7 @@ export { a, b }; //// [exportArrayBindingPattern.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // issue: https://github.com/Microsoft/TypeScript/issues/10778 var _a = [1, 2, 3], a = _a[0], b = _a[2]; exports.a = a; diff --git a/tests/baselines/reference/exportAssignClassAndModule.js b/tests/baselines/reference/exportAssignClassAndModule.js index 9f3eaf78480ba..6a1c317aa91af 100644 --- a/tests/baselines/reference/exportAssignClassAndModule.js +++ b/tests/baselines/reference/exportAssignClassAndModule.js @@ -28,7 +28,7 @@ var Foo = (function () { module.exports = Foo; //// [exportAssignClassAndModule_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var z; var zz; zz.x; diff --git a/tests/baselines/reference/exportAssignDottedName.js b/tests/baselines/reference/exportAssignDottedName.js index 592d97dbaa0d3..133b5cb906eb9 100644 --- a/tests/baselines/reference/exportAssignDottedName.js +++ b/tests/baselines/reference/exportAssignDottedName.js @@ -12,7 +12,7 @@ export = foo1.x; // Ok //// [foo1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function x() { return true; } diff --git a/tests/baselines/reference/exportAssignImportedIdentifier.js b/tests/baselines/reference/exportAssignImportedIdentifier.js index 208df4eff6300..54c31e61a3b15 100644 --- a/tests/baselines/reference/exportAssignImportedIdentifier.js +++ b/tests/baselines/reference/exportAssignImportedIdentifier.js @@ -16,7 +16,7 @@ var x = foo2(); // should be boolean //// [foo1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function x() { return true; } @@ -28,6 +28,6 @@ var x = foo1.x; module.exports = x; //// [foo3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo2 = require("./foo2"); var x = foo2(); // should be boolean diff --git a/tests/baselines/reference/exportAssignTypes.js b/tests/baselines/reference/exportAssignTypes.js index bed4480f3935d..8033907637eae 100644 --- a/tests/baselines/reference/exportAssignTypes.js +++ b/tests/baselines/reference/exportAssignTypes.js @@ -85,7 +85,7 @@ function x(a) { module.exports = x; //// [consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var iString = require("./expString"); var v1 = iString; var iNumber = require("./expNumber"); diff --git a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js index 2d36cffdd176e..afe0f74d66a07 100644 --- a/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js +++ b/tests/baselines/reference/exportAssignedTypeAsTypeAnnotation.js @@ -16,11 +16,11 @@ var t2: test; // should not raise a 'container type' error //// [exportAssignedTypeAsTypeAnnotation_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [exportAssignedTypeAsTypeAnnotation_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var t2; // should not raise a 'container type' error }); diff --git a/tests/baselines/reference/exportAssignmentClass.js b/tests/baselines/reference/exportAssignmentClass.js index 549ad5bbd4dcb..4d816325ce116 100644 --- a/tests/baselines/reference/exportAssignmentClass.js +++ b/tests/baselines/reference/exportAssignmentClass.js @@ -25,7 +25,7 @@ define(["require", "exports"], function (require, exports) { //// [exportAssignmentClass_B.js] define(["require", "exports", "exportAssignmentClass_A"], function (require, exports, D) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = new D(); var x = d.p; }); diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js index eddbddf8d6d87..f17bbca5bac02 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.js +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.js @@ -24,7 +24,7 @@ var Foo = (function () { module.exports = Foo; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./foo_0"); var x = new foo(true); // Should error var y = new foo({ a: "test", b: 42 }); // Should be OK diff --git a/tests/baselines/reference/exportAssignmentEnum.js b/tests/baselines/reference/exportAssignmentEnum.js index a32da0a2e3f78..30af5e8e19e51 100644 --- a/tests/baselines/reference/exportAssignmentEnum.js +++ b/tests/baselines/reference/exportAssignmentEnum.js @@ -27,7 +27,7 @@ var E; module.exports = E; //// [exportAssignmentEnum_B.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var EnumE = require("./exportAssignmentEnum_A"); var a = EnumE.A; var b = EnumE.B; diff --git a/tests/baselines/reference/exportAssignmentFunction.js b/tests/baselines/reference/exportAssignmentFunction.js index 775bb6b1af195..144c143822532 100644 --- a/tests/baselines/reference/exportAssignmentFunction.js +++ b/tests/baselines/reference/exportAssignmentFunction.js @@ -19,6 +19,6 @@ define(["require", "exports"], function (require, exports) { //// [exportAssignmentFunction_B.js] define(["require", "exports", "exportAssignmentFunction_A"], function (require, exports, fooFunc) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var n = fooFunc(); }); diff --git a/tests/baselines/reference/exportAssignmentGenericType.js b/tests/baselines/reference/exportAssignmentGenericType.js index 95563aa36a9dd..2d466f9546209 100644 --- a/tests/baselines/reference/exportAssignmentGenericType.js +++ b/tests/baselines/reference/exportAssignmentGenericType.js @@ -22,7 +22,7 @@ var Foo = (function () { module.exports = Foo; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./foo_0"); var x = new foo(); var y = x.test; diff --git a/tests/baselines/reference/exportAssignmentInterface.js b/tests/baselines/reference/exportAssignmentInterface.js index f3cc9ae9bbe8c..bf2ba0932a395 100644 --- a/tests/baselines/reference/exportAssignmentInterface.js +++ b/tests/baselines/reference/exportAssignmentInterface.js @@ -17,12 +17,12 @@ var n: number = i.p1; //// [exportAssignmentInterface_A.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [exportAssignmentInterface_B.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var i; var n = i.p1; }); diff --git a/tests/baselines/reference/exportAssignmentInternalModule.js b/tests/baselines/reference/exportAssignmentInternalModule.js index b5c45785f8ff0..d7bdb367a3774 100644 --- a/tests/baselines/reference/exportAssignmentInternalModule.js +++ b/tests/baselines/reference/exportAssignmentInternalModule.js @@ -23,6 +23,6 @@ define(["require", "exports"], function (require, exports) { //// [exportAssignmentInternalModule_B.js] define(["require", "exports", "exportAssignmentInternalModule_A"], function (require, exports, modM) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var n = modM.x; }); diff --git a/tests/baselines/reference/exportAssignmentMergedInterface.js b/tests/baselines/reference/exportAssignmentMergedInterface.js index 3ee760dedfa54..421088c1c91ae 100644 --- a/tests/baselines/reference/exportAssignmentMergedInterface.js +++ b/tests/baselines/reference/exportAssignmentMergedInterface.js @@ -25,12 +25,12 @@ z = x.d; //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x; x("test"); x(42); diff --git a/tests/baselines/reference/exportAssignmentMergedModule.js b/tests/baselines/reference/exportAssignmentMergedModule.js index ef48895b5cb7c..7b6144c9074ed 100644 --- a/tests/baselines/reference/exportAssignmentMergedModule.js +++ b/tests/baselines/reference/exportAssignmentMergedModule.js @@ -47,7 +47,7 @@ var Foo; module.exports = Foo; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./foo_0"); var a = foo.a(); if (!!foo.b) { diff --git a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js index 6c61eeedfc110..db6b9e2fb3ef5 100644 --- a/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js +++ b/tests/baselines/reference/exportAssignmentOfDeclaredExternalModule.js @@ -18,10 +18,10 @@ var b = z(); // call signature - no error //// [exportAssignmentOfDeclaredExternalModule_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [exportAssignmentOfDeclaredExternalModule_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = new Sammy(); // error to use as constructor as there is not constructor symbol var y = Sammy(); // error to use interface name as call target var z; // no error - z is of type interface Sammy from module 'M' diff --git a/tests/baselines/reference/exportAssignmentOfGenericType1.js b/tests/baselines/reference/exportAssignmentOfGenericType1.js index 9cd15ec01a4c4..b80635f11f6df 100644 --- a/tests/baselines/reference/exportAssignmentOfGenericType1.js +++ b/tests/baselines/reference/exportAssignmentOfGenericType1.js @@ -36,7 +36,7 @@ var __extends = (this && this.__extends) || (function () { })(); define(["require", "exports", "exportAssignmentOfGenericType1_0"], function (require, exports, q) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var M = (function (_super) { __extends(M, _super); function M() { diff --git a/tests/baselines/reference/exportAssignmentTopLevelClodule.js b/tests/baselines/reference/exportAssignmentTopLevelClodule.js index f4001e5ab1572..7855f12b75959 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelClodule.js +++ b/tests/baselines/reference/exportAssignmentTopLevelClodule.js @@ -33,7 +33,7 @@ define(["require", "exports"], function (require, exports) { //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); if (foo.answer === 42) { var x = new foo(); } diff --git a/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js b/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js index 7ba5a655c2010..8a6d50840a93a 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js +++ b/tests/baselines/reference/exportAssignmentTopLevelEnumdule.js @@ -34,7 +34,7 @@ define(["require", "exports"], function (require, exports) { //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var color; if (color === foo.green) { color = foo.answer; diff --git a/tests/baselines/reference/exportAssignmentTopLevelFundule.js b/tests/baselines/reference/exportAssignmentTopLevelFundule.js index f122b8fbe8b06..ea3407bacb170 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelFundule.js +++ b/tests/baselines/reference/exportAssignmentTopLevelFundule.js @@ -30,7 +30,7 @@ define(["require", "exports"], function (require, exports) { //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); if (foo.answer === 42) { var x = foo(); } diff --git a/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js b/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js index a7acbaf34967c..8a804bb03a93f 100644 --- a/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js +++ b/tests/baselines/reference/exportAssignmentTopLevelIdentifier.js @@ -25,7 +25,7 @@ define(["require", "exports"], function (require, exports) { //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); if (foo.answer === 42) { } }); diff --git a/tests/baselines/reference/exportAssignmentVariable.js b/tests/baselines/reference/exportAssignmentVariable.js index e6ccdb46f9a5e..db9151151af82 100644 --- a/tests/baselines/reference/exportAssignmentVariable.js +++ b/tests/baselines/reference/exportAssignmentVariable.js @@ -16,6 +16,6 @@ var x = 0; module.exports = x; //// [exportAssignmentVariable_B.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var y = require("./exportAssignmentVariable_A"); var n = y; diff --git a/tests/baselines/reference/exportBinding.js b/tests/baselines/reference/exportBinding.js index 3e0f23ad31d30..ad091e59dbc88 100644 --- a/tests/baselines/reference/exportBinding.js +++ b/tests/baselines/reference/exportBinding.js @@ -19,8 +19,8 @@ var y = 'y' //// [exportConsts.js] "use strict"; -exports.__esModule = true; -exports["default"] = x; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = x; var x = 'x'; exports.x = x; exports.xx = x; @@ -32,8 +32,8 @@ var Y = (function () { exports.Z = Y; //// [exportVars.js] "use strict"; -exports.__esModule = true; -exports["default"] = y; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = y; var y = 'y'; exports.y = y; exports.yy = y; diff --git a/tests/baselines/reference/exportClassExtendingIntersection.js b/tests/baselines/reference/exportClassExtendingIntersection.js index 2309a9af9b692..790656ce6d822 100644 --- a/tests/baselines/reference/exportClassExtendingIntersection.js +++ b/tests/baselines/reference/exportClassExtendingIntersection.js @@ -37,7 +37,7 @@ const AnotherMixedClass = MyMixin(MyExtendedClass); //// [BaseClass.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var MyBaseClass = (function () { function MyBaseClass(value) { } @@ -56,7 +56,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function MyMixin(base) { return (function (_super) { __extends(class_1, _super); @@ -79,7 +79,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var BaseClass_1 = require("./BaseClass"); var MixinClass_1 = require("./MixinClass"); var MyExtendedClass = (function (_super) { @@ -92,7 +92,7 @@ var MyExtendedClass = (function (_super) { exports.MyExtendedClass = MyExtendedClass; //// [Main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var FinalClass_1 = require("./FinalClass"); var MixinClass_1 = require("./MixinClass"); var myExtendedClass = new FinalClass_1.MyExtendedClass('string'); diff --git a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js index c9c681ac40b3d..65b32f2aec08c 100644 --- a/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js +++ b/tests/baselines/reference/exportDeclarationWithModuleSpecifierNameOnNextLine1.js @@ -21,23 +21,23 @@ export { x as a, } from //// [t1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = "x"; //// [t2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.x = t1_1.x; //// [t3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [t4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.a = t1_1.x; //// [t5.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.a = t1_1.x; diff --git a/tests/baselines/reference/exportDeclarationsInAmbientNamespaces.js b/tests/baselines/reference/exportDeclarationsInAmbientNamespaces.js index 31191e213ef26..eea02574c2a18 100644 --- a/tests/baselines/reference/exportDeclarationsInAmbientNamespaces.js +++ b/tests/baselines/reference/exportDeclarationsInAmbientNamespaces.js @@ -9,4 +9,4 @@ Q.try(() => { }); //// [exportDeclarationsInAmbientNamespaces.js] -Q["try"](function () { }); +Q.try(function () { }); diff --git a/tests/baselines/reference/exportDeclareClass1.js b/tests/baselines/reference/exportDeclareClass1.js index 950b3db26e51d..1ce55206dca6b 100644 --- a/tests/baselines/reference/exportDeclareClass1.js +++ b/tests/baselines/reference/exportDeclareClass1.js @@ -12,7 +12,7 @@ //// [exportDeclareClass1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); ; ; }); diff --git a/tests/baselines/reference/exportDeclaredModule.js b/tests/baselines/reference/exportDeclaredModule.js index e0d3b25202546..dc1398747076d 100644 --- a/tests/baselines/reference/exportDeclaredModule.js +++ b/tests/baselines/reference/exportDeclaredModule.js @@ -16,6 +16,6 @@ var x: number = foo1.b(); module.exports = M1; //// [foo2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo1 = require("./foo1"); var x = foo1.b(); diff --git a/tests/baselines/reference/exportDefaultAbstractClass.js b/tests/baselines/reference/exportDefaultAbstractClass.js index c8dba03543dc1..1936f0b1149ea 100644 --- a/tests/baselines/reference/exportDefaultAbstractClass.js +++ b/tests/baselines/reference/exportDefaultAbstractClass.js @@ -9,13 +9,13 @@ import A from './a' //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } return A; }()); -exports["default"] = A; +exports.default = A; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/exportDefaultProperty.js b/tests/baselines/reference/exportDefaultProperty.js index dddea6a6b7342..7d879f5eaa150 100644 --- a/tests/baselines/reference/exportDefaultProperty.js +++ b/tests/baselines/reference/exportDefaultProperty.js @@ -43,7 +43,7 @@ fooLength + 1; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A; (function (A) { var B = (function () { @@ -56,21 +56,21 @@ var A; B.b = 0; })(B = A.B || (A.B = {})); })(A || (A = {})); -exports["default"] = A.B; +exports.default = A.B; //// [b.js] "use strict"; -exports.__esModule = true; -exports["default"] = "foo".length; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = "foo".length; //// [index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foobar_1 = require("foobar"); -var X = foobar_1["default"].X; +var X = foobar_1.default.X; var foobarx_1 = require("foobarx"); var x = X; -var x2 = foobarx_1["default"]; +var x2 = foobarx_1.default; var a_1 = require("./a"); -var b = new a_1["default"](a_1["default"].b); +var b = new a_1.default(a_1.default.b); var b_1 = require("./b"); -b_1["default"] + 1; +b_1.default + 1; diff --git a/tests/baselines/reference/exportDefaultProperty2.js b/tests/baselines/reference/exportDefaultProperty2.js index 5cc9dc47092be..539c215f3b1da 100644 --- a/tests/baselines/reference/exportDefaultProperty2.js +++ b/tests/baselines/reference/exportDefaultProperty2.js @@ -20,15 +20,15 @@ const x: B = { c: B }; //// [a.js] "use strict"; // This test is just like exportEqualsProperty2, but with `export default`. -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } return C; }()); -exports["default"] = C.B; +exports.default = C.B; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a_1 = require("./a"); -var x = { c: a_1["default"] }; +var x = { c: a_1.default }; diff --git a/tests/baselines/reference/exportEqualCallable.js b/tests/baselines/reference/exportEqualCallable.js index 830af3a2a3656..b92fff6fcf4df 100644 --- a/tests/baselines/reference/exportEqualCallable.js +++ b/tests/baselines/reference/exportEqualCallable.js @@ -21,6 +21,6 @@ define(["require", "exports"], function (require, exports) { //// [exportEqualCallable_1.js] define(["require", "exports", "exportEqualCallable_0"], function (require, exports, connect) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); connect(); }); diff --git a/tests/baselines/reference/exportEqualErrorType.js b/tests/baselines/reference/exportEqualErrorType.js index 4a65ce5fd4908..d94a01d5ee77e 100644 --- a/tests/baselines/reference/exportEqualErrorType.js +++ b/tests/baselines/reference/exportEqualErrorType.js @@ -30,6 +30,6 @@ define(["require", "exports"], function (require, exports) { //// [exportEqualErrorType_1.js] define(["require", "exports", "exportEqualErrorType_0"], function (require, exports, connect) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. }); diff --git a/tests/baselines/reference/exportEqualMemberMissing.js b/tests/baselines/reference/exportEqualMemberMissing.js index 68ac9485f5f2b..9533cd0fc2329 100644 --- a/tests/baselines/reference/exportEqualMemberMissing.js +++ b/tests/baselines/reference/exportEqualMemberMissing.js @@ -27,7 +27,7 @@ var server; module.exports = server; //// [exportEqualMemberMissing_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var connect = require("./exportEqualMemberMissing_0"); connect().use(connect.static('foo')); // Error 1 The property 'static' does not exist on value of type ''. diff --git a/tests/baselines/reference/exportEqualsDefaultProperty.js b/tests/baselines/reference/exportEqualsDefaultProperty.js index 3e7fc4d12afc4..0efeedc4b80f6 100644 --- a/tests/baselines/reference/exportEqualsDefaultProperty.js +++ b/tests/baselines/reference/exportEqualsDefaultProperty.js @@ -22,6 +22,6 @@ var x = { module.exports = x; //// [imp.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var exp_1 = require("./exp"); -exp_1["default"].toExponential(2); +exp_1.default.toExponential(2); diff --git a/tests/baselines/reference/exportEqualsProperty.js b/tests/baselines/reference/exportEqualsProperty.js index e6bd09d536743..fb0e852b5e050 100644 --- a/tests/baselines/reference/exportEqualsProperty.js +++ b/tests/baselines/reference/exportEqualsProperty.js @@ -60,7 +60,7 @@ module.exports = A.B; module.exports = "foo".length; //// [index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foobar_1 = require("foobar"); var X2 = require("foobarx"); diff --git a/tests/baselines/reference/exportEqualsProperty2.js b/tests/baselines/reference/exportEqualsProperty2.js index 5cfcab3e774bb..63d844dc299e6 100644 --- a/tests/baselines/reference/exportEqualsProperty2.js +++ b/tests/baselines/reference/exportEqualsProperty2.js @@ -28,6 +28,6 @@ var C = (function () { module.exports = C.B; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = require("./a"); var x = { c: B }; diff --git a/tests/baselines/reference/exportImport.js b/tests/baselines/reference/exportImport.js index 031dc8974ed46..b3ebf340b2fdc 100644 --- a/tests/baselines/reference/exportImport.js +++ b/tests/baselines/reference/exportImport.js @@ -28,13 +28,13 @@ define(["require", "exports"], function (require, exports) { //// [exporter.js] define(["require", "exports", "./w1"], function (require, exports, w) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.w = w; }); //// [consumer.js] define(["require", "exports", "./exporter"], function (require, exports, e) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function w() { return new e.w(); } diff --git a/tests/baselines/reference/exportImportMultipleFiles.js b/tests/baselines/reference/exportImportMultipleFiles.js index 31f5f218d6574..e0ae7dd863880 100644 --- a/tests/baselines/reference/exportImportMultipleFiles.js +++ b/tests/baselines/reference/exportImportMultipleFiles.js @@ -15,20 +15,20 @@ lib.math.add(3, 4); // Shouldnt be error //// [exportImportMultipleFiles_math.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function add(a, b) { return a + b; } exports.add = add; }); //// [exportImportMultipleFiles_library.js] define(["require", "exports", "exportImportMultipleFiles_math"], function (require, exports, math) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.math = math; exports.math.add(3, 4); // OK }); //// [exportImportMultipleFiles_userCode.js] define(["require", "exports", "./exportImportMultipleFiles_library"], function (require, exports, lib) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); lib.math.add(3, 4); // Shouldnt be error }); diff --git a/tests/baselines/reference/exportImportNonInstantiatedModule2.js b/tests/baselines/reference/exportImportNonInstantiatedModule2.js index a1217fa485b5e..c31e9e57b0e05 100644 --- a/tests/baselines/reference/exportImportNonInstantiatedModule2.js +++ b/tests/baselines/reference/exportImportNonInstantiatedModule2.js @@ -17,17 +17,17 @@ export function w(): e.w { // Should be OK //// [w1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [exporter.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [consumer.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function w() { return { name: 'value' }; } diff --git a/tests/baselines/reference/exportNonInitializedVariablesAMD.js b/tests/baselines/reference/exportNonInitializedVariablesAMD.js index 62b0e45e3a9c4..847f623b5f4fa 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesAMD.js +++ b/tests/baselines/reference/exportNonInitializedVariablesAMD.js @@ -36,7 +36,7 @@ export let h1: D = new D; //// [exportNonInitializedVariablesAMD.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var ; let; var ; diff --git a/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js b/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js index 362798c15160c..82edd8316962b 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js +++ b/tests/baselines/reference/exportNonInitializedVariablesCommonJS.js @@ -35,7 +35,7 @@ export let h1: D = new D; //// [exportNonInitializedVariablesCommonJS.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ; let; var ; diff --git a/tests/baselines/reference/exportNonInitializedVariablesUMD.js b/tests/baselines/reference/exportNonInitializedVariablesUMD.js index cd6ef353fe3d0..ef7c6ffadf06a 100644 --- a/tests/baselines/reference/exportNonInitializedVariablesUMD.js +++ b/tests/baselines/reference/exportNonInitializedVariablesUMD.js @@ -44,7 +44,7 @@ export let h1: D = new D; } })(function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var ; let; var ; diff --git a/tests/baselines/reference/exportRedeclarationTypeAliases.js b/tests/baselines/reference/exportRedeclarationTypeAliases.js index c3e97cf3e106b..0df668b555c32 100644 --- a/tests/baselines/reference/exportRedeclarationTypeAliases.js +++ b/tests/baselines/reference/exportRedeclarationTypeAliases.js @@ -5,6 +5,6 @@ export function Foo(): any {} //// [exportRedeclarationTypeAliases.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function Foo() { } exports.Foo = Foo; diff --git a/tests/baselines/reference/exportSameNameFuncVar.js b/tests/baselines/reference/exportSameNameFuncVar.js index dc0b24b98c3a3..7085dd92877d5 100644 --- a/tests/baselines/reference/exportSameNameFuncVar.js +++ b/tests/baselines/reference/exportSameNameFuncVar.js @@ -6,7 +6,7 @@ export function a() { //// [exportSameNameFuncVar.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 10; function a() { } diff --git a/tests/baselines/reference/exportSpecifierForAGlobal.js b/tests/baselines/reference/exportSpecifierForAGlobal.js index 6023b7c7f14b2..f310fbfb3c452 100644 --- a/tests/baselines/reference/exportSpecifierForAGlobal.js +++ b/tests/baselines/reference/exportSpecifierForAGlobal.js @@ -13,7 +13,7 @@ export function f() { //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function f() { var x; return x; diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js index 0a8ebd10ee4ad..bdb0e9e04bf80 100644 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js +++ b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration2.js @@ -10,4 +10,4 @@ export declare function foo(): X.bar; //// [exportSpecifierReferencingOuterDeclaration2_A.js] //// [exportSpecifierReferencingOuterDeclaration2_B.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js index f0c6dd55984e6..740bb41be73c8 100644 --- a/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js +++ b/tests/baselines/reference/exportSpecifierReferencingOuterDeclaration4.js @@ -12,4 +12,4 @@ export declare function bar(): X.bar; // error //// [exportSpecifierReferencingOuterDeclaration2_A.js] //// [exportSpecifierReferencingOuterDeclaration2_B.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/exportStarForValues.js b/tests/baselines/reference/exportStarForValues.js index dd8b9c7b4d4d2..ddc55ba0d00ce 100644 --- a/tests/baselines/reference/exportStarForValues.js +++ b/tests/baselines/reference/exportStarForValues.js @@ -10,11 +10,11 @@ var x; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x; }); diff --git a/tests/baselines/reference/exportStarForValues2.js b/tests/baselines/reference/exportStarForValues2.js index f10ae1b9936fa..bd7d789e78c29 100644 --- a/tests/baselines/reference/exportStarForValues2.js +++ b/tests/baselines/reference/exportStarForValues2.js @@ -14,17 +14,17 @@ var x = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); //// [file3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); diff --git a/tests/baselines/reference/exportStarForValues3.js b/tests/baselines/reference/exportStarForValues3.js index 83a818a3e81de..ffbd2bffcd641 100644 --- a/tests/baselines/reference/exportStarForValues3.js +++ b/tests/baselines/reference/exportStarForValues3.js @@ -26,29 +26,29 @@ var x = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); //// [file3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); //// [file4.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); //// [file5.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); diff --git a/tests/baselines/reference/exportStarForValues4.js b/tests/baselines/reference/exportStarForValues4.js index 0a49e982e29ec..e7729b892ef84 100644 --- a/tests/baselines/reference/exportStarForValues4.js +++ b/tests/baselines/reference/exportStarForValues4.js @@ -18,17 +18,17 @@ var x = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; }); diff --git a/tests/baselines/reference/exportStarForValues5.js b/tests/baselines/reference/exportStarForValues5.js index 812058ebd06f3..6acfe0b3e5135 100644 --- a/tests/baselines/reference/exportStarForValues5.js +++ b/tests/baselines/reference/exportStarForValues5.js @@ -10,10 +10,10 @@ export var x; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/exportStarForValues7.js b/tests/baselines/reference/exportStarForValues7.js index af213d1308028..9fe8ed92acccc 100644 --- a/tests/baselines/reference/exportStarForValues7.js +++ b/tests/baselines/reference/exportStarForValues7.js @@ -14,12 +14,12 @@ export var x = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [file3.js] @@ -28,7 +28,7 @@ define(["require", "exports", "file2"], function (require, exports, file2_1) { function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); __export(file2_1); exports.x = 1; }); diff --git a/tests/baselines/reference/exportStarForValues8.js b/tests/baselines/reference/exportStarForValues8.js index 7a0045c22cb23..709e6ff128b95 100644 --- a/tests/baselines/reference/exportStarForValues8.js +++ b/tests/baselines/reference/exportStarForValues8.js @@ -26,18 +26,18 @@ export var x = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [file3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [file4.js] @@ -46,7 +46,7 @@ define(["require", "exports", "file2", "file3"], function (require, exports, fil function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); __export(file2_1); __export(file3_1); exports.x = 1; @@ -57,7 +57,7 @@ define(["require", "exports", "file4"], function (require, exports, file4_1) { function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); __export(file4_1); exports.x = 1; }); diff --git a/tests/baselines/reference/exportStarForValues9.js b/tests/baselines/reference/exportStarForValues9.js index 8eb92c05e741f..2d4070356bb1e 100644 --- a/tests/baselines/reference/exportStarForValues9.js +++ b/tests/baselines/reference/exportStarForValues9.js @@ -18,7 +18,7 @@ export var x = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file3.js] define(["require", "exports", "file2"], function (require, exports, file2_1) { @@ -26,7 +26,7 @@ define(["require", "exports", "file2"], function (require, exports, file2_1) { function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); __export(file2_1); exports.x = 1; }); @@ -36,7 +36,7 @@ define(["require", "exports", "file3"], function (require, exports, file3_1) { function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); __export(file3_1); exports.x = 1; }); diff --git a/tests/baselines/reference/exportToString.js b/tests/baselines/reference/exportToString.js index d527a02741c95..2483e1a44ed0e 100644 --- a/tests/baselines/reference/exportToString.js +++ b/tests/baselines/reference/exportToString.js @@ -5,6 +5,6 @@ export { toString }; //// [exportToString.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var toString = 0; exports.toString = toString; diff --git a/tests/baselines/reference/exportVisibility.js b/tests/baselines/reference/exportVisibility.js index fbb2555d54b75..861cabf7204b2 100644 --- a/tests/baselines/reference/exportVisibility.js +++ b/tests/baselines/reference/exportVisibility.js @@ -11,7 +11,7 @@ export function test(foo: Foo) { //// [exportVisibility.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/exportedBlockScopedDeclarations.js b/tests/baselines/reference/exportedBlockScopedDeclarations.js index 068ac5db23b84..cc20c079d480b 100644 --- a/tests/baselines/reference/exportedBlockScopedDeclarations.js +++ b/tests/baselines/reference/exportedBlockScopedDeclarations.js @@ -20,7 +20,7 @@ namespace NS1 { //// [exportedBlockScopedDeclarations.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var foo = foo; // compile error exports.bar = exports.bar; // should be compile error function f() { diff --git a/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js b/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js index 75b9378c3f49f..bbab9a12a9d88 100644 --- a/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js +++ b/tests/baselines/reference/exportedInterfaceInaccessibleInCallbackInModule.js @@ -15,5 +15,5 @@ export declare class TPromise { //// [exportedInterfaceInaccessibleInCallbackInModule.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/exportedVariable1.js b/tests/baselines/reference/exportedVariable1.js index 80a7fc6a39152..a42db89df0da1 100644 --- a/tests/baselines/reference/exportedVariable1.js +++ b/tests/baselines/reference/exportedVariable1.js @@ -6,7 +6,7 @@ var upper = foo.name.toUpperCase(); //// [exportedVariable1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = { name: "Bill" }; var upper = exports.foo.name.toUpperCase(); }); diff --git a/tests/baselines/reference/exportingContainingVisibleType.errors.txt b/tests/baselines/reference/exportingContainingVisibleType.errors.txt deleted file mode 100644 index 83f722b97dac0..0000000000000 --- a/tests/baselines/reference/exportingContainingVisibleType.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -tests/cases/compiler/exportingContainingVisibleType.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/exportingContainingVisibleType.ts (1 errors) ==== - class Foo { - public get foo() { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var i: Foo; - return i; // Should be fine (previous bug report visibility error). - - } - } - - export var x = 5; - \ No newline at end of file diff --git a/tests/baselines/reference/exportingContainingVisibleType.js b/tests/baselines/reference/exportingContainingVisibleType.js index d50a2a35f0618..a2eae5021e667 100644 --- a/tests/baselines/reference/exportingContainingVisibleType.js +++ b/tests/baselines/reference/exportingContainingVisibleType.js @@ -13,7 +13,7 @@ export var x = 5; //// [exportingContainingVisibleType.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/exportingContainingVisibleType.symbols b/tests/baselines/reference/exportingContainingVisibleType.symbols new file mode 100644 index 0000000000000..1efc4db110985 --- /dev/null +++ b/tests/baselines/reference/exportingContainingVisibleType.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/exportingContainingVisibleType.ts === +class Foo { +>Foo : Symbol(Foo, Decl(exportingContainingVisibleType.ts, 0, 0)) + + public get foo() { +>foo : Symbol(Foo.foo, Decl(exportingContainingVisibleType.ts, 0, 11)) + + var i: Foo; +>i : Symbol(i, Decl(exportingContainingVisibleType.ts, 2, 11)) +>Foo : Symbol(Foo, Decl(exportingContainingVisibleType.ts, 0, 0)) + + return i; // Should be fine (previous bug report visibility error). +>i : Symbol(i, Decl(exportingContainingVisibleType.ts, 2, 11)) + + } +} + +export var x = 5; +>x : Symbol(x, Decl(exportingContainingVisibleType.ts, 8, 10)) + diff --git a/tests/baselines/reference/exportingContainingVisibleType.types b/tests/baselines/reference/exportingContainingVisibleType.types new file mode 100644 index 0000000000000..7f8deda1beb3b --- /dev/null +++ b/tests/baselines/reference/exportingContainingVisibleType.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/exportingContainingVisibleType.ts === +class Foo { +>Foo : Foo + + public get foo() { +>foo : Foo + + var i: Foo; +>i : Foo +>Foo : Foo + + return i; // Should be fine (previous bug report visibility error). +>i : Foo + + } +} + +export var x = 5; +>x : number +>5 : 5 + diff --git a/tests/baselines/reference/exportsAndImports1.js b/tests/baselines/reference/exportsAndImports1.js index 30fef6e7ccfdf..5de13d2a8ddcd 100644 --- a/tests/baselines/reference/exportsAndImports1.js +++ b/tests/baselines/reference/exportsAndImports1.js @@ -35,7 +35,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var v = 1; exports.v = v; function f() { } @@ -61,7 +61,7 @@ var a = M.x; exports.a = a; //// [t2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; @@ -71,7 +71,7 @@ exports.M = t1_1.M; exports.a = t1_1.a; //// [t3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.v = t1_1.v; exports.f = t1_1.f; diff --git a/tests/baselines/reference/exportsAndImports2.js b/tests/baselines/reference/exportsAndImports2.js index d905ab3827fc5..0b719e9ce7eac 100644 --- a/tests/baselines/reference/exportsAndImports2.js +++ b/tests/baselines/reference/exportsAndImports2.js @@ -14,18 +14,18 @@ export { x as y, y as x }; //// [t1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = "x"; exports.y = "y"; //// [t2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; //// [t3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.y = t1_1.x; exports.x = t1_1.y; diff --git a/tests/baselines/reference/exportsAndImports3.js b/tests/baselines/reference/exportsAndImports3.js index 77ac28f4800e6..d36a75fb9512f 100644 --- a/tests/baselines/reference/exportsAndImports3.js +++ b/tests/baselines/reference/exportsAndImports3.js @@ -35,7 +35,7 @@ export { v, f, C, I, E, D, M, N, T, a }; //// [t1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.v = 1; exports.v1 = exports.v; function f() { } @@ -63,7 +63,7 @@ exports.a = M.x; exports.a1 = exports.a; //// [t2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; @@ -73,7 +73,7 @@ exports.M = t1_1.M1; exports.a = t1_1.a1; //// [t3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.v = t1_1.v1; exports.f = t1_1.f1; diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores1.js b/tests/baselines/reference/exportsAndImportsWithUnderscores1.js index 284537252fe70..4a79981889d1f 100644 --- a/tests/baselines/reference/exportsAndImportsWithUnderscores1.js +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores1.js @@ -15,15 +15,15 @@ const { __, _, ___ } = R; //// [m1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var R; -exports["default"] = R = { +exports.default = R = { "__": 20, "_": 10, "___": 30 }; //// [m2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1_1 = require("./m1"); -var __ = m1_1["default"].__, _ = m1_1["default"]._, ___ = m1_1["default"].___; +var __ = m1_1.default.__, _ = m1_1.default._, ___ = m1_1.default.___; diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores2.js b/tests/baselines/reference/exportsAndImportsWithUnderscores2.js index 90cbc11b95b10..4d4f0e53c1679 100644 --- a/tests/baselines/reference/exportsAndImportsWithUnderscores2.js +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores2.js @@ -14,14 +14,14 @@ const { __esmodule, __proto__ } = R; //// [m1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var R; -exports["default"] = R = { +exports.default = R = { "__esmodule": true, "__proto__": {} }; //// [m2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1_1 = require("./m1"); -var __esmodule = m1_1["default"].__esmodule, __proto__ = m1_1["default"].__proto__; +var __esmodule = m1_1.default.__esmodule, __proto__ = m1_1.default.__proto__; diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores3.js b/tests/baselines/reference/exportsAndImportsWithUnderscores3.js index 0aead5f1f8bbc..2e1be100341ab 100644 --- a/tests/baselines/reference/exportsAndImportsWithUnderscores3.js +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores3.js @@ -15,15 +15,15 @@ const { ___, ___hello, _hi } = R; //// [m1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var R; -exports["default"] = R = { +exports.default = R = { "___": 30, "___hello": 21, "_hi": 40 }; //// [m2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1_1 = require("./m1"); -var ___ = m1_1["default"].___, ___hello = m1_1["default"].___hello, _hi = m1_1["default"]._hi; +var ___ = m1_1.default.___, ___hello = m1_1.default.___hello, _hi = m1_1.default._hi; diff --git a/tests/baselines/reference/exportsAndImportsWithUnderscores4.js b/tests/baselines/reference/exportsAndImportsWithUnderscores4.js index ad50ca41efff8..c6d981ce4e70c 100644 --- a/tests/baselines/reference/exportsAndImportsWithUnderscores4.js +++ b/tests/baselines/reference/exportsAndImportsWithUnderscores4.js @@ -35,7 +35,7 @@ _hi(); //// [m1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function _() { console.log("_"); } @@ -66,7 +66,7 @@ function ___hello() { exports.___hello = ___hello; //// [m2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1_1 = require("./m1"); m1_1._(); m1_1.__(); diff --git a/tests/baselines/reference/extendClassExpressionFromModule.js b/tests/baselines/reference/extendClassExpressionFromModule.js index 28c9488f7fa35..e0707e839af8d 100644 --- a/tests/baselines/reference/extendClassExpressionFromModule.js +++ b/tests/baselines/reference/extendClassExpressionFromModule.js @@ -31,7 +31,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo1 = require("./foo1"); var x = foo1; var y = (function (_super) { diff --git a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js index c8f7719faf026..c196308898855 100644 --- a/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js +++ b/tests/baselines/reference/extendingClassFromAliasAndUsageInIndexer.js @@ -34,7 +34,7 @@ var visModel = new moduleMap[moduleName].VisualizationModel(); //// [extendingClassFromAliasAndUsageInIndexer_backbone.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Model = (function () { function Model() { } @@ -53,7 +53,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -75,7 +75,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); var VisualizationModel = (function (_super) { __extends(VisualizationModel, _super); @@ -87,7 +87,7 @@ var VisualizationModel = (function (_super) { exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var moduleA = require("./extendingClassFromAliasAndUsageInIndexer_moduleA"); var moduleB = require("./extendingClassFromAliasAndUsageInIndexer_moduleB"); var moduleATyped = moduleA; diff --git a/tests/baselines/reference/extendsUntypedModule.js b/tests/baselines/reference/extendsUntypedModule.js index 5ccd7babe9890..92a4378e4f0d5 100644 --- a/tests/baselines/reference/extendsUntypedModule.js +++ b/tests/baselines/reference/extendsUntypedModule.js @@ -26,7 +26,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo_1 = require("foo"); var A = (function (_super) { __extends(A, _super); @@ -34,5 +34,5 @@ var A = (function (_super) { return _super !== null && _super.apply(this, arguments) || this; } return A; -}(foo_1["default"])); +}(foo_1.default)); exports.A = A; diff --git a/tests/baselines/reference/externalModuleAssignToVar.js b/tests/baselines/reference/externalModuleAssignToVar.js index 70ce2281ad3d6..3c572cbf2c749 100644 --- a/tests/baselines/reference/externalModuleAssignToVar.js +++ b/tests/baselines/reference/externalModuleAssignToVar.js @@ -29,7 +29,7 @@ y3 = ext3; // ok //// [externalModuleAssignToVar_core_require.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } @@ -60,7 +60,7 @@ define(["require", "exports"], function (require, exports) { //// [externalModuleAssignToVar_core.js] define(["require", "exports", "externalModuleAssignToVar_core_require", "externalModuleAssignToVar_core_require2", "externalModuleAssignToVar_ext"], function (require, exports, ext, ext2, ext3) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var y1 = ext; y1 = ext; // ok var y2 = ext2; diff --git a/tests/baselines/reference/externalModuleExportingGenericClass.js b/tests/baselines/reference/externalModuleExportingGenericClass.js index 339eaec2cbfa7..a6184be36e710 100644 --- a/tests/baselines/reference/externalModuleExportingGenericClass.js +++ b/tests/baselines/reference/externalModuleExportingGenericClass.js @@ -24,7 +24,7 @@ var C = (function () { module.exports = C; //// [externalModuleExportingGenericClass_file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a = require("./externalModuleExportingGenericClass_file0"); var v; // this should report error var v2 = (new a()).foo; diff --git a/tests/baselines/reference/externalModuleImmutableBindings.js b/tests/baselines/reference/externalModuleImmutableBindings.js index d6f5913f5d1d3..dc956d995f1ff 100644 --- a/tests/baselines/reference/externalModuleImmutableBindings.js +++ b/tests/baselines/reference/externalModuleImmutableBindings.js @@ -52,11 +52,11 @@ for ((stuff[n]) of []) {} //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // all mutations below are illegal and should be fixed var stuff = require("./f1"); var n = 'baz'; diff --git a/tests/baselines/reference/externalModuleQualification.js b/tests/baselines/reference/externalModuleQualification.js index 0402847a13a93..3edb01ff94eb6 100644 --- a/tests/baselines/reference/externalModuleQualification.js +++ b/tests/baselines/reference/externalModuleQualification.js @@ -13,7 +13,7 @@ class NavigateAction { //// [externalModuleQualification.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.ID = "test"; var DiffEditor = (function () { function DiffEditor(id) { diff --git a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js index e5a854077c5b1..1bbb7985c1f89 100644 --- a/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js +++ b/tests/baselines/reference/externalModuleReferenceOfImportDeclarationWithExportModifier.js @@ -11,7 +11,7 @@ file1.foo(); //// [externalModuleReferenceOfImportDeclarationWithExportModifier_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo() { } exports.foo = foo; ; @@ -19,7 +19,7 @@ define(["require", "exports"], function (require, exports) { //// [externalModuleReferenceOfImportDeclarationWithExportModifier_1.js] define(["require", "exports", "externalModuleReferenceOfImportDeclarationWithExportModifier_0"], function (require, exports, file1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.file1 = file1; exports.file1.foo(); }); diff --git a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js index 3a930d8e03a41..440e33677b305 100644 --- a/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js +++ b/tests/baselines/reference/externalModuleRefernceResolutionOrderInImportDeclaration.js @@ -20,13 +20,13 @@ file1.bar(); //// [externalModuleRefernceResolutionOrderInImportDeclaration_file2.js] //// [externalModuleRefernceResolutionOrderInImportDeclaration_file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { } exports.foo = foo; ; //// [externalModuleRefernceResolutionOrderInImportDeclaration_file3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var file1 = require("./externalModuleRefernceResolutionOrderInImportDeclaration_file1"); file1.foo(); diff --git a/tests/baselines/reference/externalModuleResolution.js b/tests/baselines/reference/externalModuleResolution.js index 1ef5be538831e..1e437ea1eb0a0 100644 --- a/tests/baselines/reference/externalModuleResolution.js +++ b/tests/baselines/reference/externalModuleResolution.js @@ -25,6 +25,6 @@ var M2; module.exports = M2; //// [consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = require("./foo"); x.Y; // .ts should be picked diff --git a/tests/baselines/reference/externalModuleResolution2.js b/tests/baselines/reference/externalModuleResolution2.js index 2c3c9facff18c..eb6b81a2ad27c 100644 --- a/tests/baselines/reference/externalModuleResolution2.js +++ b/tests/baselines/reference/externalModuleResolution2.js @@ -26,6 +26,6 @@ var M2; module.exports = M2; //// [consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = require("./foo"); x.X; // .ts should be picked diff --git a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js index 972b4b3b2eab2..b50d4f1e49ed9 100644 --- a/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js +++ b/tests/baselines/reference/externalModuleWithoutCompilerFlag1.js @@ -5,4 +5,4 @@ //// [externalModuleWithoutCompilerFlag1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/fatarrowfunctionsErrors.js b/tests/baselines/reference/fatarrowfunctionsErrors.js index 0f318f1aa84ad..a3e848e90921c 100644 --- a/tests/baselines/reference/fatarrowfunctionsErrors.js +++ b/tests/baselines/reference/fatarrowfunctionsErrors.js @@ -20,7 +20,7 @@ foo(function () { } return 0; }); -foo((1), { "return": 0 }); +foo((1), { return: 0 }); foo(function (x) { return x; }); foo(function (x) { if (x === void 0) { x = 0; } diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt index e78ccce2b8378..4c8fa1a492f55 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt +++ b/tests/baselines/reference/fieldAndGetterWithSameName.errors.txt @@ -1,16 +1,13 @@ tests/cases/compiler/fieldAndGetterWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'. -tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/fieldAndGetterWithSameName.ts(3,7): error TS2300: Duplicate identifier 'x'. -==== tests/cases/compiler/fieldAndGetterWithSameName.ts (3 errors) ==== +==== tests/cases/compiler/fieldAndGetterWithSameName.ts (2 errors) ==== export class C { x: number; ~ !!! error TS2300: Duplicate identifier 'x'. get x(): number { return 1; } ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/fieldAndGetterWithSameName.js b/tests/baselines/reference/fieldAndGetterWithSameName.js index 673a0372f054d..78f55c6d9af54 100644 --- a/tests/baselines/reference/fieldAndGetterWithSameName.js +++ b/tests/baselines/reference/fieldAndGetterWithSameName.js @@ -7,7 +7,7 @@ export class C { //// [fieldAndGetterWithSameName.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.js b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.js index 9b48439ad5608..64822d46a2dc8 100644 --- a/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.js +++ b/tests/baselines/reference/filesEmittingIntoSameOutputWithOutOption.js @@ -12,7 +12,7 @@ function foo() { //// [a.js] define("a", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c = (function () { function c() { } diff --git a/tests/baselines/reference/functionAndImportNameConflict.js b/tests/baselines/reference/functionAndImportNameConflict.js index 2bc6d91b2c3e6..3961491b32b84 100644 --- a/tests/baselines/reference/functionAndImportNameConflict.js +++ b/tests/baselines/reference/functionAndImportNameConflict.js @@ -11,13 +11,13 @@ export function f() { //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function f() { } exports.f = f; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function f() { } exports.f = f; diff --git a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt index a976048d0e3a4..efaf84b6d0a3e 100644 --- a/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt +++ b/tests/baselines/reference/functionAndPropertyNameConflict.errors.txt @@ -1,17 +1,14 @@ tests/cases/compiler/functionAndPropertyNameConflict.ts(2,12): error TS2300: Duplicate identifier 'aaaaa'. -tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/functionAndPropertyNameConflict.ts(3,16): error TS2300: Duplicate identifier 'aaaaa'. -==== tests/cases/compiler/functionAndPropertyNameConflict.ts (3 errors) ==== +==== tests/cases/compiler/functionAndPropertyNameConflict.ts (2 errors) ==== class C65 { public aaaaa() { } ~~~~~ !!! error TS2300: Duplicate identifier 'aaaaa'. public get aaaaa() { ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~ !!! error TS2300: Duplicate identifier 'aaaaa'. return 1; } diff --git a/tests/baselines/reference/functionLikeInParameterInitializer.js b/tests/baselines/reference/functionLikeInParameterInitializer.js index 9bf71aff1eab7..2920245ea67e0 100644 --- a/tests/baselines/reference/functionLikeInParameterInitializer.js +++ b/tests/baselines/reference/functionLikeInParameterInitializer.js @@ -21,7 +21,7 @@ export function baz3(func = class { x = foo }) { //// [functionLikeInParameterInitializer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // error function bar(func) { if (func === void 0) { func = function () { return foo; }; } diff --git a/tests/baselines/reference/genericArrayExtenstions.js b/tests/baselines/reference/genericArrayExtenstions.js index 87a7fba25c114..df0e287c7d2f0 100644 --- a/tests/baselines/reference/genericArrayExtenstions.js +++ b/tests/baselines/reference/genericArrayExtenstions.js @@ -7,4 +7,4 @@ concat(...items: T[]): T[]; //// [genericArrayExtenstions.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/genericClassesInModule2.js b/tests/baselines/reference/genericClassesInModule2.js index 738fa996cf785..4f9f4c40a5931 100644 --- a/tests/baselines/reference/genericClassesInModule2.js +++ b/tests/baselines/reference/genericClassesInModule2.js @@ -23,7 +23,7 @@ export class B { //// [genericClassesInModule2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A(callback) { this.callback = callback; diff --git a/tests/baselines/reference/genericGetter.errors.txt b/tests/baselines/reference/genericGetter.errors.txt index 3a8edb602e0ff..4cdaf754fd2fc 100644 --- a/tests/baselines/reference/genericGetter.errors.txt +++ b/tests/baselines/reference/genericGetter.errors.txt @@ -1,13 +1,10 @@ -tests/cases/compiler/genericGetter.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/genericGetter.ts(9,5): error TS2322: Type 'number' is not assignable to type 'string'. -==== tests/cases/compiler/genericGetter.ts (2 errors) ==== +==== tests/cases/compiler/genericGetter.ts (1 errors) ==== class C { data: T; get x(): T { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.data; } } diff --git a/tests/baselines/reference/genericGetter2.errors.txt b/tests/baselines/reference/genericGetter2.errors.txt index 586ae56f60628..eff53006b9c62 100644 --- a/tests/baselines/reference/genericGetter2.errors.txt +++ b/tests/baselines/reference/genericGetter2.errors.txt @@ -1,15 +1,12 @@ -tests/cases/compiler/genericGetter2.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/genericGetter2.ts(5,14): error TS2314: Generic type 'A' requires 1 type argument(s). -==== tests/cases/compiler/genericGetter2.ts (2 errors) ==== +==== tests/cases/compiler/genericGetter2.ts (1 errors) ==== class A { } class C { data: A; get x(): A { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS2314: Generic type 'A' requires 1 type argument(s). return this.data; diff --git a/tests/baselines/reference/genericGetter3.errors.txt b/tests/baselines/reference/genericGetter3.errors.txt index 24b44af28eea1..c67dd40f10e78 100644 --- a/tests/baselines/reference/genericGetter3.errors.txt +++ b/tests/baselines/reference/genericGetter3.errors.txt @@ -1,15 +1,12 @@ -tests/cases/compiler/genericGetter3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/genericGetter3.ts(11,5): error TS2322: Type 'A' is not assignable to type 'string'. -==== tests/cases/compiler/genericGetter3.ts (2 errors) ==== +==== tests/cases/compiler/genericGetter3.ts (1 errors) ==== class A { } class C { data: A; get x(): A { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.data; } } diff --git a/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js b/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js index 83b100f48370d..9afb89f3797ed 100644 --- a/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js +++ b/tests/baselines/reference/genericInterfaceFunctionTypeParameter.js @@ -10,7 +10,7 @@ export function foo(fn: (ifoo: IFoo) => void) { //// [genericInterfaceFunctionTypeParameter.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo(fn) { foo(fn); // Invocation is necessary to repro (!) } diff --git a/tests/baselines/reference/genericMemberFunction.js b/tests/baselines/reference/genericMemberFunction.js index 61a9298eb7f85..1e8cba6498f3e 100644 --- a/tests/baselines/reference/genericMemberFunction.js +++ b/tests/baselines/reference/genericMemberFunction.js @@ -25,7 +25,7 @@ export class BuildResult{ //// [genericMemberFunction.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var BuildError = (function () { function BuildError() { } diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js index 49debc2ca8450..3b5595bb91e73 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors1.js @@ -16,5 +16,5 @@ export declare module TypeScript { //// [genericRecursiveImplicitConstructorErrors1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt b/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt index 6f5f68064a6a6..2e39ce620c118 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.errors.txt @@ -1,8 +1,7 @@ tests/cases/compiler/genericReturnTypeFromGetter1.ts(5,18): error TS2314: Generic type 'A' requires 1 type argument(s). -tests/cases/compiler/genericReturnTypeFromGetter1.ts(6,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/genericReturnTypeFromGetter1.ts (2 errors) ==== +==== tests/cases/compiler/genericReturnTypeFromGetter1.ts (1 errors) ==== export interface A { new (dbSet: DbSet): T; } @@ -11,7 +10,5 @@ tests/cases/compiler/genericReturnTypeFromGetter1.ts(6,7): error TS1056: Accesso ~ !!! error TS2314: Generic type 'A' requires 1 type argument(s). get entityType() { return this._entityType; } // used to ICE without return type annotation - ~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/genericReturnTypeFromGetter1.js b/tests/baselines/reference/genericReturnTypeFromGetter1.js index 728d81dd147bc..8c75065a8c147 100644 --- a/tests/baselines/reference/genericReturnTypeFromGetter1.js +++ b/tests/baselines/reference/genericReturnTypeFromGetter1.js @@ -11,7 +11,7 @@ export class DbSet { //// [genericReturnTypeFromGetter1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var DbSet = (function () { function DbSet() { } diff --git a/tests/baselines/reference/genericTypeWithMultipleBases1.js b/tests/baselines/reference/genericTypeWithMultipleBases1.js index a958516dfa034..6ef71ea6c6728 100644 --- a/tests/baselines/reference/genericTypeWithMultipleBases1.js +++ b/tests/baselines/reference/genericTypeWithMultipleBases1.js @@ -21,7 +21,7 @@ x.m2(); //// [genericTypeWithMultipleBases1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; x.p1; x.m1(); diff --git a/tests/baselines/reference/genericTypeWithMultipleBases2.js b/tests/baselines/reference/genericTypeWithMultipleBases2.js index 43651ec8278ae..98f40c142671b 100644 --- a/tests/baselines/reference/genericTypeWithMultipleBases2.js +++ b/tests/baselines/reference/genericTypeWithMultipleBases2.js @@ -21,7 +21,7 @@ x.m2(); //// [genericTypeWithMultipleBases2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x; x.p1; x.m1(); diff --git a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js index 3f5e3dcfe8e6e..3048cfd537445 100644 --- a/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js +++ b/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js @@ -27,7 +27,7 @@ var __extends = (this && this.__extends) || (function () { })(); define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Collection = (function () { function Collection() { } diff --git a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt index c25aca342caa5..a346e58db749a 100644 --- a/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt +++ b/tests/baselines/reference/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.errors.txt @@ -4,10 +4,9 @@ tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(2, tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(2,34): error TS2304: Cannot find name '_'. tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(4,16): error TS2300: Duplicate identifier '_'. tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(15,15): error TS2300: Duplicate identifier '_'. -tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(21,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts (7 errors) ==== +==== tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts (6 errors) ==== declare function _(value: Array): _; ~ !!! error TS2300: Duplicate identifier '_'. @@ -41,8 +40,6 @@ tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts(21 module MyModule { export class MyClass { public get myGetter() { - ~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var obj:any = {}; return obj; diff --git a/tests/baselines/reference/getAndSetAsMemberNames.errors.txt b/tests/baselines/reference/getAndSetAsMemberNames.errors.txt deleted file mode 100644 index a83c4ba118c3a..0000000000000 --- a/tests/baselines/reference/getAndSetAsMemberNames.errors.txt +++ /dev/null @@ -1,27 +0,0 @@ -tests/cases/compiler/getAndSetAsMemberNames.ts(19,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/getAndSetAsMemberNames.ts (1 errors) ==== - class C1 { - set: boolean; - get = 1; - } - class C2 { - set; - } - class C3 { - set (x) { - return x + 1; - } - } - class C4 { - get: boolean = true; - } - class C5 { - public set: () => boolean = function () { return true; }; - get (): boolean { return true; } - set t(x) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetAsMemberNames.symbols b/tests/baselines/reference/getAndSetAsMemberNames.symbols new file mode 100644 index 0000000000000..b5f6f74e1cfde --- /dev/null +++ b/tests/baselines/reference/getAndSetAsMemberNames.symbols @@ -0,0 +1,47 @@ +=== tests/cases/compiler/getAndSetAsMemberNames.ts === +class C1 { +>C1 : Symbol(C1, Decl(getAndSetAsMemberNames.ts, 0, 0)) + + set: boolean; +>set : Symbol(C1.set, Decl(getAndSetAsMemberNames.ts, 0, 10)) + + get = 1; +>get : Symbol(C1.get, Decl(getAndSetAsMemberNames.ts, 1, 17)) +} +class C2 { +>C2 : Symbol(C2, Decl(getAndSetAsMemberNames.ts, 3, 1)) + + set; +>set : Symbol(C2.set, Decl(getAndSetAsMemberNames.ts, 4, 10)) +} +class C3 { +>C3 : Symbol(C3, Decl(getAndSetAsMemberNames.ts, 6, 1)) + + set (x) { +>set : Symbol(C3.set, Decl(getAndSetAsMemberNames.ts, 7, 10)) +>x : Symbol(x, Decl(getAndSetAsMemberNames.ts, 8, 9)) + + return x + 1; +>x : Symbol(x, Decl(getAndSetAsMemberNames.ts, 8, 9)) + } +} +class C4 { +>C4 : Symbol(C4, Decl(getAndSetAsMemberNames.ts, 11, 1)) + + get: boolean = true; +>get : Symbol(C4.get, Decl(getAndSetAsMemberNames.ts, 12, 10)) +} +class C5 { +>C5 : Symbol(C5, Decl(getAndSetAsMemberNames.ts, 14, 1)) + + public set: () => boolean = function () { return true; }; +>set : Symbol(C5.set, Decl(getAndSetAsMemberNames.ts, 15, 10)) + + get (): boolean { return true; } +>get : Symbol(C5.get, Decl(getAndSetAsMemberNames.ts, 16, 61)) + + set t(x) { } +>t : Symbol(C5.t, Decl(getAndSetAsMemberNames.ts, 17, 36)) +>x : Symbol(x, Decl(getAndSetAsMemberNames.ts, 18, 10)) +} + diff --git a/tests/baselines/reference/getAndSetAsMemberNames.types b/tests/baselines/reference/getAndSetAsMemberNames.types new file mode 100644 index 0000000000000..00c3db97b8ce9 --- /dev/null +++ b/tests/baselines/reference/getAndSetAsMemberNames.types @@ -0,0 +1,54 @@ +=== tests/cases/compiler/getAndSetAsMemberNames.ts === +class C1 { +>C1 : C1 + + set: boolean; +>set : boolean + + get = 1; +>get : number +>1 : 1 +} +class C2 { +>C2 : C2 + + set; +>set : any +} +class C3 { +>C3 : C3 + + set (x) { +>set : (x: any) => any +>x : any + + return x + 1; +>x + 1 : any +>x : any +>1 : 1 + } +} +class C4 { +>C4 : C4 + + get: boolean = true; +>get : boolean +>true : true +} +class C5 { +>C5 : C5 + + public set: () => boolean = function () { return true; }; +>set : () => boolean +>function () { return true; } : () => true +>true : true + + get (): boolean { return true; } +>get : () => boolean +>true : true + + set t(x) { } +>t : any +>x : any +} + diff --git a/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt index a16cbfe7b37a5..2b54929e850c1 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType.errors.txt @@ -1,21 +1,15 @@ -tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType.ts(2,9): error TS2380: 'get' and 'set' accessor must have the same type. -tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type. -==== tests/cases/compiler/getAndSetNotIdenticalType.ts (4 errors) ==== +==== tests/cases/compiler/getAndSetNotIdenticalType.ts (2 errors) ==== class C { get x(): number { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2380: 'get' and 'set' accessor must have the same type. return 1; } set x(v: string) { } ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2380: 'get' and 'set' accessor must have the same type. } \ No newline at end of file diff --git a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt index c9fae8cc89c4a..354f86d1c843d 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType2.errors.txt @@ -1,27 +1,21 @@ -tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType2.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type. -tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType2.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/compiler/getAndSetNotIdenticalType2.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A'. Type 'string' is not assignable to type 'T'. -==== tests/cases/compiler/getAndSetNotIdenticalType2.ts (5 errors) ==== +==== tests/cases/compiler/getAndSetNotIdenticalType2.ts (3 errors) ==== class A { foo: T; } class C { data: A; get x(): A { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2380: 'get' and 'set' accessor must have the same type. return this.data; } set x(v: A) { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2380: 'get' and 'set' accessor must have the same type. this.data = v; ~~~~~~~~~ diff --git a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt index 3fb17d65a400b..6618e0e4cc72e 100644 --- a/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt +++ b/tests/baselines/reference/getAndSetNotIdenticalType3.errors.txt @@ -1,27 +1,21 @@ -tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType3.ts(5,9): error TS2380: 'get' and 'set' accessor must have the same type. -tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getAndSetNotIdenticalType3.ts(8,9): error TS2380: 'get' and 'set' accessor must have the same type. tests/cases/compiler/getAndSetNotIdenticalType3.ts(9,9): error TS2322: Type 'A' is not assignable to type 'A'. Type 'string' is not assignable to type 'number'. -==== tests/cases/compiler/getAndSetNotIdenticalType3.ts (5 errors) ==== +==== tests/cases/compiler/getAndSetNotIdenticalType3.ts (3 errors) ==== class A { foo: T; } class C { data: A; get x(): A { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2380: 'get' and 'set' accessor must have the same type. return this.data; } set x(v: A) { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2380: 'get' and 'set' accessor must have the same type. this.data = v; ~~~~~~~~~ diff --git a/tests/baselines/reference/getsetReturnTypes.errors.txt b/tests/baselines/reference/getsetReturnTypes.errors.txt deleted file mode 100644 index 2a69548c7aa7f..0000000000000 --- a/tests/baselines/reference/getsetReturnTypes.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/compiler/getsetReturnTypes.ts(3,7): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/getsetReturnTypes.ts (1 errors) ==== - function makePoint(x: number) { - return { - get x() { return x; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - }; - var x = makePoint(2).x; - var y: number = makePoint(2).x; \ No newline at end of file diff --git a/tests/baselines/reference/getsetReturnTypes.symbols b/tests/baselines/reference/getsetReturnTypes.symbols new file mode 100644 index 0000000000000..1a6e3d2dfac93 --- /dev/null +++ b/tests/baselines/reference/getsetReturnTypes.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/getsetReturnTypes.ts === +function makePoint(x: number) { +>makePoint : Symbol(makePoint, Decl(getsetReturnTypes.ts, 0, 0)) +>x : Symbol(x, Decl(getsetReturnTypes.ts, 0, 19)) + + return { + get x() { return x; } +>x : Symbol(x, Decl(getsetReturnTypes.ts, 1, 9)) +>x : Symbol(x, Decl(getsetReturnTypes.ts, 0, 19)) + } +}; +var x = makePoint(2).x; +>x : Symbol(x, Decl(getsetReturnTypes.ts, 5, 3)) +>makePoint(2).x : Symbol(x, Decl(getsetReturnTypes.ts, 1, 9)) +>makePoint : Symbol(makePoint, Decl(getsetReturnTypes.ts, 0, 0)) +>x : Symbol(x, Decl(getsetReturnTypes.ts, 1, 9)) + +var y: number = makePoint(2).x; +>y : Symbol(y, Decl(getsetReturnTypes.ts, 6, 3)) +>makePoint(2).x : Symbol(x, Decl(getsetReturnTypes.ts, 1, 9)) +>makePoint : Symbol(makePoint, Decl(getsetReturnTypes.ts, 0, 0)) +>x : Symbol(x, Decl(getsetReturnTypes.ts, 1, 9)) + diff --git a/tests/baselines/reference/getsetReturnTypes.types b/tests/baselines/reference/getsetReturnTypes.types new file mode 100644 index 0000000000000..ed08361ebe1ad --- /dev/null +++ b/tests/baselines/reference/getsetReturnTypes.types @@ -0,0 +1,29 @@ +=== tests/cases/compiler/getsetReturnTypes.ts === +function makePoint(x: number) { +>makePoint : (x: number) => { readonly x: number; } +>x : number + + return { +>{ get x() { return x; } } : { readonly x: number; } + + get x() { return x; } +>x : number +>x : number + } +}; +var x = makePoint(2).x; +>x : number +>makePoint(2).x : number +>makePoint(2) : { readonly x: number; } +>makePoint : (x: number) => { readonly x: number; } +>2 : 2 +>x : number + +var y: number = makePoint(2).x; +>y : number +>makePoint(2).x : number +>makePoint(2) : { readonly x: number; } +>makePoint : (x: number) => { readonly x: number; } +>2 : 2 +>x : number + diff --git a/tests/baselines/reference/getterMissingReturnError.errors.txt b/tests/baselines/reference/getterMissingReturnError.errors.txt index e504de07ef423..2497ec857c74a 100644 --- a/tests/baselines/reference/getterMissingReturnError.errors.txt +++ b/tests/baselines/reference/getterMissingReturnError.errors.txt @@ -1,13 +1,10 @@ -tests/cases/compiler/getterMissingReturnError.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/getterMissingReturnError.ts(2,16): error TS2378: A 'get' accessor must return a value. -==== tests/cases/compiler/getterMissingReturnError.ts (2 errors) ==== +==== tests/cases/compiler/getterMissingReturnError.ts (1 errors) ==== class test { public get p2(){ ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~ !!! error TS2378: A 'get' accessor must return a value. } diff --git a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt deleted file mode 100644 index 563f30a201ccd..0000000000000 --- a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.errors.txt +++ /dev/null @@ -1,15 +0,0 @@ -tests/cases/compiler/getterThatThrowsShouldNotNeedReturn.ts(2,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/getterThatThrowsShouldNotNeedReturn.ts (1 errors) ==== - class Greeter { - public get greet(): string { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - throw ''; // should not raise an error - } - public greeting(): string { - throw ''; // should not raise an error - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.symbols b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.symbols new file mode 100644 index 0000000000000..1ad6c08a520d0 --- /dev/null +++ b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/getterThatThrowsShouldNotNeedReturn.ts === +class Greeter { +>Greeter : Symbol(Greeter, Decl(getterThatThrowsShouldNotNeedReturn.ts, 0, 0)) + + public get greet(): string { +>greet : Symbol(Greeter.greet, Decl(getterThatThrowsShouldNotNeedReturn.ts, 0, 15)) + + throw ''; // should not raise an error + } + public greeting(): string { +>greeting : Symbol(Greeter.greeting, Decl(getterThatThrowsShouldNotNeedReturn.ts, 3, 2)) + + throw ''; // should not raise an error + } +} + diff --git a/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.types b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.types new file mode 100644 index 0000000000000..24ee06529233b --- /dev/null +++ b/tests/baselines/reference/getterThatThrowsShouldNotNeedReturn.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/getterThatThrowsShouldNotNeedReturn.ts === +class Greeter { +>Greeter : Greeter + + public get greet(): string { +>greet : string + + throw ''; // should not raise an error +>'' : "" + } + public greeting(): string { +>greeting : () => string + + throw ''; // should not raise an error +>'' : "" + } +} + diff --git a/tests/baselines/reference/gettersAndSetters.errors.txt b/tests/baselines/reference/gettersAndSetters.errors.txt index a4cc4b585e2b4..f21164c3ac0d1 100644 --- a/tests/baselines/reference/gettersAndSetters.errors.txt +++ b/tests/baselines/reference/gettersAndSetters.errors.txt @@ -1,14 +1,8 @@ -tests/cases/compiler/gettersAndSetters.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSetters.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSetters.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSetters.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSetters.ts(25,13): error TS2339: Property 'Baz' does not exist on type 'C'. tests/cases/compiler/gettersAndSetters.ts(26,3): error TS2339: Property 'Baz' does not exist on type 'C'. -tests/cases/compiler/gettersAndSetters.ts(29,30): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSetters.ts(29,53): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/gettersAndSetters.ts (8 errors) ==== +==== tests/cases/compiler/gettersAndSetters.ts (2 errors) ==== // classes class C { public fooBack = ""; @@ -16,18 +10,10 @@ tests/cases/compiler/gettersAndSetters.ts(29,53): error TS1056: Accessors are on public bazBack = ""; public get Foo() { return this.fooBack;} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo:string) {this.fooBack = foo;} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static get Bar() {return C.barBack;} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set Bar(bar:string) {C.barBack = bar;} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public get = function() {} // ok public set = function() {} // ok @@ -50,10 +36,6 @@ tests/cases/compiler/gettersAndSetters.ts(29,53): error TS1056: Accessors are on // The Foo accessors' return and param types should be contextually typed to the Foo field var o : {Foo:number;} = {get Foo() {return 0;}, set Foo(val:number){val}}; // o - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var ofg = o.Foo; o.Foo = 0; diff --git a/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt b/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt index faccaab8fdfc2..270f03f5df75a 100644 --- a/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt +++ b/tests/baselines/reference/gettersAndSettersAccessibility.errors.txt @@ -1,20 +1,14 @@ -tests/cases/compiler/gettersAndSettersAccessibility.ts(2,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSettersAccessibility.ts(2,14): error TS2379: Getter and setter accessors do not agree in visibility. -tests/cases/compiler/gettersAndSettersAccessibility.ts(3,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSettersAccessibility.ts(3,13): error TS2379: Getter and setter accessors do not agree in visibility. -==== tests/cases/compiler/gettersAndSettersAccessibility.ts (4 errors) ==== +==== tests/cases/compiler/gettersAndSettersAccessibility.ts (2 errors) ==== class C99 { private get Baz():number { return 0; } ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2379: Getter and setter accessors do not agree in visibility. public set Baz(n:number) {} // error - accessors do not agree in visibility ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2379: Getter and setter accessors do not agree in visibility. } \ No newline at end of file diff --git a/tests/baselines/reference/gettersAndSettersErrors.errors.txt b/tests/baselines/reference/gettersAndSettersErrors.errors.txt index a3be786cb264b..415e5593a26fc 100644 --- a/tests/baselines/reference/gettersAndSettersErrors.errors.txt +++ b/tests/baselines/reference/gettersAndSettersErrors.errors.txt @@ -1,23 +1,15 @@ -tests/cases/compiler/gettersAndSettersErrors.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersErrors.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2403: Subsequent variable declarations must have the same type. Variable 'Foo' must be of type 'string', but here has type 'number'. -tests/cases/compiler/gettersAndSettersErrors.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersErrors.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters. +tests/cases/compiler/gettersAndSettersErrors.ts(7,16): error TS1095: A 'set' accessor cannot have a return type annotation. tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS2379: Getter and setter accessors do not agree in visibility. -tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and setter accessors do not agree in visibility. -==== tests/cases/compiler/gettersAndSettersErrors.ts (10 errors) ==== +==== tests/cases/compiler/gettersAndSettersErrors.ts (6 errors) ==== class C { public get Foo() { return "foo";} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public set Foo(foo:string) {} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. public Foo = 0; // error - duplicate identifier Foo - confirmed ~~~ @@ -26,22 +18,18 @@ tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Foo' must be of type 'string', but here has type 'number'. public get Goo(v:string):string {return null;} // error - getters must not have a parameter ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1054: A 'get' accessor cannot have parameters. public set Goo(v:string):string {} // error - setters must not specify a return type ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1095: A 'set' accessor cannot have a return type annotation. } class E { private get Baz():number { return 0; } ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2379: Getter and setter accessors do not agree in visibility. public set Baz(n:number) {} // error - accessors do not agree in visibility ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2379: Getter and setter accessors do not agree in visibility. } diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt b/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt deleted file mode 100644 index 7412b56e576de..0000000000000 --- a/tests/baselines/reference/gettersAndSettersTypesAgree.errors.txt +++ /dev/null @@ -1,37 +0,0 @@ -tests/cases/compiler/gettersAndSettersTypesAgree.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersTypesAgree.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersTypesAgree.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersTypesAgree.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersTypesAgree.ts(9,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersTypesAgree.ts(9,37): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersTypesAgree.ts(10,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/gettersAndSettersTypesAgree.ts(10,37): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/gettersAndSettersTypesAgree.ts (8 errors) ==== - class C { - public get Foo() { return "foo";} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public set Foo(foo) {} // ok - type inferred from getter return statement - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - public get Bar() { return "foo";} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public set Bar(bar:string) {} // ok - type must be declared - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - var o1 = {get Foo(){return 0;}, set Foo(val){}}; // ok - types agree (inference) - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var o2 = {get Foo(){return 0;}, set Foo(val:number){}}; // ok - types agree - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.symbols b/tests/baselines/reference/gettersAndSettersTypesAgree.symbols new file mode 100644 index 0000000000000..a992e8d1f5b8e --- /dev/null +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/gettersAndSettersTypesAgree.ts === +class C { +>C : Symbol(C, Decl(gettersAndSettersTypesAgree.ts, 0, 0)) + + public get Foo() { return "foo";} // ok +>Foo : Symbol(C.Foo, Decl(gettersAndSettersTypesAgree.ts, 0, 9), Decl(gettersAndSettersTypesAgree.ts, 1, 37)) + + public set Foo(foo) {} // ok - type inferred from getter return statement +>Foo : Symbol(C.Foo, Decl(gettersAndSettersTypesAgree.ts, 0, 9), Decl(gettersAndSettersTypesAgree.ts, 1, 37)) +>foo : Symbol(foo, Decl(gettersAndSettersTypesAgree.ts, 2, 19)) + + public get Bar() { return "foo";} // ok +>Bar : Symbol(C.Bar, Decl(gettersAndSettersTypesAgree.ts, 2, 26), Decl(gettersAndSettersTypesAgree.ts, 4, 37)) + + public set Bar(bar:string) {} // ok - type must be declared +>Bar : Symbol(C.Bar, Decl(gettersAndSettersTypesAgree.ts, 2, 26), Decl(gettersAndSettersTypesAgree.ts, 4, 37)) +>bar : Symbol(bar, Decl(gettersAndSettersTypesAgree.ts, 5, 19)) +} + +var o1 = {get Foo(){return 0;}, set Foo(val){}}; // ok - types agree (inference) +>o1 : Symbol(o1, Decl(gettersAndSettersTypesAgree.ts, 8, 3)) +>Foo : Symbol(Foo, Decl(gettersAndSettersTypesAgree.ts, 8, 10), Decl(gettersAndSettersTypesAgree.ts, 8, 31)) +>Foo : Symbol(Foo, Decl(gettersAndSettersTypesAgree.ts, 8, 10), Decl(gettersAndSettersTypesAgree.ts, 8, 31)) +>val : Symbol(val, Decl(gettersAndSettersTypesAgree.ts, 8, 40)) + +var o2 = {get Foo(){return 0;}, set Foo(val:number){}}; // ok - types agree +>o2 : Symbol(o2, Decl(gettersAndSettersTypesAgree.ts, 9, 3)) +>Foo : Symbol(Foo, Decl(gettersAndSettersTypesAgree.ts, 9, 10), Decl(gettersAndSettersTypesAgree.ts, 9, 31)) +>Foo : Symbol(Foo, Decl(gettersAndSettersTypesAgree.ts, 9, 10), Decl(gettersAndSettersTypesAgree.ts, 9, 31)) +>val : Symbol(val, Decl(gettersAndSettersTypesAgree.ts, 9, 40)) + diff --git a/tests/baselines/reference/gettersAndSettersTypesAgree.types b/tests/baselines/reference/gettersAndSettersTypesAgree.types new file mode 100644 index 0000000000000..1752ff7a628e1 --- /dev/null +++ b/tests/baselines/reference/gettersAndSettersTypesAgree.types @@ -0,0 +1,37 @@ +=== tests/cases/compiler/gettersAndSettersTypesAgree.ts === +class C { +>C : C + + public get Foo() { return "foo";} // ok +>Foo : string +>"foo" : "foo" + + public set Foo(foo) {} // ok - type inferred from getter return statement +>Foo : string +>foo : string + + public get Bar() { return "foo";} // ok +>Bar : string +>"foo" : "foo" + + public set Bar(bar:string) {} // ok - type must be declared +>Bar : string +>bar : string +} + +var o1 = {get Foo(){return 0;}, set Foo(val){}}; // ok - types agree (inference) +>o1 : { Foo: number; } +>{get Foo(){return 0;}, set Foo(val){}} : { Foo: number; } +>Foo : number +>0 : 0 +>Foo : number +>val : number + +var o2 = {get Foo(){return 0;}, set Foo(val:number){}}; // ok - types agree +>o2 : { Foo: number; } +>{get Foo(){return 0;}, set Foo(val:number){}} : { Foo: number; } +>Foo : number +>0 : 0 +>Foo : number +>val : number + diff --git a/tests/baselines/reference/giant.errors.txt b/tests/baselines/reference/giant.errors.txt index 809ae03635824..4c5f6e7b72a58 100644 --- a/tests/baselines/reference/giant.errors.txt +++ b/tests/baselines/reference/giant.errors.txt @@ -1,44 +1,44 @@ tests/cases/compiler/giant.ts(22,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(23,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(23,20): error TS1005: '{' expected. tests/cases/compiler/giant.ts(24,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(25,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(25,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(25,29): error TS1005: '{' expected. tests/cases/compiler/giant.ts(26,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(27,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(27,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(27,21): error TS1005: '{' expected. tests/cases/compiler/giant.ts(28,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(29,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(29,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(29,30): error TS1005: '{' expected. tests/cases/compiler/giant.ts(32,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(33,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(33,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(33,29): error TS1005: '{' expected. tests/cases/compiler/giant.ts(34,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(35,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(35,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(35,20): error TS1005: '{' expected. tests/cases/compiler/giant.ts(60,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol. tests/cases/compiler/giant.ts(60,6): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(61,5): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(62,6): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(75,5): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(86,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(87,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(87,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(87,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(88,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(89,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(89,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(89,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(90,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(91,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(91,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(91,25): error TS1005: '{' expected. tests/cases/compiler/giant.ts(92,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(93,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(93,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(93,34): error TS1005: '{' expected. tests/cases/compiler/giant.ts(96,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(97,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(97,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(97,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(98,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(99,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(99,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(99,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(124,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol. tests/cases/compiler/giant.ts(124,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(125,9): error TS1021: An index signature must have a type annotation. @@ -46,23 +46,23 @@ tests/cases/compiler/giant.ts(126,10): error TS1096: An index signature must hav tests/cases/compiler/giant.ts(139,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(153,39): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(165,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(166,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(166,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(166,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(167,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(168,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(168,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(168,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(169,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(170,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(170,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(170,25): error TS1005: '{' expected. tests/cases/compiler/giant.ts(171,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(172,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(172,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(172,34): error TS1005: '{' expected. tests/cases/compiler/giant.ts(175,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(176,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(176,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(176,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(177,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(178,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(178,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(178,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(203,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol. tests/cases/compiler/giant.ts(203,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(204,9): error TS1021: An index signature must have a type annotation. @@ -75,73 +75,73 @@ tests/cases/compiler/giant.ts(242,21): error TS1183: An implementation cannot be tests/cases/compiler/giant.ts(243,22): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(244,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(244,22): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(245,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(245,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(245,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(246,16): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(246,31): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(247,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(247,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(247,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(248,17): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(248,23): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(249,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(249,21): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(249,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(250,17): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(250,32): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(251,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(251,21): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(251,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(253,21): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(254,16): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(254,31): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(255,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(255,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(255,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(256,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(256,22): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(257,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(257,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(257,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(261,22): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(261,25): error TS1036: Statements are not allowed in ambient contexts. tests/cases/compiler/giant.ts(266,30): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(280,12): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(281,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(281,16): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(281,20): error TS1005: '{' expected. tests/cases/compiler/giant.ts(282,12): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(283,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(283,16): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(283,29): error TS1005: '{' expected. tests/cases/compiler/giant.ts(284,13): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(285,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(285,17): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(285,21): error TS1005: '{' expected. tests/cases/compiler/giant.ts(286,13): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(287,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(287,17): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(287,30): error TS1005: '{' expected. tests/cases/compiler/giant.ts(290,12): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(291,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(291,16): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(291,29): error TS1005: '{' expected. tests/cases/compiler/giant.ts(292,12): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(293,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(293,20): error TS1005: '{' expected. tests/cases/compiler/giant.ts(318,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol. tests/cases/compiler/giant.ts(318,6): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(319,5): error TS1021: An index signature must have a type annotation. tests/cases/compiler/giant.ts(320,6): error TS1096: An index signature must have exactly one parameter. tests/cases/compiler/giant.ts(333,5): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(344,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(345,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(345,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(345,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(346,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(347,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(347,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(347,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(348,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(349,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(349,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(349,25): error TS1005: '{' expected. tests/cases/compiler/giant.ts(350,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(351,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(351,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(351,34): error TS1005: '{' expected. tests/cases/compiler/giant.ts(354,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(355,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(355,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(355,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(356,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(357,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(357,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(357,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(382,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol. tests/cases/compiler/giant.ts(382,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(383,9): error TS1021: An index signature must have a type annotation. @@ -149,23 +149,23 @@ tests/cases/compiler/giant.ts(384,10): error TS1096: An index signature must hav tests/cases/compiler/giant.ts(397,9): error TS2386: Overload signatures must all be optional or required. tests/cases/compiler/giant.ts(411,39): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(423,16): error TS2300: Duplicate identifier 'pgF'. -tests/cases/compiler/giant.ts(424,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(424,20): error TS2300: Duplicate identifier 'pgF'. +tests/cases/compiler/giant.ts(424,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(425,16): error TS2300: Duplicate identifier 'psF'. -tests/cases/compiler/giant.ts(426,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(426,20): error TS2300: Duplicate identifier 'psF'. +tests/cases/compiler/giant.ts(426,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(427,17): error TS2300: Duplicate identifier 'rgF'. -tests/cases/compiler/giant.ts(428,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(428,21): error TS2300: Duplicate identifier 'rgF'. +tests/cases/compiler/giant.ts(428,25): error TS1005: '{' expected. tests/cases/compiler/giant.ts(429,17): error TS2300: Duplicate identifier 'rsF'. -tests/cases/compiler/giant.ts(430,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(430,21): error TS2300: Duplicate identifier 'rsF'. +tests/cases/compiler/giant.ts(430,34): error TS1005: '{' expected. tests/cases/compiler/giant.ts(433,16): error TS2300: Duplicate identifier 'tsF'. -tests/cases/compiler/giant.ts(434,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(434,20): error TS2300: Duplicate identifier 'tsF'. +tests/cases/compiler/giant.ts(434,33): error TS1005: '{' expected. tests/cases/compiler/giant.ts(435,16): error TS2300: Duplicate identifier 'tgF'. -tests/cases/compiler/giant.ts(436,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'. +tests/cases/compiler/giant.ts(436,24): error TS1005: '{' expected. tests/cases/compiler/giant.ts(461,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol. tests/cases/compiler/giant.ts(461,10): error TS2304: Cannot find name 'p'. tests/cases/compiler/giant.ts(462,9): error TS1021: An index signature must have a type annotation. @@ -178,28 +178,28 @@ tests/cases/compiler/giant.ts(500,21): error TS1183: An implementation cannot be tests/cases/compiler/giant.ts(501,22): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(502,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(502,22): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(503,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(503,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(503,20): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(504,16): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(504,31): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(505,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(505,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(505,20): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(506,17): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(506,23): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(507,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(507,21): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(507,21): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(508,17): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(508,32): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(509,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(509,21): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(509,21): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(511,21): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(512,16): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(512,31): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(513,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(513,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(513,20): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(514,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(514,22): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(515,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(515,20): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(515,20): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(519,22): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(519,25): error TS1036: Statements are not allowed in ambient contexts. @@ -210,28 +210,28 @@ tests/cases/compiler/giant.ts(536,17): error TS1183: An implementation cannot be tests/cases/compiler/giant.ts(537,18): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(538,12): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(538,18): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(539,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(539,16): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(539,16): error TS2300: Duplicate identifier 'pgF'. tests/cases/compiler/giant.ts(540,12): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(540,27): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(541,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(541,16): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(541,16): error TS2300: Duplicate identifier 'psF'. tests/cases/compiler/giant.ts(542,13): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(542,19): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(543,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(543,17): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(543,17): error TS2300: Duplicate identifier 'rgF'. tests/cases/compiler/giant.ts(544,13): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(544,28): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(545,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(545,17): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(545,17): error TS2300: Duplicate identifier 'rsF'. tests/cases/compiler/giant.ts(547,17): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(548,12): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(548,27): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(549,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(549,16): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(549,16): error TS2300: Duplicate identifier 'tsF'. tests/cases/compiler/giant.ts(550,12): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(550,18): error TS1183: An implementation cannot be declared in ambient contexts. -tests/cases/compiler/giant.ts(551,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/giant.ts(551,16): error TS1086: An accessor cannot be declared in an ambient context. tests/cases/compiler/giant.ts(551,16): error TS2300: Duplicate identifier 'tgF'. tests/cases/compiler/giant.ts(555,18): error TS1183: An implementation cannot be declared in ambient contexts. tests/cases/compiler/giant.ts(555,21): error TS1036: Statements are not allowed in ambient contexts. @@ -292,33 +292,33 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. private rgF() { } ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. private rsF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. static tV; static tF() { } static tsF(param:any) { } @@ -326,17 +326,17 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. } interface I { //Call Signature @@ -402,33 +402,33 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. private rgF() { } ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. private rsF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. static tV; static tF() { } static tsF(param:any) { } @@ -436,17 +436,17 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. } interface I { //Call Signature @@ -529,33 +529,33 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. private rgF() { } ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. private rsF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. static tV; static tF() { } static tsF(param:any) { } @@ -563,17 +563,17 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. } export interface eI { //Call Signature @@ -666,7 +666,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } @@ -676,7 +676,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } @@ -686,7 +686,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } @@ -696,7 +696,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; @@ -710,7 +710,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } @@ -720,7 +720,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'tgF'. } @@ -756,33 +756,33 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. private rgF() { } ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. private rsF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. static tV; static tF() { } static tsF(param:any) { } @@ -790,17 +790,17 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. } export interface eI { //Call Signature @@ -866,33 +866,33 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. private rgF() { } ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. private rsF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. static tV; static tF() { } static tsF(param:any) { } @@ -900,17 +900,17 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. } interface I { //Call Signature @@ -993,33 +993,33 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'pgF'. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'pgF'. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'psF'. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'psF'. + ~ +!!! error TS1005: '{' expected. private rgF() { } ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rgF'. + ~ +!!! error TS1005: '{' expected. private rsF(param:any) { } ~~~ !!! error TS2300: Duplicate identifier 'rsF'. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'rsF'. + ~ +!!! error TS1005: '{' expected. static tV; static tF() { } static tsF(param:any) { } @@ -1027,17 +1027,17 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS2300: Duplicate identifier 'tsF'. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ !!! error TS2300: Duplicate identifier 'tgF'. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2300: Duplicate identifier 'tgF'. + ~ +!!! error TS1005: '{' expected. } export interface eI { //Call Signature @@ -1130,7 +1130,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } @@ -1140,7 +1140,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } @@ -1150,7 +1150,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } @@ -1160,7 +1160,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; @@ -1174,7 +1174,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } @@ -1184,7 +1184,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'tgF'. } @@ -1230,7 +1230,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. public get pgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'pgF'. public psF(param:any) { } @@ -1240,7 +1240,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. public set psF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'psF'. private rgF() { } @@ -1250,7 +1250,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. private get rgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'rgF'. private rsF(param:any) { } @@ -1260,7 +1260,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. private set rsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'rsF'. static tV; @@ -1274,7 +1274,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. static set tsF(param:any) ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'tsF'. static tgF() { } @@ -1284,7 +1284,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be !!! error TS1183: An implementation cannot be declared in ambient contexts. static get tgF() ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1086: An accessor cannot be declared in an ambient context. ~~~ !!! error TS2300: Duplicate identifier 'tgF'. } diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index 71f78eeac53d8..f9e4819a746f9 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -683,7 +683,7 @@ export declare module eaM { //// [giant.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); /* Prefixes p -> public diff --git a/tests/baselines/reference/globalAugmentationModuleResolution.js b/tests/baselines/reference/globalAugmentationModuleResolution.js index fae150bb709be..31b1ad42c4f03 100644 --- a/tests/baselines/reference/globalAugmentationModuleResolution.js +++ b/tests/baselines/reference/globalAugmentationModuleResolution.js @@ -7,4 +7,4 @@ declare global { //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt b/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt index 1d3d2e7c2754c..fe84bb8c91d1a 100644 --- a/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt +++ b/tests/baselines/reference/illegalSuperCallsInConstructor.errors.txt @@ -2,13 +2,11 @@ tests/cases/compiler/illegalSuperCallsInConstructor.ts(6,5): error TS2377: Const tests/cases/compiler/illegalSuperCallsInConstructor.ts(7,24): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors. tests/cases/compiler/illegalSuperCallsInConstructor.ts(8,26): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors. tests/cases/compiler/illegalSuperCallsInConstructor.ts(9,32): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors. -tests/cases/compiler/illegalSuperCallsInConstructor.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/illegalSuperCallsInConstructor.ts(12,17): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors. -tests/cases/compiler/illegalSuperCallsInConstructor.ts(15,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/illegalSuperCallsInConstructor.ts(16,17): error TS2337: Super calls are not permitted outside constructors or in nested functions inside constructors. -==== tests/cases/compiler/illegalSuperCallsInConstructor.ts (8 errors) ==== +==== tests/cases/compiler/illegalSuperCallsInConstructor.ts (6 errors) ==== class Base { x: string; } @@ -32,8 +30,6 @@ tests/cases/compiler/illegalSuperCallsInConstructor.ts(16,17): error TS2337: Sup ~~~~~~~~~~~~~~~~~~ get foo() { ~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ @@ -44,8 +40,6 @@ tests/cases/compiler/illegalSuperCallsInConstructor.ts(16,17): error TS2337: Sup ~~~~~~~~~~~~~~ set foo(v: number) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super(); ~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ diff --git a/tests/baselines/reference/implicitAnyCastedValue.errors.txt b/tests/baselines/reference/implicitAnyCastedValue.errors.txt index 773fb2ed94e7a..c6d2ca2d269b4 100644 --- a/tests/baselines/reference/implicitAnyCastedValue.errors.txt +++ b/tests/baselines/reference/implicitAnyCastedValue.errors.txt @@ -1,15 +1,12 @@ tests/cases/compiler/implicitAnyCastedValue.ts(10,5): error TS7008: Member 'bar' implicitly has an 'any' type. tests/cases/compiler/implicitAnyCastedValue.ts(11,5): error TS7008: Member 'foo' implicitly has an 'any' type. -tests/cases/compiler/implicitAnyCastedValue.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/implicitAnyCastedValue.ts(26,5): error TS7008: Member 'getValue' implicitly has an 'any' type. -tests/cases/compiler/implicitAnyCastedValue.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/implicitAnyCastedValue.ts(32,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/implicitAnyCastedValue.ts(41,10): error TS7010: 'notCastedNull', which lacks return-type annotation, implicitly has an 'any' return type. tests/cases/compiler/implicitAnyCastedValue.ts(53,24): error TS7006: Parameter 'x' implicitly has an 'any' type. tests/cases/compiler/implicitAnyCastedValue.ts(62,24): error TS7006: Parameter 'x' implicitly has an 'any' type. -==== tests/cases/compiler/implicitAnyCastedValue.ts (9 errors) ==== +==== tests/cases/compiler/implicitAnyCastedValue.ts (6 errors) ==== var x = function () { return 0; // this should not be an error } @@ -26,8 +23,6 @@ tests/cases/compiler/implicitAnyCastedValue.ts(62,24): error TS7006: Parameter ' ~~~~~~~~~~~~~~~~ !!! error TS7008: Member 'foo' implicitly has an 'any' type. public get tempVar() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; // this should not be an error } @@ -46,14 +41,10 @@ tests/cases/compiler/implicitAnyCastedValue.ts(62,24): error TS7006: Parameter ' !!! error TS7008: Member 'getValue' implicitly has an 'any' type. public get castedGet() { - ~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getValue; // this should not be an error } public get notCastedGet() { - ~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getValue; // this should not be an error } } diff --git a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt index 1e2de97aae068..92e58e0bce428 100644 --- a/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt +++ b/tests/baselines/reference/implicitAnyGetAndSetAccessorWithAnyReturnType.errors.txt @@ -1,29 +1,21 @@ tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(3,5): error TS7008: Member 'getAndSet' implicitly has an 'any' type. -tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(4,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,16): error TS7032: Property 'haveOnlySet' implicitly has type 'any', because its set accessor lacks a parameter type annotation. tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(15,28): error TS7006: Parameter 'newXValue' implicitly has an 'any' type. -tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type. -==== tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts (8 errors) ==== +==== tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts (4 errors) ==== // these should be errors class GetAndSet { getAndSet = null; // error at "getAndSet" ~~~~~~~~~~~~~~~~~ !!! error TS7008: Member 'getAndSet' implicitly has an 'any' type. public get haveGetAndSet() { // this should not be an error - ~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this.getAndSet; } // this shouldn't be an error public set haveGetAndSet(value) { // error at "value" - ~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. this.getAndSet = value; } } @@ -31,8 +23,6 @@ tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): er class SetterOnly { public set haveOnlySet(newXValue) { // error at "haveOnlySet, newXValue" ~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~ !!! error TS7032: Property 'haveOnlySet' implicitly has type 'any', because its set accessor lacks a parameter type annotation. ~~~~~~~~~ !!! error TS7006: Parameter 'newXValue' implicitly has an 'any' type. @@ -42,8 +32,6 @@ tests/cases/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.ts(20,16): er class GetterOnly { public get haveOnlyGet() { // error at "haveOnlyGet" ~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~~~~~~~ !!! error TS7010: 'haveOnlyGet', which lacks return-type annotation, implicitly has an 'any' return type. return null; } diff --git a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js index 60bea32e305fa..639d95cfea41e 100644 --- a/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js +++ b/tests/baselines/reference/importAliasAnExternalModuleInsideAnInternalModule.js @@ -16,7 +16,7 @@ module m_private { //// [importAliasAnExternalModuleInsideAnInternalModule_file0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m; (function (m) { function foo() { } @@ -24,7 +24,7 @@ var m; })(m = exports.m || (exports.m = {})); //// [importAliasAnExternalModuleInsideAnInternalModule_file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var r = require("./importAliasAnExternalModuleInsideAnInternalModule_file0"); var m_private; (function (m_private) { diff --git a/tests/baselines/reference/importAsBaseClass.js b/tests/baselines/reference/importAsBaseClass.js index 725390825c605..887cbd82c0f61 100644 --- a/tests/baselines/reference/importAsBaseClass.js +++ b/tests/baselines/reference/importAsBaseClass.js @@ -12,7 +12,7 @@ class Hello extends Greeter { } //// [importAsBaseClass_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Greeter = (function () { function Greeter() { } @@ -32,7 +32,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Greeter = require("./importAsBaseClass_0"); var Hello = (function (_super) { __extends(Hello, _super); diff --git a/tests/baselines/reference/importDecl.js b/tests/baselines/reference/importDecl.js index 1e5e5d0ec719e..dfea0be0aa946 100644 --- a/tests/baselines/reference/importDecl.js +++ b/tests/baselines/reference/importDecl.js @@ -83,7 +83,7 @@ export var useMultiImport_m4_f4 = multiImport_m4.foo(); //// [importDecl_require.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } @@ -94,7 +94,7 @@ function foo() { return null; } exports.foo = foo; //// [importDecl_require1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } @@ -106,7 +106,7 @@ function foo() { return null; } exports.foo = foo; //// [importDecl_require2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } @@ -117,7 +117,7 @@ function foo() { return null; } exports.foo = foo; //// [importDecl_require3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } @@ -128,12 +128,12 @@ function foo() { return null; } exports.foo = foo; //// [importDecl_require4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo2() { return null; } exports.foo2 = foo2; //// [importDecl_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// /// /// diff --git a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js index 1aadcb875f08b..e2fe46cad4ccd 100644 --- a/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js +++ b/tests/baselines/reference/importDeclRefereingExternalModuleWithNoResolve.js @@ -7,4 +7,4 @@ declare module "m1" { //// [importDeclRefereingExternalModuleWithNoResolve.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/importDeclWithClassModifiers.js b/tests/baselines/reference/importDeclWithClassModifiers.js index 00e5dae1f9593..f5769f7c722cd 100644 --- a/tests/baselines/reference/importDeclWithClassModifiers.js +++ b/tests/baselines/reference/importDeclWithClassModifiers.js @@ -12,7 +12,7 @@ var b: a; //// [importDeclWithClassModifiers.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = x.c; exports.b = x.c; exports.c = x.c; diff --git a/tests/baselines/reference/importDeclWithDeclareModifier.js b/tests/baselines/reference/importDeclWithDeclareModifier.js index e7929ac27fc29..ed5b2ff5710b6 100644 --- a/tests/baselines/reference/importDeclWithDeclareModifier.js +++ b/tests/baselines/reference/importDeclWithDeclareModifier.js @@ -9,6 +9,6 @@ var b: a; //// [importDeclWithDeclareModifier.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = x.c; var b; diff --git a/tests/baselines/reference/importDeclWithExportModifier.js b/tests/baselines/reference/importDeclWithExportModifier.js index 26076c2630eff..f7c21a83212bb 100644 --- a/tests/baselines/reference/importDeclWithExportModifier.js +++ b/tests/baselines/reference/importDeclWithExportModifier.js @@ -10,7 +10,7 @@ var b: a; //// [importDeclWithExportModifier.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a = x.c; var b; }); diff --git a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js index ce5069c335edd..491f5c92ccb52 100644 --- a/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js +++ b/tests/baselines/reference/importDeclWithExportModifierAndExportAssignment.js @@ -8,5 +8,5 @@ export = x; //// [importDeclWithExportModifierAndExportAssignment.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = x.c; diff --git a/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js b/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js index cce30fd8b85e6..318eab2f7d61b 100644 --- a/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js +++ b/tests/baselines/reference/importDeclarationUsedAsTypeQuery.js @@ -13,7 +13,7 @@ export var x: typeof a; //// [importDeclarationUsedAsTypeQuery_require.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -22,7 +22,7 @@ var B = (function () { exports.B = B; //// [importDeclarationUsedAsTypeQuery_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [importDeclarationUsedAsTypeQuery_require.d.ts] diff --git a/tests/baselines/reference/importImportOnlyModule.js b/tests/baselines/reference/importImportOnlyModule.js index 0c6f0540354c8..fc3ebc3263520 100644 --- a/tests/baselines/reference/importImportOnlyModule.js +++ b/tests/baselines/reference/importImportOnlyModule.js @@ -18,7 +18,7 @@ var x = foo; // Cause a runtime dependency //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { this.m1 = 42; @@ -31,12 +31,12 @@ define(["require", "exports"], function (require, exports) { //// [foo_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var answer = 42; // No exports }); //// [foo_2.js] define(["require", "exports", "./foo_1"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x = foo; // Cause a runtime dependency }); diff --git a/tests/baselines/reference/importInsideModule.js b/tests/baselines/reference/importInsideModule.js index da492a7103d92..7b4c2358961c8 100644 --- a/tests/baselines/reference/importInsideModule.js +++ b/tests/baselines/reference/importInsideModule.js @@ -11,7 +11,7 @@ export module myModule { //// [importInsideModule_file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var myModule; (function (myModule) { var a = foo.x; diff --git a/tests/baselines/reference/importNonExternalModule.js b/tests/baselines/reference/importNonExternalModule.js index 0340bcd35cb3e..a79371922ac59 100644 --- a/tests/baselines/reference/importNonExternalModule.js +++ b/tests/baselines/reference/importNonExternalModule.js @@ -21,7 +21,7 @@ var foo; //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // Import should fail. foo_0 not an external module if (foo.answer === 42) { } diff --git a/tests/baselines/reference/importNonStringLiteral.js b/tests/baselines/reference/importNonStringLiteral.js index eb76621f7c06e..259e0b22f28e4 100644 --- a/tests/baselines/reference/importNonStringLiteral.js +++ b/tests/baselines/reference/importNonStringLiteral.js @@ -5,5 +5,5 @@ import foo = require(x); // invalid //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = "filename"; diff --git a/tests/baselines/reference/importTsBeforeDTs.js b/tests/baselines/reference/importTsBeforeDTs.js index 40213ce99687d..8550b78159420 100644 --- a/tests/baselines/reference/importTsBeforeDTs.js +++ b/tests/baselines/reference/importTsBeforeDTs.js @@ -15,11 +15,11 @@ var z2 = foo.y + 10; // Should resolve //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.y = 42; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./foo_0"); var z1 = foo.x + 10; // Should error, as .ts preferred over .d.ts var z2 = foo.y + 10; // Should resolve diff --git a/tests/baselines/reference/importUsedInExtendsList1.js b/tests/baselines/reference/importUsedInExtendsList1.js index 15bf907ddd5b1..a2db377011eea 100644 --- a/tests/baselines/reference/importUsedInExtendsList1.js +++ b/tests/baselines/reference/importUsedInExtendsList1.js @@ -13,7 +13,7 @@ var r: string = s.foo; //// [importUsedInExtendsList1_require.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Super = (function () { function Super() { } @@ -32,7 +32,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foo = require("./importUsedInExtendsList1_require"); var Sub = (function (_super) { diff --git a/tests/baselines/reference/importWithTrailingSlash.js b/tests/baselines/reference/importWithTrailingSlash.js index 9df01dcee66fd..9204fbdd5132a 100644 --- a/tests/baselines/reference/importWithTrailingSlash.js +++ b/tests/baselines/reference/importWithTrailingSlash.js @@ -21,23 +21,23 @@ aIndex.aIndex; //// [a.js] "use strict"; -exports.__esModule = true; -exports["default"] = { a: 0 }; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { a: 0 }; //// [index.js] "use strict"; -exports.__esModule = true; -exports["default"] = { aIndex: 0 }; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { aIndex: 0 }; //// [test.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var _1 = require("."); var _2 = require("./"); -_1["default"].a; -_2["default"].aIndex; +_1.default.a; +_2.default.aIndex; //// [test.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var __1 = require(".."); var _1 = require("../"); -__1["default"].a; -_1["default"].aIndex; +__1.default.a; +_1.default.aIndex; diff --git a/tests/baselines/reference/importWithTrailingSlash_noResolve.js b/tests/baselines/reference/importWithTrailingSlash_noResolve.js index 20afebedc2b1b..8c821cc7c198a 100644 --- a/tests/baselines/reference/importWithTrailingSlash_noResolve.js +++ b/tests/baselines/reference/importWithTrailingSlash_noResolve.js @@ -4,4 +4,4 @@ import foo from "./foo/"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/import_reference-exported-alias.js b/tests/baselines/reference/import_reference-exported-alias.js index b3d607a6943a6..d1fc6db5a9d37 100644 --- a/tests/baselines/reference/import_reference-exported-alias.js +++ b/tests/baselines/reference/import_reference-exported-alias.js @@ -45,7 +45,7 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports", "file1"], function (require, exports, appJs) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Services = appJs.Services; var UserServices = Services.UserServices; var x = new UserServices().getUserName(); diff --git a/tests/baselines/reference/import_reference-to-type-alias.js b/tests/baselines/reference/import_reference-to-type-alias.js index c6771d47bae30..1bd187c4706bf 100644 --- a/tests/baselines/reference/import_reference-to-type-alias.js +++ b/tests/baselines/reference/import_reference-to-type-alias.js @@ -20,7 +20,7 @@ var x = new Services.UserServices().getUserName(); //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var App; (function (App) { var Services; @@ -40,7 +40,7 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports", "file1"], function (require, exports, appJs) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Services = appJs.App.Services; var x = new Services.UserServices().getUserName(); }); diff --git a/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js b/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js index 1cd0376ddedf1..09abbb09683ba 100644 --- a/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js +++ b/tests/baselines/reference/import_unneeded-require-when-referenecing-aliased-type-throug-array.js @@ -19,7 +19,7 @@ var p = testData[0].name; //// [a.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var testData; var p = testData[0].name; }); diff --git a/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js b/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js index 9e99e9c75ebf0..b07a33ed10ff9 100644 --- a/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js +++ b/tests/baselines/reference/import_var-referencing-an-imported-module-alias.js @@ -12,7 +12,7 @@ var v = new hostVar.Host(); //// [host.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Host = (function () { function Host() { } @@ -23,7 +23,7 @@ define(["require", "exports"], function (require, exports) { //// [consumer.js] define(["require", "exports", "host"], function (require, exports, host) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var hostVar = host; var v = new hostVar.Host(); }); diff --git a/tests/baselines/reference/importedAliasesInTypePositions.js b/tests/baselines/reference/importedAliasesInTypePositions.js index b82ac22f4ede4..60b7fd17362bd 100644 --- a/tests/baselines/reference/importedAliasesInTypePositions.js +++ b/tests/baselines/reference/importedAliasesInTypePositions.js @@ -21,7 +21,7 @@ export module ImportingModule { //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var elaborate; (function (elaborate) { var nested; @@ -46,7 +46,7 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var ImportingModule; (function (ImportingModule) { var UsesReferredType = (function () { diff --git a/tests/baselines/reference/importedModuleClassNameClash.js b/tests/baselines/reference/importedModuleClassNameClash.js index 5f4f9677dcd6c..f0e6faa45b97b 100644 --- a/tests/baselines/reference/importedModuleClassNameClash.js +++ b/tests/baselines/reference/importedModuleClassNameClash.js @@ -9,7 +9,7 @@ class foo { } //// [importedModuleClassNameClash.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var foo = (function () { function foo() { } diff --git a/tests/baselines/reference/importsImplicitlyReadonly.js b/tests/baselines/reference/importsImplicitlyReadonly.js index 724b8c14e5322..a78e39cab8475 100644 --- a/tests/baselines/reference/importsImplicitlyReadonly.js +++ b/tests/baselines/reference/importsImplicitlyReadonly.js @@ -22,13 +22,13 @@ a3.y = 1; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; var y = 1; exports.y = y; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a_1 = require("./a"); var a1 = require("./a"); var a2 = require("./a"); diff --git a/tests/baselines/reference/indexedAccessRelation.js b/tests/baselines/reference/indexedAccessRelation.js index 10384c9eacd28..4514286c3b664 100644 --- a/tests/baselines/reference/indexedAccessRelation.js +++ b/tests/baselines/reference/indexedAccessRelation.js @@ -32,7 +32,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Component = (function () { function Component() { } diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.js b/tests/baselines/reference/indexedAccessTypeConstraints.js index 075e93dfa2353..8a0c6dc983baf 100644 --- a/tests/baselines/reference/indexedAccessTypeConstraints.js +++ b/tests/baselines/reference/indexedAccessTypeConstraints.js @@ -48,7 +48,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Parent = (function () { function Parent() { } diff --git a/tests/baselines/reference/inferSetterParamType.errors.txt b/tests/baselines/reference/inferSetterParamType.errors.txt index 7b28c52d48b1b..bd499ce89f949 100644 --- a/tests/baselines/reference/inferSetterParamType.errors.txt +++ b/tests/baselines/reference/inferSetterParamType.errors.txt @@ -1,36 +1,24 @@ -tests/cases/compiler/inferSetterParamType.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inferSetterParamType.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inferSetterParamType.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inferSetterParamType.ts(13,9): error TS2322: Type '0' is not assignable to type 'string'. -tests/cases/compiler/inferSetterParamType.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/inferSetterParamType.ts (5 errors) ==== +==== tests/cases/compiler/inferSetterParamType.ts (1 errors) ==== class Foo { get bar() { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; } set bar(n) { // should not be an error - infer number - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } class Foo2 { get bar() { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 0; // should be an error - can't coerce infered return type to match setter annotated type ~~~~~~~~~ !!! error TS2322: Type '0' is not assignable to type 'string'. } set bar(n:string) { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt b/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt deleted file mode 100644 index fc3c49477fb62..0000000000000 --- a/tests/baselines/reference/infinitelyExpandingOverloads.errors.txt +++ /dev/null @@ -1,32 +0,0 @@ -tests/cases/compiler/infinitelyExpandingOverloads.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/infinitelyExpandingOverloads.ts (1 errors) ==== - interface KnockoutSubscription2 { - target: KnockoutObservableBase2; - } - interface KnockoutObservableBase2 { - subscribe(callback: (newValue: T) => void, target?: any, topic?: string): KnockoutSubscription2; - } - interface ValidationPlacement2 { - initialize(validatable: Validatable2): void; - } - interface Validatable2 { - validators: KnockoutObservableBase2>; - } - class Validator2 { - private _subscription: KnockoutSubscription2; - } - class ViewModel { - public validationPlacements: Array> = new Array>(); - } - class Widget { - constructor(viewModelType: new () => ViewModel); // Shouldnt error on this overload - constructor(viewModelType: new () => ViewModel) { - } - public get options(): ViewModel { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return null; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/infinitelyExpandingOverloads.symbols b/tests/baselines/reference/infinitelyExpandingOverloads.symbols new file mode 100644 index 0000000000000..760595d78724f --- /dev/null +++ b/tests/baselines/reference/infinitelyExpandingOverloads.symbols @@ -0,0 +1,88 @@ +=== tests/cases/compiler/infinitelyExpandingOverloads.ts === +interface KnockoutSubscription2 { +>KnockoutSubscription2 : Symbol(KnockoutSubscription2, Decl(infinitelyExpandingOverloads.ts, 0, 0)) +>T : Symbol(T, Decl(infinitelyExpandingOverloads.ts, 0, 32)) + + target: KnockoutObservableBase2; +>target : Symbol(KnockoutSubscription2.target, Decl(infinitelyExpandingOverloads.ts, 0, 36)) +>KnockoutObservableBase2 : Symbol(KnockoutObservableBase2, Decl(infinitelyExpandingOverloads.ts, 2, 1)) +>T : Symbol(T, Decl(infinitelyExpandingOverloads.ts, 0, 32)) +} +interface KnockoutObservableBase2 { +>KnockoutObservableBase2 : Symbol(KnockoutObservableBase2, Decl(infinitelyExpandingOverloads.ts, 2, 1)) +>T : Symbol(T, Decl(infinitelyExpandingOverloads.ts, 3, 34)) + + subscribe(callback: (newValue: T) => void, target?: any, topic?: string): KnockoutSubscription2; +>subscribe : Symbol(KnockoutObservableBase2.subscribe, Decl(infinitelyExpandingOverloads.ts, 3, 38)) +>callback : Symbol(callback, Decl(infinitelyExpandingOverloads.ts, 4, 14)) +>newValue : Symbol(newValue, Decl(infinitelyExpandingOverloads.ts, 4, 25)) +>T : Symbol(T, Decl(infinitelyExpandingOverloads.ts, 3, 34)) +>target : Symbol(target, Decl(infinitelyExpandingOverloads.ts, 4, 46)) +>topic : Symbol(topic, Decl(infinitelyExpandingOverloads.ts, 4, 60)) +>KnockoutSubscription2 : Symbol(KnockoutSubscription2, Decl(infinitelyExpandingOverloads.ts, 0, 0)) +>T : Symbol(T, Decl(infinitelyExpandingOverloads.ts, 3, 34)) +} +interface ValidationPlacement2 { +>ValidationPlacement2 : Symbol(ValidationPlacement2, Decl(infinitelyExpandingOverloads.ts, 5, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 6, 31)) + + initialize(validatable: Validatable2): void; +>initialize : Symbol(ValidationPlacement2.initialize, Decl(infinitelyExpandingOverloads.ts, 6, 40)) +>validatable : Symbol(validatable, Decl(infinitelyExpandingOverloads.ts, 7, 15)) +>Validatable2 : Symbol(Validatable2, Decl(infinitelyExpandingOverloads.ts, 8, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 6, 31)) +} +interface Validatable2 { +>Validatable2 : Symbol(Validatable2, Decl(infinitelyExpandingOverloads.ts, 8, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 9, 23)) + + validators: KnockoutObservableBase2>; +>validators : Symbol(Validatable2.validators, Decl(infinitelyExpandingOverloads.ts, 9, 32)) +>KnockoutObservableBase2 : Symbol(KnockoutObservableBase2, Decl(infinitelyExpandingOverloads.ts, 2, 1)) +>Validator2 : Symbol(Validator2, Decl(infinitelyExpandingOverloads.ts, 11, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 9, 23)) +} +class Validator2 { +>Validator2 : Symbol(Validator2, Decl(infinitelyExpandingOverloads.ts, 11, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 12, 17)) + + private _subscription: KnockoutSubscription2; +>_subscription : Symbol(Validator2._subscription, Decl(infinitelyExpandingOverloads.ts, 12, 26)) +>KnockoutSubscription2 : Symbol(KnockoutSubscription2, Decl(infinitelyExpandingOverloads.ts, 0, 0)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 12, 17)) +} +class ViewModel { +>ViewModel : Symbol(ViewModel, Decl(infinitelyExpandingOverloads.ts, 14, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 15, 16)) + + public validationPlacements: Array> = new Array>(); +>validationPlacements : Symbol(ViewModel.validationPlacements, Decl(infinitelyExpandingOverloads.ts, 15, 25)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>ValidationPlacement2 : Symbol(ValidationPlacement2, Decl(infinitelyExpandingOverloads.ts, 5, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 15, 16)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>ValidationPlacement2 : Symbol(ValidationPlacement2, Decl(infinitelyExpandingOverloads.ts, 5, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 15, 16)) +} +class Widget { +>Widget : Symbol(Widget, Decl(infinitelyExpandingOverloads.ts, 17, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 18, 13)) + + constructor(viewModelType: new () => ViewModel); // Shouldnt error on this overload +>viewModelType : Symbol(viewModelType, Decl(infinitelyExpandingOverloads.ts, 19, 16)) +>ViewModel : Symbol(ViewModel, Decl(infinitelyExpandingOverloads.ts, 14, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 18, 13)) + + constructor(viewModelType: new () => ViewModel) { +>viewModelType : Symbol(viewModelType, Decl(infinitelyExpandingOverloads.ts, 20, 16)) +>ViewModel : Symbol(ViewModel, Decl(infinitelyExpandingOverloads.ts, 14, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 18, 13)) + } + public get options(): ViewModel { +>options : Symbol(Widget.options, Decl(infinitelyExpandingOverloads.ts, 21, 5)) +>ViewModel : Symbol(ViewModel, Decl(infinitelyExpandingOverloads.ts, 14, 1)) +>TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 18, 13)) + + return null; + } +} diff --git a/tests/baselines/reference/infinitelyExpandingOverloads.types b/tests/baselines/reference/infinitelyExpandingOverloads.types new file mode 100644 index 0000000000000..b8e0706c13ade --- /dev/null +++ b/tests/baselines/reference/infinitelyExpandingOverloads.types @@ -0,0 +1,90 @@ +=== tests/cases/compiler/infinitelyExpandingOverloads.ts === +interface KnockoutSubscription2 { +>KnockoutSubscription2 : KnockoutSubscription2 +>T : T + + target: KnockoutObservableBase2; +>target : KnockoutObservableBase2 +>KnockoutObservableBase2 : KnockoutObservableBase2 +>T : T +} +interface KnockoutObservableBase2 { +>KnockoutObservableBase2 : KnockoutObservableBase2 +>T : T + + subscribe(callback: (newValue: T) => void, target?: any, topic?: string): KnockoutSubscription2; +>subscribe : (callback: (newValue: T) => void, target?: any, topic?: string) => KnockoutSubscription2 +>callback : (newValue: T) => void +>newValue : T +>T : T +>target : any +>topic : string +>KnockoutSubscription2 : KnockoutSubscription2 +>T : T +} +interface ValidationPlacement2 { +>ValidationPlacement2 : ValidationPlacement2 +>TValue : TValue + + initialize(validatable: Validatable2): void; +>initialize : (validatable: Validatable2) => void +>validatable : Validatable2 +>Validatable2 : Validatable2 +>TValue : TValue +} +interface Validatable2 { +>Validatable2 : Validatable2 +>TValue : TValue + + validators: KnockoutObservableBase2>; +>validators : KnockoutObservableBase2> +>KnockoutObservableBase2 : KnockoutObservableBase2 +>Validator2 : Validator2 +>TValue : TValue +} +class Validator2 { +>Validator2 : Validator2 +>TValue : TValue + + private _subscription: KnockoutSubscription2; +>_subscription : KnockoutSubscription2 +>KnockoutSubscription2 : KnockoutSubscription2 +>TValue : TValue +} +class ViewModel { +>ViewModel : ViewModel +>TValue : TValue + + public validationPlacements: Array> = new Array>(); +>validationPlacements : ValidationPlacement2[] +>Array : T[] +>ValidationPlacement2 : ValidationPlacement2 +>TValue : TValue +>new Array>() : ValidationPlacement2[] +>Array : ArrayConstructor +>ValidationPlacement2 : ValidationPlacement2 +>TValue : TValue +} +class Widget { +>Widget : Widget +>TValue : TValue + + constructor(viewModelType: new () => ViewModel); // Shouldnt error on this overload +>viewModelType : new () => ViewModel +>ViewModel : ViewModel +>TValue : TValue + + constructor(viewModelType: new () => ViewModel) { +>viewModelType : new () => ViewModel +>ViewModel : ViewModel +>TValue : TValue + } + public get options(): ViewModel { +>options : ViewModel +>ViewModel : ViewModel +>TValue : TValue + + return null; +>null : null + } +} diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt deleted file mode 100644 index f729e230ca2e4..0000000000000 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.errors.txt +++ /dev/null @@ -1,32 +0,0 @@ -tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts (4 errors) ==== - class a { - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "20"; - } - set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - } - } - - class b extends a { - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "20"; - } - set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - } - } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.symbols b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.symbols new file mode 100644 index 0000000000000..5d3cca30196c5 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts === +class a { +>a : Symbol(a, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 0, 0)) + + get x() { +>x : Symbol(a.x, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 0, 9), Decl(inheritanceMemberAccessorOverridingAccessor.ts, 3, 5)) + + return "20"; + } + set x(aValue: string) { +>x : Symbol(a.x, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 0, 9), Decl(inheritanceMemberAccessorOverridingAccessor.ts, 3, 5)) +>aValue : Symbol(aValue, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 4, 10)) + + } +} + +class b extends a { +>b : Symbol(b, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 7, 1)) +>a : Symbol(a, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 0, 0)) + + get x() { +>x : Symbol(b.x, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 9, 19), Decl(inheritanceMemberAccessorOverridingAccessor.ts, 12, 5)) + + return "20"; + } + set x(aValue: string) { +>x : Symbol(b.x, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 9, 19), Decl(inheritanceMemberAccessorOverridingAccessor.ts, 12, 5)) +>aValue : Symbol(aValue, Decl(inheritanceMemberAccessorOverridingAccessor.ts, 13, 10)) + + } +} diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.types b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.types new file mode 100644 index 0000000000000..d5f7d43378700 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingAccessor.types @@ -0,0 +1,33 @@ +=== tests/cases/compiler/inheritanceMemberAccessorOverridingAccessor.ts === +class a { +>a : a + + get x() { +>x : string + + return "20"; +>"20" : "20" + } + set x(aValue: string) { +>x : string +>aValue : string + + } +} + +class b extends a { +>b : b +>a : a + + get x() { +>x : string + + return "20"; +>"20" : "20" + } + set x(aValue: string) { +>x : string +>aValue : string + + } +} diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt index 6fde83e08b03c..92fe22800f464 100644 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt @@ -1,12 +1,10 @@ tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(7,7): error TS2415: Class 'b' incorrectly extends base class 'a'. Types of property 'x' are incompatible. Type 'string' is not assignable to type '() => string'. -tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. -tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts (4 errors) ==== +==== tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts (2 errors) ==== class a { x() { return "20"; @@ -20,14 +18,10 @@ tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(11,9): error T !!! error TS2415: Type 'string' is not assignable to type '() => string'. get x() { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. return "20"; } set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt deleted file mode 100644 index 98b9d349d64fe..0000000000000 --- a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts (2 errors) ==== - class a { - x: string; - } - - class b extends a { - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "20"; - } - set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - } - } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.symbols b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.symbols new file mode 100644 index 0000000000000..f732a335e1dd5 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts === +class a { +>a : Symbol(a, Decl(inheritanceMemberAccessorOverridingProperty.ts, 0, 0)) + + x: string; +>x : Symbol(a.x, Decl(inheritanceMemberAccessorOverridingProperty.ts, 0, 9)) +} + +class b extends a { +>b : Symbol(b, Decl(inheritanceMemberAccessorOverridingProperty.ts, 2, 1)) +>a : Symbol(a, Decl(inheritanceMemberAccessorOverridingProperty.ts, 0, 0)) + + get x() { +>x : Symbol(b.x, Decl(inheritanceMemberAccessorOverridingProperty.ts, 4, 19), Decl(inheritanceMemberAccessorOverridingProperty.ts, 7, 5)) + + return "20"; + } + set x(aValue: string) { +>x : Symbol(b.x, Decl(inheritanceMemberAccessorOverridingProperty.ts, 4, 19), Decl(inheritanceMemberAccessorOverridingProperty.ts, 7, 5)) +>aValue : Symbol(aValue, Decl(inheritanceMemberAccessorOverridingProperty.ts, 8, 10)) + + } +} diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.types b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.types new file mode 100644 index 0000000000000..e3ccbdd94f308 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingProperty.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/inheritanceMemberAccessorOverridingProperty.ts === +class a { +>a : a + + x: string; +>x : string +} + +class b extends a { +>b : b +>a : a + + get x() { +>x : string + + return "20"; +>"20" : "20" + } + set x(aValue: string) { +>x : string +>aValue : string + + } +} diff --git a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt index 283e7ce3f1849..f95595958f00e 100644 --- a/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceMemberFuncOverridingAccessor.errors.txt @@ -1,21 +1,15 @@ -tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(10,7): error TS2415: Class 'b' incorrectly extends base class 'a'. Types of property 'x' are incompatible. Type '() => string' is not assignable to type 'string'. tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts(11,5): error TS2426: Class 'a' defines instance member accessor 'x', but extended class 'b' defines it as instance member function. -==== tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts (4 errors) ==== +==== tests/cases/compiler/inheritanceMemberFuncOverridingAccessor.ts (2 errors) ==== class a { get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt deleted file mode 100644 index ec8ec05a8aeb5..0000000000000 --- a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.errors.txt +++ /dev/null @@ -1,22 +0,0 @@ -tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts(6,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts (2 errors) ==== - class a { - private __x: () => string; - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return this.__x; - } - set x(aValue: () => string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - this.__x = aValue; - } - } - - class b extends a { - x: () => string; - } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.symbols b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.symbols new file mode 100644 index 0000000000000..d3949e7efc589 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.symbols @@ -0,0 +1,34 @@ +=== tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts === +class a { +>a : Symbol(a, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 0)) + + private __x: () => string; +>__x : Symbol(a.__x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 9)) + + get x() { +>x : Symbol(a.x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 1, 30), Decl(inheritanceMemberPropertyOverridingAccessor.ts, 4, 5)) + + return this.__x; +>this.__x : Symbol(a.__x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 9)) +>this : Symbol(a, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 0)) +>__x : Symbol(a.__x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 9)) + } + set x(aValue: () => string) { +>x : Symbol(a.x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 1, 30), Decl(inheritanceMemberPropertyOverridingAccessor.ts, 4, 5)) +>aValue : Symbol(aValue, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 5, 10)) + + this.__x = aValue; +>this.__x : Symbol(a.__x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 9)) +>this : Symbol(a, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 0)) +>__x : Symbol(a.__x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 9)) +>aValue : Symbol(aValue, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 5, 10)) + } +} + +class b extends a { +>b : Symbol(b, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 8, 1)) +>a : Symbol(a, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 0, 0)) + + x: () => string; +>x : Symbol(b.x, Decl(inheritanceMemberPropertyOverridingAccessor.ts, 10, 19)) +} diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types new file mode 100644 index 0000000000000..b843799a8cb08 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingAccessor.types @@ -0,0 +1,35 @@ +=== tests/cases/compiler/inheritanceMemberPropertyOverridingAccessor.ts === +class a { +>a : a + + private __x: () => string; +>__x : () => string + + get x() { +>x : () => string + + return this.__x; +>this.__x : () => string +>this : this +>__x : () => string + } + set x(aValue: () => string) { +>x : () => string +>aValue : () => string + + this.__x = aValue; +>this.__x = aValue : () => string +>this.__x : () => string +>this : this +>__x : () => string +>aValue : () => string + } +} + +class b extends a { +>b : b +>a : a + + x: () => string; +>x : () => string +} diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt deleted file mode 100644 index ae6a19c4530c8..0000000000000 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.errors.txt +++ /dev/null @@ -1,32 +0,0 @@ -tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts (4 errors) ==== - class a { - static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "20"; - } - static set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - } - } - - class b extends a { - static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "20"; - } - static set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - } - } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.symbols b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.symbols new file mode 100644 index 0000000000000..e5e97389b4622 --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts === +class a { +>a : Symbol(a, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 0, 0)) + + static get x() { +>x : Symbol(a.x, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 0, 9), Decl(inheritanceStaticAccessorOverridingAccessor.ts, 3, 5)) + + return "20"; + } + static set x(aValue: string) { +>x : Symbol(a.x, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 0, 9), Decl(inheritanceStaticAccessorOverridingAccessor.ts, 3, 5)) +>aValue : Symbol(aValue, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 4, 17)) + + } +} + +class b extends a { +>b : Symbol(b, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 7, 1)) +>a : Symbol(a, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 0, 0)) + + static get x() { +>x : Symbol(b.x, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 9, 19), Decl(inheritanceStaticAccessorOverridingAccessor.ts, 12, 5)) + + return "20"; + } + static set x(aValue: string) { +>x : Symbol(b.x, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 9, 19), Decl(inheritanceStaticAccessorOverridingAccessor.ts, 12, 5)) +>aValue : Symbol(aValue, Decl(inheritanceStaticAccessorOverridingAccessor.ts, 13, 17)) + + } +} diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.types b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.types new file mode 100644 index 0000000000000..e484eb0932e00 --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingAccessor.types @@ -0,0 +1,33 @@ +=== tests/cases/compiler/inheritanceStaticAccessorOverridingAccessor.ts === +class a { +>a : a + + static get x() { +>x : string + + return "20"; +>"20" : "20" + } + static set x(aValue: string) { +>x : string +>aValue : string + + } +} + +class b extends a { +>b : b +>a : a + + static get x() { +>x : string + + return "20"; +>"20" : "20" + } + static set x(aValue: string) { +>x : string +>aValue : string + + } +} diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt index 38b1ed61facfa..04459972b8be9 100644 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingMethod.errors.txt @@ -1,11 +1,9 @@ tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(7,7): error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. Types of property 'x' are incompatible. Type 'string' is not assignable to type '() => string'. -tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(11,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts (3 errors) ==== +==== tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts (1 errors) ==== class a { static x() { return "20"; @@ -18,13 +16,9 @@ tests/cases/compiler/inheritanceStaticAccessorOverridingMethod.ts(11,16): error !!! error TS2417: Types of property 'x' are incompatible. !!! error TS2417: Type 'string' is not assignable to type '() => string'. static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt deleted file mode 100644 index cdcbaa101e701..0000000000000 --- a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts(9,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts (2 errors) ==== - class a { - static x: string; - } - - class b extends a { - static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return "20"; - } - static set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - } - } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.symbols b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.symbols new file mode 100644 index 0000000000000..09c5fbe9e72f7 --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts === +class a { +>a : Symbol(a, Decl(inheritanceStaticAccessorOverridingProperty.ts, 0, 0)) + + static x: string; +>x : Symbol(a.x, Decl(inheritanceStaticAccessorOverridingProperty.ts, 0, 9)) +} + +class b extends a { +>b : Symbol(b, Decl(inheritanceStaticAccessorOverridingProperty.ts, 2, 1)) +>a : Symbol(a, Decl(inheritanceStaticAccessorOverridingProperty.ts, 0, 0)) + + static get x() { +>x : Symbol(b.x, Decl(inheritanceStaticAccessorOverridingProperty.ts, 4, 19), Decl(inheritanceStaticAccessorOverridingProperty.ts, 7, 5)) + + return "20"; + } + static set x(aValue: string) { +>x : Symbol(b.x, Decl(inheritanceStaticAccessorOverridingProperty.ts, 4, 19), Decl(inheritanceStaticAccessorOverridingProperty.ts, 7, 5)) +>aValue : Symbol(aValue, Decl(inheritanceStaticAccessorOverridingProperty.ts, 8, 17)) + + } +} diff --git a/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.types b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.types new file mode 100644 index 0000000000000..f1d4c07bbee66 --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticAccessorOverridingProperty.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/inheritanceStaticAccessorOverridingProperty.ts === +class a { +>a : a + + static x: string; +>x : string +} + +class b extends a { +>b : b +>a : a + + static get x() { +>x : string + + return "20"; +>"20" : "20" + } + static set x(aValue: string) { +>x : string +>aValue : string + + } +} diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt index cfe05da8ea49e..467899c0de472 100644 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessor.errors.txt @@ -1,20 +1,14 @@ -tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts(10,7): error TS2417: Class static side 'typeof b' incorrectly extends base class static side 'typeof a'. Types of property 'x' are incompatible. Type '() => string' is not assignable to type 'string'. -==== tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts (3 errors) ==== +==== tests/cases/compiler/inheritanceStaticFuncOverridingAccessor.ts (1 errors) ==== class a { static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "20"; } static set x(aValue: string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } } diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt deleted file mode 100644 index 1fa828f30c4f8..0000000000000 --- a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -tests/cases/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.ts (1 errors) ==== - class a { - static get x(): () => string { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return null; - } - } - - class b extends a { - static x() { - return "20"; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.symbols b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.symbols new file mode 100644 index 0000000000000..4494110ca3e9a --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.symbols @@ -0,0 +1,21 @@ +=== tests/cases/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.ts === +class a { +>a : Symbol(a, Decl(inheritanceStaticFuncOverridingAccessorOfFuncType.ts, 0, 0)) + + static get x(): () => string { +>x : Symbol(a.x, Decl(inheritanceStaticFuncOverridingAccessorOfFuncType.ts, 0, 9)) + + return null; + } +} + +class b extends a { +>b : Symbol(b, Decl(inheritanceStaticFuncOverridingAccessorOfFuncType.ts, 4, 1)) +>a : Symbol(a, Decl(inheritanceStaticFuncOverridingAccessorOfFuncType.ts, 0, 0)) + + static x() { +>x : Symbol(b.x, Decl(inheritanceStaticFuncOverridingAccessorOfFuncType.ts, 6, 19)) + + return "20"; + } +} diff --git a/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.types b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.types new file mode 100644 index 0000000000000..a1119d1193f6f --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticFuncOverridingAccessorOfFuncType.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.ts === +class a { +>a : a + + static get x(): () => string { +>x : () => string + + return null; +>null : null + } +} + +class b extends a { +>b : b +>a : a + + static x() { +>x : () => string + + return "20"; +>"20" : "20" + } +} diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt deleted file mode 100644 index 08aab5b1158c5..0000000000000 --- a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts (2 errors) ==== - class a { - static get x(): () => string { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return null;; - } - static set x(aValue: () => string) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - } - - class b extends a { - static x: () => string; - } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.symbols b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.symbols new file mode 100644 index 0000000000000..519077b311da3 --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts === +class a { +>a : Symbol(a, Decl(inheritanceStaticPropertyOverridingAccessor.ts, 0, 0)) + + static get x(): () => string { +>x : Symbol(a.x, Decl(inheritanceStaticPropertyOverridingAccessor.ts, 0, 9), Decl(inheritanceStaticPropertyOverridingAccessor.ts, 3, 5)) + + return null;; + } + static set x(aValue: () => string) { +>x : Symbol(a.x, Decl(inheritanceStaticPropertyOverridingAccessor.ts, 0, 9), Decl(inheritanceStaticPropertyOverridingAccessor.ts, 3, 5)) +>aValue : Symbol(aValue, Decl(inheritanceStaticPropertyOverridingAccessor.ts, 4, 17)) + } +} + +class b extends a { +>b : Symbol(b, Decl(inheritanceStaticPropertyOverridingAccessor.ts, 6, 1)) +>a : Symbol(a, Decl(inheritanceStaticPropertyOverridingAccessor.ts, 0, 0)) + + static x: () => string; +>x : Symbol(b.x, Decl(inheritanceStaticPropertyOverridingAccessor.ts, 8, 19)) +} diff --git a/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.types b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.types new file mode 100644 index 0000000000000..3bce5e7250c87 --- /dev/null +++ b/tests/baselines/reference/inheritanceStaticPropertyOverridingAccessor.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/inheritanceStaticPropertyOverridingAccessor.ts === +class a { +>a : a + + static get x(): () => string { +>x : () => string + + return null;; +>null : null + } + static set x(aValue: () => string) { +>x : () => string +>aValue : () => string + } +} + +class b extends a { +>b : b +>a : a + + static x: () => string; +>x : () => string +} diff --git a/tests/baselines/reference/instanceOfInExternalModules.js b/tests/baselines/reference/instanceOfInExternalModules.js index 293be662a4d74..d5fd52f13c1ce 100644 --- a/tests/baselines/reference/instanceOfInExternalModules.js +++ b/tests/baselines/reference/instanceOfInExternalModules.js @@ -14,7 +14,7 @@ function IsFoo(value: any): boolean { //// [instanceOfInExternalModules_require.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } @@ -25,7 +25,7 @@ define(["require", "exports"], function (require, exports) { //// [instanceOfInExternalModules_1.js] define(["require", "exports", "instanceOfInExternalModules_require"], function (require, exports, Bar) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function IsFoo(value) { return value instanceof Bar.Foo; } diff --git a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt index 21aaa938093e1..99ba96c825236 100644 --- a/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt +++ b/tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt @@ -1,23 +1,15 @@ -tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(19,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures. -tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(26,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(29,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. -==== tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts (6 errors) ==== +==== tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts (2 errors) ==== module NonGeneric { class C { x: string; get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set y(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: number, private b: number) { } } @@ -39,13 +31,9 @@ tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIn class C { x: T; get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } set y(v: U) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: T, private b: U) { } } diff --git a/tests/baselines/reference/instancePropertyInClassType.errors.txt b/tests/baselines/reference/instancePropertyInClassType.errors.txt index bb0047880cbd8..5fd2da807055b 100644 --- a/tests/baselines/reference/instancePropertyInClassType.errors.txt +++ b/tests/baselines/reference/instancePropertyInClassType.errors.txt @@ -1,23 +1,15 @@ -tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(17,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures. -tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(24,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(27,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(37,14): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. -==== tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts (6 errors) ==== +==== tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts (2 errors) ==== module NonGeneric { class C { x: string; get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } set y(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: number, private b: number) { } } @@ -37,13 +29,9 @@ tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.t class C { x: T; get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; } set y(v: U) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. fn() { return this; } constructor(public a: T, private b: U) { } } diff --git a/tests/baselines/reference/interfaceContextualType.js b/tests/baselines/reference/interfaceContextualType.js index ec50272592509..7b7dc3b776dc7 100644 --- a/tests/baselines/reference/interfaceContextualType.js +++ b/tests/baselines/reference/interfaceContextualType.js @@ -23,7 +23,7 @@ class Bug { //// [interfaceContextualType.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Bug = (function () { function Bug() { } diff --git a/tests/baselines/reference/interfaceDeclaration3.js b/tests/baselines/reference/interfaceDeclaration3.js index 41f12dbac05b1..ca1a01de1b46f 100644 --- a/tests/baselines/reference/interfaceDeclaration3.js +++ b/tests/baselines/reference/interfaceDeclaration3.js @@ -58,7 +58,7 @@ interface I2 extends I1 { item:string; } //// [interfaceDeclaration3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var M1; (function (M1) { var C1 = (function () { diff --git a/tests/baselines/reference/interfaceDeclaration5.js b/tests/baselines/reference/interfaceDeclaration5.js index 318e8903c36f0..1875c80562c94 100644 --- a/tests/baselines/reference/interfaceDeclaration5.js +++ b/tests/baselines/reference/interfaceDeclaration5.js @@ -6,7 +6,7 @@ export class C1 { } //// [interfaceDeclaration5.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/interfaceExtendingClass.errors.txt b/tests/baselines/reference/interfaceExtendingClass.errors.txt deleted file mode 100644 index 66a75a1c998ce..0000000000000 --- a/tests/baselines/reference/interfaceExtendingClass.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass.ts(4,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass.ts (1 errors) ==== - class Foo { - x: string; - y() { } - get Z() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 1; - } - [x: string]: Object; - } - - interface I extends Foo { - } - - var i: I; - var r1 = i.x; - var r2 = i.y(); - var r3 = i.Z; - - var f: Foo = i; - i = f; \ No newline at end of file diff --git a/tests/baselines/reference/interfaceExtendingClass.symbols b/tests/baselines/reference/interfaceExtendingClass.symbols new file mode 100644 index 0000000000000..2adff6a9a0355 --- /dev/null +++ b/tests/baselines/reference/interfaceExtendingClass.symbols @@ -0,0 +1,56 @@ +=== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass.ts === +class Foo { +>Foo : Symbol(Foo, Decl(interfaceExtendingClass.ts, 0, 0)) + + x: string; +>x : Symbol(Foo.x, Decl(interfaceExtendingClass.ts, 0, 11)) + + y() { } +>y : Symbol(Foo.y, Decl(interfaceExtendingClass.ts, 1, 14)) + + get Z() { +>Z : Symbol(Foo.Z, Decl(interfaceExtendingClass.ts, 2, 11)) + + return 1; + } + [x: string]: Object; +>x : Symbol(x, Decl(interfaceExtendingClass.ts, 6, 5)) +>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +} + +interface I extends Foo { +>I : Symbol(I, Decl(interfaceExtendingClass.ts, 7, 1)) +>Foo : Symbol(Foo, Decl(interfaceExtendingClass.ts, 0, 0)) +} + +var i: I; +>i : Symbol(i, Decl(interfaceExtendingClass.ts, 12, 3)) +>I : Symbol(I, Decl(interfaceExtendingClass.ts, 7, 1)) + +var r1 = i.x; +>r1 : Symbol(r1, Decl(interfaceExtendingClass.ts, 13, 3)) +>i.x : Symbol(Foo.x, Decl(interfaceExtendingClass.ts, 0, 11)) +>i : Symbol(i, Decl(interfaceExtendingClass.ts, 12, 3)) +>x : Symbol(Foo.x, Decl(interfaceExtendingClass.ts, 0, 11)) + +var r2 = i.y(); +>r2 : Symbol(r2, Decl(interfaceExtendingClass.ts, 14, 3)) +>i.y : Symbol(Foo.y, Decl(interfaceExtendingClass.ts, 1, 14)) +>i : Symbol(i, Decl(interfaceExtendingClass.ts, 12, 3)) +>y : Symbol(Foo.y, Decl(interfaceExtendingClass.ts, 1, 14)) + +var r3 = i.Z; +>r3 : Symbol(r3, Decl(interfaceExtendingClass.ts, 15, 3)) +>i.Z : Symbol(Foo.Z, Decl(interfaceExtendingClass.ts, 2, 11)) +>i : Symbol(i, Decl(interfaceExtendingClass.ts, 12, 3)) +>Z : Symbol(Foo.Z, Decl(interfaceExtendingClass.ts, 2, 11)) + +var f: Foo = i; +>f : Symbol(f, Decl(interfaceExtendingClass.ts, 17, 3)) +>Foo : Symbol(Foo, Decl(interfaceExtendingClass.ts, 0, 0)) +>i : Symbol(i, Decl(interfaceExtendingClass.ts, 12, 3)) + +i = f; +>i : Symbol(i, Decl(interfaceExtendingClass.ts, 12, 3)) +>f : Symbol(f, Decl(interfaceExtendingClass.ts, 17, 3)) + diff --git a/tests/baselines/reference/interfaceExtendingClass.types b/tests/baselines/reference/interfaceExtendingClass.types new file mode 100644 index 0000000000000..db7e920265d9c --- /dev/null +++ b/tests/baselines/reference/interfaceExtendingClass.types @@ -0,0 +1,59 @@ +=== tests/cases/conformance/interfaces/interfacesExtendingClasses/interfaceExtendingClass.ts === +class Foo { +>Foo : Foo + + x: string; +>x : string + + y() { } +>y : () => void + + get Z() { +>Z : number + + return 1; +>1 : 1 + } + [x: string]: Object; +>x : string +>Object : Object +} + +interface I extends Foo { +>I : I +>Foo : Foo +} + +var i: I; +>i : I +>I : I + +var r1 = i.x; +>r1 : string +>i.x : string +>i : I +>x : string + +var r2 = i.y(); +>r2 : void +>i.y() : void +>i.y : () => void +>i : I +>y : () => void + +var r3 = i.Z; +>r3 : number +>i.Z : number +>i : I +>Z : number + +var f: Foo = i; +>f : Foo +>Foo : Foo +>i : I + +i = f; +>i = f : Foo +>i : I +>f : Foo + diff --git a/tests/baselines/reference/interfaceImplementation5.errors.txt b/tests/baselines/reference/interfaceImplementation5.errors.txt deleted file mode 100644 index 882d851612183..0000000000000 --- a/tests/baselines/reference/interfaceImplementation5.errors.txt +++ /dev/null @@ -1,58 +0,0 @@ -tests/cases/compiler/interfaceImplementation5.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/interfaceImplementation5.ts (8 errors) ==== - interface I1 { - getset1:number; - } - - class C1 implements I1 { - public get getset1(){return 1;} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - class C2 implements I1 { - public set getset1(baz:number){} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - class C3 implements I1 { - public get getset1(){return 1;} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public set getset1(baz:number){} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - class C4 implements I1 { - public get getset1(){var x:any; return x;} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - class C5 implements I1 { - public set getset1(baz:any){} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - class C6 implements I1 { - public set getset1(baz:any){} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - public get getset1(){var x:any; return x;} - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - \ No newline at end of file diff --git a/tests/baselines/reference/interfaceImplementation5.symbols b/tests/baselines/reference/interfaceImplementation5.symbols new file mode 100644 index 0000000000000..8d2663a896bb2 --- /dev/null +++ b/tests/baselines/reference/interfaceImplementation5.symbols @@ -0,0 +1,71 @@ +=== tests/cases/compiler/interfaceImplementation5.ts === +interface I1 { +>I1 : Symbol(I1, Decl(interfaceImplementation5.ts, 0, 0)) + + getset1:number; +>getset1 : Symbol(I1.getset1, Decl(interfaceImplementation5.ts, 0, 14)) +} + +class C1 implements I1 { +>C1 : Symbol(C1, Decl(interfaceImplementation5.ts, 2, 1)) +>I1 : Symbol(I1, Decl(interfaceImplementation5.ts, 0, 0)) + + public get getset1(){return 1;} +>getset1 : Symbol(C1.getset1, Decl(interfaceImplementation5.ts, 4, 24)) +} + +class C2 implements I1 { +>C2 : Symbol(C2, Decl(interfaceImplementation5.ts, 6, 1)) +>I1 : Symbol(I1, Decl(interfaceImplementation5.ts, 0, 0)) + + public set getset1(baz:number){} +>getset1 : Symbol(C2.getset1, Decl(interfaceImplementation5.ts, 8, 24)) +>baz : Symbol(baz, Decl(interfaceImplementation5.ts, 9, 23)) +} + +class C3 implements I1 { +>C3 : Symbol(C3, Decl(interfaceImplementation5.ts, 10, 1)) +>I1 : Symbol(I1, Decl(interfaceImplementation5.ts, 0, 0)) + + public get getset1(){return 1;} +>getset1 : Symbol(C3.getset1, Decl(interfaceImplementation5.ts, 12, 24), Decl(interfaceImplementation5.ts, 13, 35)) + + public set getset1(baz:number){} +>getset1 : Symbol(C3.getset1, Decl(interfaceImplementation5.ts, 12, 24), Decl(interfaceImplementation5.ts, 13, 35)) +>baz : Symbol(baz, Decl(interfaceImplementation5.ts, 14, 23)) +} + +class C4 implements I1 { +>C4 : Symbol(C4, Decl(interfaceImplementation5.ts, 15, 1)) +>I1 : Symbol(I1, Decl(interfaceImplementation5.ts, 0, 0)) + + public get getset1(){var x:any; return x;} +>getset1 : Symbol(C4.getset1, Decl(interfaceImplementation5.ts, 17, 24)) +>x : Symbol(x, Decl(interfaceImplementation5.ts, 18, 28)) +>x : Symbol(x, Decl(interfaceImplementation5.ts, 18, 28)) +} + +class C5 implements I1 { +>C5 : Symbol(C5, Decl(interfaceImplementation5.ts, 19, 1)) +>I1 : Symbol(I1, Decl(interfaceImplementation5.ts, 0, 0)) + + public set getset1(baz:any){} +>getset1 : Symbol(C5.getset1, Decl(interfaceImplementation5.ts, 21, 24)) +>baz : Symbol(baz, Decl(interfaceImplementation5.ts, 22, 23)) +} + +class C6 implements I1 { +>C6 : Symbol(C6, Decl(interfaceImplementation5.ts, 23, 1)) +>I1 : Symbol(I1, Decl(interfaceImplementation5.ts, 0, 0)) + + public set getset1(baz:any){} +>getset1 : Symbol(C6.getset1, Decl(interfaceImplementation5.ts, 25, 24), Decl(interfaceImplementation5.ts, 26, 33)) +>baz : Symbol(baz, Decl(interfaceImplementation5.ts, 26, 23)) + + public get getset1(){var x:any; return x;} +>getset1 : Symbol(C6.getset1, Decl(interfaceImplementation5.ts, 25, 24), Decl(interfaceImplementation5.ts, 26, 33)) +>x : Symbol(x, Decl(interfaceImplementation5.ts, 27, 28)) +>x : Symbol(x, Decl(interfaceImplementation5.ts, 27, 28)) +} + + diff --git a/tests/baselines/reference/interfaceImplementation5.types b/tests/baselines/reference/interfaceImplementation5.types new file mode 100644 index 0000000000000..292e0f7a474b5 --- /dev/null +++ b/tests/baselines/reference/interfaceImplementation5.types @@ -0,0 +1,73 @@ +=== tests/cases/compiler/interfaceImplementation5.ts === +interface I1 { +>I1 : I1 + + getset1:number; +>getset1 : number +} + +class C1 implements I1 { +>C1 : C1 +>I1 : I1 + + public get getset1(){return 1;} +>getset1 : number +>1 : 1 +} + +class C2 implements I1 { +>C2 : C2 +>I1 : I1 + + public set getset1(baz:number){} +>getset1 : number +>baz : number +} + +class C3 implements I1 { +>C3 : C3 +>I1 : I1 + + public get getset1(){return 1;} +>getset1 : number +>1 : 1 + + public set getset1(baz:number){} +>getset1 : number +>baz : number +} + +class C4 implements I1 { +>C4 : C4 +>I1 : I1 + + public get getset1(){var x:any; return x;} +>getset1 : any +>x : any +>x : any +} + +class C5 implements I1 { +>C5 : C5 +>I1 : I1 + + public set getset1(baz:any){} +>getset1 : any +>baz : any +} + +class C6 implements I1 { +>C6 : C6 +>I1 : I1 + + public set getset1(baz:any){} +>getset1 : any +>baz : any + + public get getset1(){var x:any; return x;} +>getset1 : any +>x : any +>x : any +} + + diff --git a/tests/baselines/reference/interfaceImplementation6.js b/tests/baselines/reference/interfaceImplementation6.js index 0bc759f6cda86..5401664e92d51 100644 --- a/tests/baselines/reference/interfaceImplementation6.js +++ b/tests/baselines/reference/interfaceImplementation6.js @@ -27,7 +27,7 @@ export class Test { //// [interfaceImplementation6.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js index 0b333ac1830a1..89bca20f659b1 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithExport.js @@ -19,7 +19,7 @@ export var d = new m2.m3.c(); //// [internalAliasClassInsideLocalModuleWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js index cf2eb41662b56..3166032445b49 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExport.js @@ -17,7 +17,7 @@ export module m2 { //// [internalAliasClassInsideLocalModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js index 1de7fe25407fb..f8e580d39fe5a 100644 --- a/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasClassInsideLocalModuleWithoutExportAccessError.js @@ -19,7 +19,7 @@ export var d = new m2.m3.c(); //// [internalAliasClassInsideLocalModuleWithoutExportAccessError.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js index e224b40c9f320..f8bc96a95f0b7 100644 --- a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithExport.js @@ -13,7 +13,7 @@ var cReturnVal = cProp.foo(10); //// [internalAliasClassInsideTopLevelModuleWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js index 16f53fe3e8b0e..c35a65ac69b6e 100644 --- a/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasClassInsideTopLevelModuleWithoutExport.js @@ -13,7 +13,7 @@ var cReturnVal = cProp.foo(10); //// [internalAliasClassInsideTopLevelModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; (function (x) { var c = (function () { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js index c387fa6e2c415..613775d8dcde3 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js @@ -15,7 +15,7 @@ export module c { //// [internalAliasEnumInsideLocalModuleWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var weekend; diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js index 717652283cf96..ae3252c4b960d 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js @@ -15,7 +15,7 @@ export module c { //// [internalAliasEnumInsideLocalModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var weekend; diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js index a84ebf0b9aded..1b4f376cb55db 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js @@ -16,7 +16,7 @@ var happyFriday = c.b.Friday; //// [internalAliasEnumInsideLocalModuleWithoutExportAccessError.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var weekend; diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js index ad07b9bd33f1c..1d0bca3854f17 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js @@ -14,7 +14,7 @@ export var bVal: b = b.Sunday; //// [internalAliasEnumInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var weekend; diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js index 6b5f5b17a26de..701b94167c56e 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js @@ -14,7 +14,7 @@ export var bVal: b = b.Sunday; //// [internalAliasEnumInsideTopLevelModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var weekend; diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js index 95bb936bc75e2..c9f309b4bfef5 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithExport.js @@ -14,7 +14,7 @@ export module c { //// [internalAliasFunctionInsideLocalModuleWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js index 50de6b470ee4c..f31373983db0e 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExport.js @@ -14,7 +14,7 @@ export module c { //// [internalAliasFunctionInsideLocalModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js index 543e9952f235a..f86fa09c18435 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js @@ -14,7 +14,7 @@ var d = c.b(11); //// [internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js index 267045b625d5d..8416fae0724f6 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithExport.js @@ -13,7 +13,7 @@ export var bVal2 = b; //// [internalAliasFunctionInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js index bb3b0e244d2fa..2cf4eff0795b8 100644 --- a/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasFunctionInsideTopLevelModuleWithoutExport.js @@ -12,7 +12,7 @@ export var bVal2 = b; //// [internalAliasFunctionInsideTopLevelModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { function foo(x) { diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js index 85335a0fb7f65..de96d66645531 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithExport.js @@ -14,7 +14,7 @@ export module c { //// [internalAliasInitializedModuleInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js index c39e6cfd16848..0a42955d9633e 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js @@ -13,7 +13,7 @@ export module c { //// [internalAliasInitializedModuleInsideLocalModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js index 6e66118f5b934..3e0e84dac0594 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -15,7 +15,7 @@ export var d = new c.b.c(); //// [internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js index 86d9f88cee372..ec4e764c6020a 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js @@ -11,7 +11,7 @@ export var x: b.c = new b.c(); //// [internalAliasInitializedModuleInsideTopLevelModuleWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js index 79185fed2284a..9b044844c1253 100644 --- a/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js @@ -12,7 +12,7 @@ export var x: b.c = new b.c(); //// [internalAliasInitializedModuleInsideTopLevelModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { var b; diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js index bd50cd8bbc2ec..299d7104ab64a 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithExport.js @@ -13,7 +13,7 @@ export module c { //// [internalAliasInterfaceInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c; (function (c) { })(c = exports.c || (exports.c = {})); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js index f7b08e6c170aa..9729867cfbe78 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExport.js @@ -13,7 +13,7 @@ export module c { //// [internalAliasInterfaceInsideLocalModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c; (function (c) { })(c = exports.c || (exports.c = {})); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js index 19163ff1f66ab..67cef602ef96a 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js @@ -14,7 +14,7 @@ var x: c.b; //// [internalAliasInterfaceInsideLocalModuleWithoutExportAccessError.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c; (function (c) { })(c = exports.c || (exports.c = {})); diff --git a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js index 4434670366c56..5adb22cac7424 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithExport.js @@ -10,7 +10,7 @@ export var x: b; //// [internalAliasInterfaceInsideTopLevelModuleWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [internalAliasInterfaceInsideTopLevelModuleWithExport.d.ts] diff --git a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js index 5645c76ed2ad5..cffa98b69f506 100644 --- a/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasInterfaceInsideTopLevelModuleWithoutExport.js @@ -11,7 +11,7 @@ export var x: b; //// [internalAliasInterfaceInsideTopLevelModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js index 7ca966e90b206..c9f0eee107bdd 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithExport.js @@ -15,7 +15,7 @@ export module c { //// [internalAliasUninitializedModuleInsideLocalModuleWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var c; (function (c) { c.x.foo(); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js index 22793f8aef5ae..d28711ac89968 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js @@ -15,7 +15,7 @@ export module c { //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var c; (function (c) { c.x.foo(); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js index a6b4f83de8e34..72ff6216004de 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -19,7 +19,7 @@ export var z: c.b.I; //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExportAccessError.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c; (function (c) { c.x.foo(); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js index eccbd9a45bd58..229edcb30d518 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js @@ -15,7 +15,7 @@ x.foo(); //// [internalAliasUninitializedModuleInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x.foo(); }); diff --git a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js index 27de6bbfd9837..560ac45207b69 100644 --- a/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js @@ -14,7 +14,7 @@ x.foo(); //// [internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x.foo(); diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js index 34f044721c49e..96cf6c0388561 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithExport.js @@ -12,7 +12,7 @@ export module c { //// [internalAliasVarInsideLocalModuleWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js index 161dc0bf97368..3a9613ffbcd2d 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExport.js @@ -12,7 +12,7 @@ export module c { //// [internalAliasVarInsideLocalModuleWithoutExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js index a0192fc9daaf2..d0bd347fb3fd3 100644 --- a/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasVarInsideLocalModuleWithoutExportAccessError.js @@ -12,7 +12,7 @@ export var z = c.b; //// [internalAliasVarInsideLocalModuleWithoutExportAccessError.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js index d27b4e3188da2..673e6dad893e9 100644 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithExport.js @@ -11,7 +11,7 @@ export var bVal = b; //// [internalAliasVarInsideTopLevelModuleWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js index 65c9204ed3c1e..fb135f0668988 100644 --- a/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasVarInsideTopLevelModuleWithoutExport.js @@ -10,7 +10,7 @@ export var bVal = b; //// [internalAliasVarInsideTopLevelModuleWithoutExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a; (function (a) { a.x = 10; diff --git a/tests/baselines/reference/intersectionTypeInference1.js b/tests/baselines/reference/intersectionTypeInference1.js index e13f8edf0cffd..91a262d6c7c0e 100644 --- a/tests/baselines/reference/intersectionTypeInference1.js +++ b/tests/baselines/reference/intersectionTypeInference1.js @@ -11,7 +11,7 @@ export const Form3 = brokenFunction(parameterFn)({store: "hello"}) //// [intersectionTypeInference1.js] "use strict"; // Repro from #8801 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function alert(s) { } var parameterFn = function (props) { return alert(props.store); }; var brokenFunction = function (f) { return function (o) { return o; }; }; diff --git a/tests/baselines/reference/invalidSyntaxNamespaceImportWithAMD.js b/tests/baselines/reference/invalidSyntaxNamespaceImportWithAMD.js index b2adf37b5020f..b988ba51140fd 100644 --- a/tests/baselines/reference/invalidSyntaxNamespaceImportWithAMD.js +++ b/tests/baselines/reference/invalidSyntaxNamespaceImportWithAMD.js @@ -9,7 +9,7 @@ import * from Zero from "./0" //// [0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } @@ -20,7 +20,7 @@ define(["require", "exports"], function (require, exports) { //// [1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); from; "./0"; }); diff --git a/tests/baselines/reference/invalidSyntaxNamespaceImportWithCommonjs.js b/tests/baselines/reference/invalidSyntaxNamespaceImportWithCommonjs.js index b1ab6fc6aa393..8f2071332dcc0 100644 --- a/tests/baselines/reference/invalidSyntaxNamespaceImportWithCommonjs.js +++ b/tests/baselines/reference/invalidSyntaxNamespaceImportWithCommonjs.js @@ -8,7 +8,7 @@ import * from Zero from "./0" //// [0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } @@ -17,7 +17,7 @@ var C = (function () { exports.C = C; //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var from = require(); from; "./0"; diff --git a/tests/baselines/reference/isLiteral1.errors.txt b/tests/baselines/reference/isLiteral1.errors.txt new file mode 100644 index 0000000000000..b967a4d0b4b27 --- /dev/null +++ b/tests/baselines/reference/isLiteral1.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/isLiteral1.ts(1,17): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2343'. + + +==== tests/cases/compiler/isLiteral1.ts (1 errors) ==== + var x: number = 02343; + ~~~~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2343'. \ No newline at end of file diff --git a/tests/baselines/reference/isLiteral2.errors.txt b/tests/baselines/reference/isLiteral2.errors.txt new file mode 100644 index 0000000000000..dbf9a60bffdb9 --- /dev/null +++ b/tests/baselines/reference/isLiteral2.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/isLiteral2.ts(1,17): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2343'. + + +==== tests/cases/compiler/isLiteral2.ts (1 errors) ==== + var x: number = 02343 + ~~~~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2343'. \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesSpecifiedModule.js b/tests/baselines/reference/isolatedModulesSpecifiedModule.js index 895c47e250490..a06e826955f51 100644 --- a/tests/baselines/reference/isolatedModulesSpecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesSpecifiedModule.js @@ -3,4 +3,4 @@ export var x; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js index 895c47e250490..a06e826955f51 100644 --- a/tests/baselines/reference/isolatedModulesUnspecifiedModule.js +++ b/tests/baselines/reference/isolatedModulesUnspecifiedModule.js @@ -3,4 +3,4 @@ export var x; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.js b/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.js index acc590418e980..d42a53bec83c2 100644 --- a/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.js +++ b/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.js @@ -25,7 +25,7 @@ export default apply; //// [apply.js] define("_apply", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. @@ -46,5 +46,5 @@ define("_apply", ["require", "exports"], function (require, exports) { } return func.apply(thisArg, args); } - exports["default"] = apply; + exports.default = apply; }); diff --git a/tests/baselines/reference/jsxImportInAttribute.js b/tests/baselines/reference/jsxImportInAttribute.js index b249d88a6c2b4..f41787501976d 100644 --- a/tests/baselines/reference/jsxImportInAttribute.js +++ b/tests/baselines/reference/jsxImportInAttribute.js @@ -15,8 +15,8 @@ let x = Test; // emit test_1.default //// [consumer.jsx] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var Test_1 = require("Test"); -var x = Test_1["default"]; // emit test_1.default -; // ? +var x = Test_1.default; // emit test_1.default +; // ? diff --git a/tests/baselines/reference/jsxViaImport.2.js b/tests/baselines/reference/jsxViaImport.2.js index 813df2de93812..587851258c141 100644 --- a/tests/baselines/reference/jsxViaImport.2.js +++ b/tests/baselines/reference/jsxViaImport.2.js @@ -34,7 +34,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var BaseComponent_1 = require("BaseComponent"); var TestComponent = (function (_super) { diff --git a/tests/baselines/reference/jsxViaImport.js b/tests/baselines/reference/jsxViaImport.js index cfbbb9eb456ce..d3c8e4661417c 100644 --- a/tests/baselines/reference/jsxViaImport.js +++ b/tests/baselines/reference/jsxViaImport.js @@ -34,7 +34,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var BaseComponent = require("BaseComponent"); var TestComponent = (function (_super) { diff --git a/tests/baselines/reference/keepImportsInDts1.js b/tests/baselines/reference/keepImportsInDts1.js index e58702de2293a..a727eb8051a54 100644 --- a/tests/baselines/reference/keepImportsInDts1.js +++ b/tests/baselines/reference/keepImportsInDts1.js @@ -8,7 +8,7 @@ import "test" //// [main.js] define(["require", "exports", "test"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/keepImportsInDts2.js b/tests/baselines/reference/keepImportsInDts2.js index 6e659f489dafb..89919c4fd6086 100644 --- a/tests/baselines/reference/keepImportsInDts2.js +++ b/tests/baselines/reference/keepImportsInDts2.js @@ -8,12 +8,12 @@ import "./folder/test" //// [test.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [main.js] define(["require", "exports", "./folder/test"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/keepImportsInDts3.js b/tests/baselines/reference/keepImportsInDts3.js index 6589c675eaa40..5306b31735818 100644 --- a/tests/baselines/reference/keepImportsInDts3.js +++ b/tests/baselines/reference/keepImportsInDts3.js @@ -8,11 +8,11 @@ import "test" //// [outputfile.js] define("test", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); define("app/main", ["require", "exports", "test"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/keepImportsInDts4.js b/tests/baselines/reference/keepImportsInDts4.js index 41c07e836684e..72ea29ac684df 100644 --- a/tests/baselines/reference/keepImportsInDts4.js +++ b/tests/baselines/reference/keepImportsInDts4.js @@ -8,11 +8,11 @@ import "./folder/test" //// [outputfile.js] define("folder/test", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); define("main", ["require", "exports", "folder/test"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/keywordField.js b/tests/baselines/reference/keywordField.js index a146cffade84f..581d5afa14a38 100644 --- a/tests/baselines/reference/keywordField.js +++ b/tests/baselines/reference/keywordField.js @@ -12,7 +12,7 @@ var q = a["if"]; //// [keywordField.js] var obj = {}; -obj["if"] = 1; -var a = { "if": "test" }; -var n = a["if"]; +obj.if = 1; +var a = { if: "test" }; +var n = a.if; var q = a["if"]; diff --git a/tests/baselines/reference/keywordInJsxIdentifier.js b/tests/baselines/reference/keywordInJsxIdentifier.js index f88fe4dff877b..969bf49e8491f 100644 --- a/tests/baselines/reference/keywordInJsxIdentifier.js +++ b/tests/baselines/reference/keywordInJsxIdentifier.js @@ -8,6 +8,6 @@ declare var React: any; //// [keywordInJsxIdentifier.js] React.createElement("foo", { "class-id": true }); -React.createElement("foo", { "class": true }); +React.createElement("foo", { class: true }); React.createElement("foo", { "class-id": "1" }); -React.createElement("foo", { "class": "1" }); +React.createElement("foo", { class: "1" }); diff --git a/tests/baselines/reference/localAliasExportAssignment.js b/tests/baselines/reference/localAliasExportAssignment.js index f198c0f9ea777..d17e2ddd8437a 100644 --- a/tests/baselines/reference/localAliasExportAssignment.js +++ b/tests/baselines/reference/localAliasExportAssignment.js @@ -22,7 +22,7 @@ var server; module.exports = server; //// [localAliasExportAssignment_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var connect = require("./localAliasExportAssignment_0"); connect(); diff --git a/tests/baselines/reference/mapOnTupleTypes01.js b/tests/baselines/reference/mapOnTupleTypes01.js index 565988bfd73f6..6df6ad3098d80 100644 --- a/tests/baselines/reference/mapOnTupleTypes01.js +++ b/tests/baselines/reference/mapOnTupleTypes01.js @@ -43,7 +43,7 @@ export let h = numNumNumNumNum.map(n => n * n); //// [mapOnTupleTypes01.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.mapOnLooseArrayLiteral = [1, 2, 3, 4].map(function (n) { return n * n; }); // Length 1 var numTuple = [1]; diff --git a/tests/baselines/reference/mapOnTupleTypes02.js b/tests/baselines/reference/mapOnTupleTypes02.js index 2fd4daab16bf5..2520f6e01f3fb 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.js +++ b/tests/baselines/reference/mapOnTupleTypes02.js @@ -7,7 +7,7 @@ export function increment(point: Point) { //// [mapOnTupleTypes02.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function increment(point) { return point.map(function (d) { return d + 1; }); } diff --git a/tests/baselines/reference/memberAccessMustUseModuleInstances.js b/tests/baselines/reference/memberAccessMustUseModuleInstances.js index 2ba05b016bee2..29e0bfc4fff42 100644 --- a/tests/baselines/reference/memberAccessMustUseModuleInstances.js +++ b/tests/baselines/reference/memberAccessMustUseModuleInstances.js @@ -17,7 +17,7 @@ WinJS.Promise.timeout(10); //// [memberAccessMustUseModuleInstances_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Promise = (function () { function Promise() { } @@ -31,6 +31,6 @@ define(["require", "exports"], function (require, exports) { //// [memberAccessMustUseModuleInstances_1.js] define(["require", "exports", "memberAccessMustUseModuleInstances_0"], function (require, exports, WinJS) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); WinJS.Promise.timeout(10); }); diff --git a/tests/baselines/reference/mergeWithImportedNamespace.js b/tests/baselines/reference/mergeWithImportedNamespace.js index ec2eb4a1087cb..9d9e11dabc316 100644 --- a/tests/baselines/reference/mergeWithImportedNamespace.js +++ b/tests/baselines/reference/mergeWithImportedNamespace.js @@ -12,11 +12,11 @@ export namespace N { //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var N; (function (N) { N.x = 1; })(N = exports.N || (exports.N = {})); //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/mergeWithImportedType.js b/tests/baselines/reference/mergeWithImportedType.js index efa95d7763064..1360ee0c5ea84 100644 --- a/tests/baselines/reference/mergeWithImportedType.js +++ b/tests/baselines/reference/mergeWithImportedType.js @@ -10,11 +10,11 @@ export type E = E; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var E; (function (E) { E[E["X"] = 0] = "X"; })(E = exports.E || (exports.E = {})); //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/mergedDeclarations6.js b/tests/baselines/reference/mergedDeclarations6.js index 2b492b569c250..f8be1486ef2cf 100644 --- a/tests/baselines/reference/mergedDeclarations6.js +++ b/tests/baselines/reference/mergedDeclarations6.js @@ -25,7 +25,7 @@ export class B extends A { //// [a.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -49,7 +49,7 @@ var __extends = (this && this.__extends) || (function () { })(); define(["require", "exports", "./a"], function (require, exports, a_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function (_super) { __extends(B, _super); function B() { diff --git a/tests/baselines/reference/mergedDeclarations7.js b/tests/baselines/reference/mergedDeclarations7.js index 8fa3f2d0731f5..340f03189bbaa 100644 --- a/tests/baselines/reference/mergedDeclarations7.js +++ b/tests/baselines/reference/mergedDeclarations7.js @@ -24,6 +24,6 @@ let p: Passport = passport.use(); //// [test.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var passport = require("passport"); var p = passport.use(); diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen.js index 8d5f55b68017f..aea117787b2aa 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen.js @@ -17,7 +17,7 @@ export module X { //// [mergedModuleDeclarationCodeGen.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var X; (function (X) { var Y; diff --git a/tests/baselines/reference/metadataOfStringLiteral.js b/tests/baselines/reference/metadataOfStringLiteral.js index 676914681cb91..c45071114e09d 100644 --- a/tests/baselines/reference/metadataOfStringLiteral.js +++ b/tests/baselines/reference/metadataOfStringLiteral.js @@ -25,4 +25,4 @@ var Foo = (function () { __decorate([ PropDeco, __metadata("design:type", String) -], Foo.prototype, "foo"); +], Foo.prototype, "foo", void 0); diff --git a/tests/baselines/reference/metadataOfUnion.js b/tests/baselines/reference/metadataOfUnion.js index 9a88481c80a9e..d450855b38ec2 100644 --- a/tests/baselines/reference/metadataOfUnion.js +++ b/tests/baselines/reference/metadataOfUnion.js @@ -60,15 +60,15 @@ var B = (function () { __decorate([ PropDeco, __metadata("design:type", Object) -], B.prototype, "x"); +], B.prototype, "x", void 0); __decorate([ PropDeco, __metadata("design:type", Boolean) -], B.prototype, "y"); +], B.prototype, "y", void 0); __decorate([ PropDeco, __metadata("design:type", Object) -], B.prototype, "z"); +], B.prototype, "z", void 0); var E; (function (E) { E[E["A"] = 0] = "A"; @@ -84,16 +84,16 @@ var D = (function () { __decorate([ PropDeco, __metadata("design:type", Number) -], D.prototype, "a"); +], D.prototype, "a", void 0); __decorate([ PropDeco, __metadata("design:type", Number) -], D.prototype, "b"); +], D.prototype, "b", void 0); __decorate([ PropDeco, __metadata("design:type", Number) -], D.prototype, "c"); +], D.prototype, "c", void 0); __decorate([ PropDeco, __metadata("design:type", Number) -], D.prototype, "d"); +], D.prototype, "d", void 0); diff --git a/tests/baselines/reference/metadataOfUnionWithNull.js b/tests/baselines/reference/metadataOfUnionWithNull.js index cc594ae326dc3..6dccf822a4358 100644 --- a/tests/baselines/reference/metadataOfUnionWithNull.js +++ b/tests/baselines/reference/metadataOfUnionWithNull.js @@ -66,48 +66,48 @@ var B = (function () { __decorate([ PropDeco, __metadata("design:type", String) -], B.prototype, "x"); +], B.prototype, "x", void 0); __decorate([ PropDeco, __metadata("design:type", Boolean) -], B.prototype, "y"); +], B.prototype, "y", void 0); __decorate([ PropDeco, __metadata("design:type", String) -], B.prototype, "z"); +], B.prototype, "z", void 0); __decorate([ PropDeco, __metadata("design:type", void 0) -], B.prototype, "a"); +], B.prototype, "a", void 0); __decorate([ PropDeco, __metadata("design:type", void 0) -], B.prototype, "b"); +], B.prototype, "b", void 0); __decorate([ PropDeco, __metadata("design:type", void 0) -], B.prototype, "c"); +], B.prototype, "c", void 0); __decorate([ PropDeco, __metadata("design:type", void 0) -], B.prototype, "d"); +], B.prototype, "d", void 0); __decorate([ PropDeco, __metadata("design:type", typeof Symbol === "function" ? Symbol : Object) -], B.prototype, "e"); +], B.prototype, "e", void 0); __decorate([ PropDeco, __metadata("design:type", Object) -], B.prototype, "f"); +], B.prototype, "f", void 0); __decorate([ PropDeco, __metadata("design:type", A) -], B.prototype, "g"); +], B.prototype, "g", void 0); __decorate([ PropDeco, __metadata("design:type", B) -], B.prototype, "h"); +], B.prototype, "h", void 0); __decorate([ PropDeco, __metadata("design:type", typeof Symbol === "function" ? Symbol : Object) -], B.prototype, "j"); +], B.prototype, "j", void 0); diff --git a/tests/baselines/reference/missingFunctionImplementation.js b/tests/baselines/reference/missingFunctionImplementation.js index 5ca505dff85ba..aead5c832dd26 100644 --- a/tests/baselines/reference/missingFunctionImplementation.js +++ b/tests/baselines/reference/missingFunctionImplementation.js @@ -81,7 +81,7 @@ namespace N12 { //// [missingFunctionImplementation.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/missingFunctionImplementation2.js b/tests/baselines/reference/missingFunctionImplementation2.js index dde60611657c0..4c554e23c8549 100644 --- a/tests/baselines/reference/missingFunctionImplementation2.js +++ b/tests/baselines/reference/missingFunctionImplementation2.js @@ -11,7 +11,7 @@ export function f(a?, b?); //// [missingFunctionImplementation2_a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [missingFunctionImplementation2_b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/missingSemicolonInModuleSpecifier.js b/tests/baselines/reference/missingSemicolonInModuleSpecifier.js index 889f2b800be14..0c7eb385d6855 100644 --- a/tests/baselines/reference/missingSemicolonInModuleSpecifier.js +++ b/tests/baselines/reference/missingSemicolonInModuleSpecifier.js @@ -9,9 +9,9 @@ import {x} from "./a" //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); (function () { return 1; }()); diff --git a/tests/baselines/reference/moduleAliasAsFunctionArgument.js b/tests/baselines/reference/moduleAliasAsFunctionArgument.js index 16eb962a863ce..a5298113be7d1 100644 --- a/tests/baselines/reference/moduleAliasAsFunctionArgument.js +++ b/tests/baselines/reference/moduleAliasAsFunctionArgument.js @@ -17,12 +17,12 @@ fn(a); // Error: property 'x' is missing from 'a' //// [moduleAliasAsFunctionArgument_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [moduleAliasAsFunctionArgument_1.js] define(["require", "exports", "moduleAliasAsFunctionArgument_0"], function (require, exports, a) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function fn(arg) { } a.x; // OK diff --git a/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js index 949a30efc8fca..7e3f296b3d330 100644 --- a/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js +++ b/tests/baselines/reference/moduleAugmentationCollidingNamesInAugmentation1.js @@ -35,24 +35,24 @@ let x: Observable; //// [observable.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [map1.js] define(["require", "exports", "./observable"], function (require, exports, observable_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); observable_1.Observable.prototype.map = function () { }; }); //// [map2.js] define(["require", "exports", "./observable"], function (require, exports, observable_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); observable_1.Observable.prototype.map = function () { }; }); //// [main.js] define(["require", "exports", "./map1", "./map2"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x; }); diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit1.js b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.js index 818c49c9edf8f..e51246dc2f482 100644 --- a/tests/baselines/reference/moduleAugmentationDeclarationEmit1.js +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit1.js @@ -33,19 +33,19 @@ let y = x.map(x => x + 1); //// [observable.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Observable; (function (Observable) { var someValue; })(Observable = exports.Observable || (exports.Observable = {})); //// [map.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("./observable"); observable_1.Observable.prototype.map = function () { }; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./map"); var x; var y = x.map(function (x) { return x + 1; }); diff --git a/tests/baselines/reference/moduleAugmentationDeclarationEmit2.js b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.js index 1dca750a6148f..299af98a14c74 100644 --- a/tests/baselines/reference/moduleAugmentationDeclarationEmit2.js +++ b/tests/baselines/reference/moduleAugmentationDeclarationEmit2.js @@ -35,18 +35,18 @@ let z2 = Observable.someAnotherValue.toLowerCase(); //// [observable.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Observable; (function (Observable) { })(Observable = exports.Observable || (exports.Observable = {})); //// [map.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("./observable"); observable_1.Observable.prototype.map = function () { }; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("./observable"); require("./map"); var x; diff --git a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js index 02e2fb313c470..0cde0df355ef8 100644 --- a/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js +++ b/tests/baselines/reference/moduleAugmentationDisallowedExtensions.js @@ -47,24 +47,24 @@ import "./x"; //// [x0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.a = 1; //// [x.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var N1; (function (N1) { N1.x = 1; })(N1 || (N1 = {})); //// [observable.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; //// [test.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.b = 1; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./x"); diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js index 1ef8a7cd15414..8876ef2ae6d8e 100644 --- a/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule1.js @@ -34,12 +34,12 @@ let y = x.map(x => x + 1); //// [map.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("observable"); observable_1.Observable.prototype.map = function () { }; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./map"); var x; var y = x.map(function (x) { return x + 1; }); diff --git a/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js index 23e61952e30be..5ba3986c1fe09 100644 --- a/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js +++ b/tests/baselines/reference/moduleAugmentationExtendAmbientModule2.js @@ -36,12 +36,12 @@ let z2 = Observable.someAnotherValue.toLowerCase(); //// [map.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("observable"); observable_1.Observable.prototype.map = function () { }; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var observable_1 = require("observable"); require("./map"); diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule1.js b/tests/baselines/reference/moduleAugmentationExtendFileModule1.js index 85b30f4d0027f..a71bbb969e9ed 100644 --- a/tests/baselines/reference/moduleAugmentationExtendFileModule1.js +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule1.js @@ -33,19 +33,19 @@ let y = x.map(x => x + 1); //// [observable.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Observable; (function (Observable) { var someValue; })(Observable = exports.Observable || (exports.Observable = {})); //// [map.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("./observable"); observable_1.Observable.prototype.map = function () { }; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./map"); var x; var y = x.map(function (x) { return x + 1; }); diff --git a/tests/baselines/reference/moduleAugmentationExtendFileModule2.js b/tests/baselines/reference/moduleAugmentationExtendFileModule2.js index 4c67c63d1bb78..fdc35d98d5328 100644 --- a/tests/baselines/reference/moduleAugmentationExtendFileModule2.js +++ b/tests/baselines/reference/moduleAugmentationExtendFileModule2.js @@ -35,18 +35,18 @@ let z2 = Observable.someAnotherValue.toLowerCase(); //// [observable.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Observable; (function (Observable) { })(Observable = exports.Observable || (exports.Observable = {})); //// [map.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("./observable"); observable_1.Observable.prototype.map = function () { }; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("./observable"); require("./map"); var x; diff --git a/tests/baselines/reference/moduleAugmentationGlobal1.js b/tests/baselines/reference/moduleAugmentationGlobal1.js index ae4042768e800..39e381bbb125b 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal1.js +++ b/tests/baselines/reference/moduleAugmentationGlobal1.js @@ -19,7 +19,7 @@ let y = x.getA().x; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -28,7 +28,7 @@ var A = (function () { exports.A = A; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = [1]; var y = x.getA().x; diff --git a/tests/baselines/reference/moduleAugmentationGlobal2.js b/tests/baselines/reference/moduleAugmentationGlobal2.js index 28f6d3babf048..0959a595ee321 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal2.js +++ b/tests/baselines/reference/moduleAugmentationGlobal2.js @@ -18,7 +18,7 @@ let y = x.getCountAsString().toLowerCase(); //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -28,7 +28,7 @@ exports.A = A; ; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = [1]; var y = x.getCountAsString().toLowerCase(); diff --git a/tests/baselines/reference/moduleAugmentationGlobal3.js b/tests/baselines/reference/moduleAugmentationGlobal3.js index d744d3017b905..a35fc5c74300a 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal3.js +++ b/tests/baselines/reference/moduleAugmentationGlobal3.js @@ -21,7 +21,7 @@ let y = x.getCountAsString().toLowerCase(); //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -31,10 +31,10 @@ exports.A = A; ; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f2"); var x = [1]; var y = x.getCountAsString().toLowerCase(); diff --git a/tests/baselines/reference/moduleAugmentationGlobal4.js b/tests/baselines/reference/moduleAugmentationGlobal4.js index a47e4c6673a2e..927516da9622a 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal4.js +++ b/tests/baselines/reference/moduleAugmentationGlobal4.js @@ -18,13 +18,13 @@ import "./f2"; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f1"); require("./f2"); diff --git a/tests/baselines/reference/moduleAugmentationGlobal5.js b/tests/baselines/reference/moduleAugmentationGlobal5.js index 55433fcf6d6b9..f865fba81fe07 100644 --- a/tests/baselines/reference/moduleAugmentationGlobal5.js +++ b/tests/baselines/reference/moduleAugmentationGlobal5.js @@ -22,7 +22,7 @@ import "B"; //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// /// require("A"); diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports1.js b/tests/baselines/reference/moduleAugmentationImportsAndExports1.js index 27d69dd181c7d..abb6eb59c36f1 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports1.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports1.js @@ -28,7 +28,7 @@ let b = a.foo().n; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -37,7 +37,7 @@ var A = (function () { exports.A = A; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -46,12 +46,12 @@ var B = (function () { exports.B = B; //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f1_1 = require("./f1"); f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f3"); var a; var b = a.foo().n; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.js b/tests/baselines/reference/moduleAugmentationImportsAndExports2.js index 32d7950574df1..6563fc0d8b363 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports2.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.js @@ -40,7 +40,7 @@ let b = a.foo().n; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -49,7 +49,7 @@ var A = (function () { exports.A = A; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -58,12 +58,12 @@ var B = (function () { exports.B = B; //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f1_1 = require("./f1"); f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f3"); var a; var b = a.foo().n; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports3.js b/tests/baselines/reference/moduleAugmentationImportsAndExports3.js index 12bcffd00f698..8f8f4aa579fdc 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports3.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports3.js @@ -38,7 +38,7 @@ let b = a.foo().n; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -47,7 +47,7 @@ var A = (function () { exports.A = A; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -56,12 +56,12 @@ var B = (function () { exports.B = B; //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f1_1 = require("./f1"); f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f3"); var a; var b = a.foo().n; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports4.js b/tests/baselines/reference/moduleAugmentationImportsAndExports4.js index 041c2c71d093a..a92ac21e9bd83 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports4.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports4.js @@ -40,7 +40,7 @@ let d = a.baz().b; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -49,7 +49,7 @@ var A = (function () { exports.A = A; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -58,12 +58,12 @@ var B = (function () { exports.B = B; //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f1_1 = require("./f1"); f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f3"); var a; var b = a.foo().n; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports5.js b/tests/baselines/reference/moduleAugmentationImportsAndExports5.js index 25a3702db6414..1dbe4ea7359b7 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports5.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports5.js @@ -40,7 +40,7 @@ let d = a.baz().b; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -49,7 +49,7 @@ var A = (function () { exports.A = A; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -58,12 +58,12 @@ var B = (function () { exports.B = B; //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f1_1 = require("./f1"); f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f3"); var a; var b = a.foo().n; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports6.js b/tests/baselines/reference/moduleAugmentationImportsAndExports6.js index 3796d70f2d325..37de04062a053 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports6.js +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports6.js @@ -40,7 +40,7 @@ let d = a.baz().b; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -49,7 +49,7 @@ var A = (function () { exports.A = A; //// [f2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -58,12 +58,12 @@ var B = (function () { exports.B = B; //// [f3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f1_1 = require("./f1"); f1_1.A.prototype.foo = function () { return undefined; }; //// [f4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./f3"); var a; var b = a.foo().n; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule1.js b/tests/baselines/reference/moduleAugmentationInAmbientModule1.js index 7bd3c93496c3a..b58843ef00356 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule1.js +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule1.js @@ -29,7 +29,7 @@ x.foo().x; //// [main.js] "use strict"; /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; x.foo().x; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule2.js b/tests/baselines/reference/moduleAugmentationInAmbientModule2.js index f3d276309ef27..681bc959e511f 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule2.js +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule2.js @@ -30,7 +30,7 @@ x.foo().x; //// [main.js] "use strict"; /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("Map"); var x; x.foo().x; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule3.js b/tests/baselines/reference/moduleAugmentationInAmbientModule3.js index 3cedfd66d5deb..fe0e99f1d74cf 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule3.js +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule3.js @@ -40,7 +40,7 @@ x.foo2().x2; //// [main.js] "use strict"; /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("Map"); var x; x.foo().x; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule4.js b/tests/baselines/reference/moduleAugmentationInAmbientModule4.js index ab4ff1bc79f11..5abd8b988fa94 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule4.js +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule4.js @@ -43,7 +43,7 @@ x.foo2().x2; "use strict"; /// /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("Map"); var x; x.foo().x; diff --git a/tests/baselines/reference/moduleAugmentationInAmbientModule5.js b/tests/baselines/reference/moduleAugmentationInAmbientModule5.js index 4f99c79fa18e8..0c47c33bcfb36 100644 --- a/tests/baselines/reference/moduleAugmentationInAmbientModule5.js +++ b/tests/baselines/reference/moduleAugmentationInAmbientModule5.js @@ -24,7 +24,7 @@ let y = x.getA().x; //// [f.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// require("array"); var x = [1]; diff --git a/tests/baselines/reference/moduleAugmentationInDependency.js b/tests/baselines/reference/moduleAugmentationInDependency.js index 31c82ad18e881..1b4243beca70f 100644 --- a/tests/baselines/reference/moduleAugmentationInDependency.js +++ b/tests/baselines/reference/moduleAugmentationInDependency.js @@ -10,5 +10,5 @@ import "A" //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("A"); diff --git a/tests/baselines/reference/moduleAugmentationInDependency2.js b/tests/baselines/reference/moduleAugmentationInDependency2.js index e7a964650bd8e..f1d72fd5f133b 100644 --- a/tests/baselines/reference/moduleAugmentationInDependency2.js +++ b/tests/baselines/reference/moduleAugmentationInDependency2.js @@ -10,8 +10,8 @@ import "A" //// [index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("A"); diff --git a/tests/baselines/reference/moduleAugmentationNoNewNames.js b/tests/baselines/reference/moduleAugmentationNoNewNames.js index 0887377bc5895..939fa2ca85d3a 100644 --- a/tests/baselines/reference/moduleAugmentationNoNewNames.js +++ b/tests/baselines/reference/moduleAugmentationNoNewNames.js @@ -29,15 +29,15 @@ let y = x.map(x => x + 1); //// [observable.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [map.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var observable_1 = require("./observable"); observable_1.Observable.prototype.map = function () { }; //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("./map"); var x; var y = x.map(function (x) { return x + 1; }); diff --git a/tests/baselines/reference/moduleAugmentationsImports1.js b/tests/baselines/reference/moduleAugmentationsImports1.js index 9e40067c2fe36..8ddba3fa544cf 100644 --- a/tests/baselines/reference/moduleAugmentationsImports1.js +++ b/tests/baselines/reference/moduleAugmentationsImports1.js @@ -44,7 +44,7 @@ let c = a.getCls().y.toLowerCase(); //// [f.js] define("a", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -54,7 +54,7 @@ define("a", ["require", "exports"], function (require, exports) { }); define("b", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -65,13 +65,13 @@ define("b", ["require", "exports"], function (require, exports) { /// define("d", ["require", "exports", "a"], function (require, exports, a_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); a_1.A.prototype.getB = function () { return undefined; }; a_1.A.prototype.getCls = function () { return undefined; }; }); define("main", ["require", "exports", "d"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = a.getB().x.toFixed(); var c = a.getCls().y.toLowerCase(); diff --git a/tests/baselines/reference/moduleAugmentationsImports2.js b/tests/baselines/reference/moduleAugmentationsImports2.js index 5955cd10e59ed..ea09de6312fa1 100644 --- a/tests/baselines/reference/moduleAugmentationsImports2.js +++ b/tests/baselines/reference/moduleAugmentationsImports2.js @@ -49,7 +49,7 @@ let c = a.getCls().y.toLowerCase(); //// [f.js] define("a", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -59,7 +59,7 @@ define("a", ["require", "exports"], function (require, exports) { }); define("b", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -70,17 +70,17 @@ define("b", ["require", "exports"], function (require, exports) { /// define("d", ["require", "exports", "a"], function (require, exports, a_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); a_1.A.prototype.getB = function () { return undefined; }; }); define("e", ["require", "exports", "a"], function (require, exports, a_2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); a_2.A.prototype.getCls = function () { return undefined; }; }); define("main", ["require", "exports", "d", "e"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = a.getB().x.toFixed(); var c = a.getCls().y.toLowerCase(); diff --git a/tests/baselines/reference/moduleAugmentationsImports3.js b/tests/baselines/reference/moduleAugmentationsImports3.js index 20ff1b25271aa..4bb17dfdcbab9 100644 --- a/tests/baselines/reference/moduleAugmentationsImports3.js +++ b/tests/baselines/reference/moduleAugmentationsImports3.js @@ -48,7 +48,7 @@ let c = a.getCls().y.toLowerCase(); //// [f.js] define("a", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -58,7 +58,7 @@ define("a", ["require", "exports"], function (require, exports) { }); define("b", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -68,12 +68,12 @@ define("b", ["require", "exports"], function (require, exports) { }); define("e", ["require", "exports", "a"], function (require, exports, a_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); a_1.A.prototype.getCls = function () { return undefined; }; }); define("main", ["require", "exports", "D", "e"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = a.getB().x.toFixed(); var c = a.getCls().y.toLowerCase(); diff --git a/tests/baselines/reference/moduleAugmentationsImports4.js b/tests/baselines/reference/moduleAugmentationsImports4.js index ee66546983d9b..b0de18a4675d1 100644 --- a/tests/baselines/reference/moduleAugmentationsImports4.js +++ b/tests/baselines/reference/moduleAugmentationsImports4.js @@ -49,7 +49,7 @@ let c = a.getCls().y.toLowerCase(); //// [f.js] define("a", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -59,7 +59,7 @@ define("a", ["require", "exports"], function (require, exports) { }); define("b", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -69,7 +69,7 @@ define("b", ["require", "exports"], function (require, exports) { }); define("main", ["require", "exports", "D", "E"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a; var b = a.getB().x.toFixed(); var c = a.getCls().y.toLowerCase(); diff --git a/tests/baselines/reference/moduleCodeGenTest5.js b/tests/baselines/reference/moduleCodeGenTest5.js index ee6fd2ab3176b..cc8fbefcb5a27 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.js +++ b/tests/baselines/reference/moduleCodeGenTest5.js @@ -23,7 +23,7 @@ var v = E2.B; //// [moduleCodeGenTest5.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 0; var y = 0; function f1() { } diff --git a/tests/baselines/reference/moduleCodegenTest4.js b/tests/baselines/reference/moduleCodegenTest4.js index f877ad74bc36a..f2f26d24568be 100644 --- a/tests/baselines/reference/moduleCodegenTest4.js +++ b/tests/baselines/reference/moduleCodegenTest4.js @@ -6,7 +6,7 @@ void 0; //// [moduleCodegenTest4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Baz; (function (Baz) { Baz.x = "hello"; diff --git a/tests/baselines/reference/moduleDuplicateIdentifiers.js b/tests/baselines/reference/moduleDuplicateIdentifiers.js index a2a099fca1d56..6ba3c44e87679 100644 --- a/tests/baselines/reference/moduleDuplicateIdentifiers.js +++ b/tests/baselines/reference/moduleDuplicateIdentifiers.js @@ -42,7 +42,7 @@ export enum Utensils { // Shouldn't error //// [moduleDuplicateIdentifiers.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.Foo = 2; exports.Foo = 42; // Should error var FooBar; diff --git a/tests/baselines/reference/moduleExports1.js b/tests/baselines/reference/moduleExports1.js index 66c746c5f5189..cdce97f43c962 100644 --- a/tests/baselines/reference/moduleExports1.js +++ b/tests/baselines/reference/moduleExports1.js @@ -16,7 +16,7 @@ if (!module.exports) module.exports = ""; //// [moduleExports1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var TypeScript; (function (TypeScript) { var Strasse; diff --git a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js index 2ed22cfa4f0e3..3f881edfefa87 100644 --- a/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js +++ b/tests/baselines/reference/moduleImportedForTypeArgumentPosition.js @@ -14,7 +14,7 @@ class Test1 extends C1 { //// [moduleImportedForTypeArgumentPosition_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [moduleImportedForTypeArgumentPosition_1.js] var __extends = (this && this.__extends) || (function () { @@ -29,7 +29,7 @@ var __extends = (this && this.__extends) || (function () { })(); define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/moduleInTypePosition1.js b/tests/baselines/reference/moduleInTypePosition1.js index 7408db5c29111..66759cee50777 100644 --- a/tests/baselines/reference/moduleInTypePosition1.js +++ b/tests/baselines/reference/moduleInTypePosition1.js @@ -13,7 +13,7 @@ var x = (w1: WinJS) => { }; //// [moduleInTypePosition1_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Promise = (function () { function Promise() { } @@ -22,5 +22,5 @@ var Promise = (function () { exports.Promise = Promise; //// [moduleInTypePosition1_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = function (w1) { }; diff --git a/tests/baselines/reference/moduleMergeConstructor.js b/tests/baselines/reference/moduleMergeConstructor.js index 5ecaf8365d880..9ae429ec40dab 100644 --- a/tests/baselines/reference/moduleMergeConstructor.js +++ b/tests/baselines/reference/moduleMergeConstructor.js @@ -29,7 +29,7 @@ class Test { //// [index.js] define(["require", "exports", "foo"], function (require, exports, foo) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Test = (function () { function Test() { this.bar = new foo.Foo(); diff --git a/tests/baselines/reference/moduleNoneErrors.js b/tests/baselines/reference/moduleNoneErrors.js index 7be89f236be00..93a2521a2878f 100644 --- a/tests/baselines/reference/moduleNoneErrors.js +++ b/tests/baselines/reference/moduleNoneErrors.js @@ -6,7 +6,7 @@ export class Foo { //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/modulePrologueAMD.js b/tests/baselines/reference/modulePrologueAMD.js index b38e5d95f2c53..20181c24dc114 100644 --- a/tests/baselines/reference/modulePrologueAMD.js +++ b/tests/baselines/reference/modulePrologueAMD.js @@ -6,7 +6,7 @@ export class Foo {} //// [modulePrologueAMD.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/modulePrologueCommonjs.js b/tests/baselines/reference/modulePrologueCommonjs.js index 4f465a2ae2f19..344010e5fa851 100644 --- a/tests/baselines/reference/modulePrologueCommonjs.js +++ b/tests/baselines/reference/modulePrologueCommonjs.js @@ -5,7 +5,7 @@ export class Foo {} //// [modulePrologueCommonjs.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/modulePrologueUmd.js b/tests/baselines/reference/modulePrologueUmd.js index c9b8c331bcf14..44815d296de0a 100644 --- a/tests/baselines/reference/modulePrologueUmd.js +++ b/tests/baselines/reference/modulePrologueUmd.js @@ -14,7 +14,7 @@ export class Foo {} } })(function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/moduleResolutionNoResolve.js b/tests/baselines/reference/moduleResolutionNoResolve.js index d1b5315903cda..0e6b206a824df 100644 --- a/tests/baselines/reference/moduleResolutionNoResolve.js +++ b/tests/baselines/reference/moduleResolutionNoResolve.js @@ -9,8 +9,8 @@ export var c = ''; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.c = ''; diff --git a/tests/baselines/reference/moduleResolutionNoTs.js b/tests/baselines/reference/moduleResolutionNoTs.js index 33f692396fac6..5d2cb57e849a8 100644 --- a/tests/baselines/reference/moduleResolutionNoTs.js +++ b/tests/baselines/reference/moduleResolutionNoTs.js @@ -23,12 +23,12 @@ import z2 from "./z"; //// [x.js] "use strict"; -exports.__esModule = true; -exports["default"] = 0; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = 0; //// [y.jsx] "use strict"; -exports.__esModule = true; -exports["default"] = 0; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = 0; //// [user.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions.js b/tests/baselines/reference/moduleResolutionWithExtensions.js index c1e0310e99523..38592660c39e9 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions.js @@ -26,16 +26,16 @@ import j from "./jquery.js" //// [a.js] "use strict"; -exports.__esModule = true; -exports["default"] = 0; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = 0; // No extension: '.ts' added //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // '.js' extension: stripped and replaced with '.ts' //// [d.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [jquery_user_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js index eb6057f969303..8069f52d83d6d 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js @@ -14,4 +14,4 @@ import js from "./js"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js index a11d43d56dfe3..dd21c612c58f5 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js @@ -10,4 +10,4 @@ import jsx from "./jsx"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js index ca0fa6ca402c9..92b4fe18d1d90 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js @@ -10,4 +10,4 @@ import jsx from "./jsx"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js index b02d23302ae76..0fa2b26ead849 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js @@ -11,8 +11,8 @@ import b from "./b"; //// [index.js] "use strict"; -exports.__esModule = true; -exports["default"] = 0; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = 0; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js index 7d67bde6509b9..32f60532acc82 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected.js @@ -14,5 +14,5 @@ import "normalize.css"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("normalize.css"); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js index 0a04d8a9077d6..a9cb92ee08bdc 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.js @@ -14,5 +14,5 @@ import "foo"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require("foo"); diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js index 3563f7db251ad..fe554a0aebdb1 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js @@ -16,4 +16,4 @@ import { x } from "js"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.js b/tests/baselines/reference/moduleResolutionWithSymlinks.js index b483f356252be..1504ebae68574 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.js @@ -43,7 +43,7 @@ tsc app.ts # Should write to library-a/index.js, library-b/index.js, and app.js "use strict"; // When symlinked files are in node_modules, they are resolved with realpath; // so a linked file does not create a duplicate SourceFile of the real one. -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var MyClass = (function () { function MyClass() { } @@ -52,12 +52,12 @@ var MyClass = (function () { exports.MyClass = MyClass; //// [/src/library-b/index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var library_a_1 = require("library-a"); exports.MyClass2 = library_a_1.MyClass; //// [/src/app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; var y; x = y; diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js b/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js index bf51b7e3bca3e..f23f8dc70664a 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_notInNodeModules.js @@ -18,18 +18,18 @@ x + x2; // When symlinked files are not in node_modules, realpath is not used. // A symlink file acts like the real thing. So, 2 symlinks act like 2 different files. // See GH#10364. -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 0; //// [/src/bin/shared2/abc.js] "use strict"; // When symlinked files are not in node_modules, realpath is not used. // A symlink file acts like the real thing. So, 2 symlinks act like 2 different files. // See GH#10364. -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 0; //// [/src/bin/app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var abc_1 = require("./shared/abc"); var abc_2 = require("./shared2/abc"); abc_1.x + abc_2.x; diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js index 0049ad48f91eb..42209d7ebccb1 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.js @@ -22,7 +22,7 @@ y = x; //// [/src/bin/library-a/index.js] "use strict"; // Same as moduleResolutionWithSymlinks.ts, but with outDir -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var MyClass = (function () { function MyClass() { } @@ -31,12 +31,12 @@ var MyClass = (function () { exports.MyClass = MyClass; //// [/src/bin/library-b/index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var library_a_1 = require("library-a"); exports.MyClass2 = library_a_1.MyClass; //// [/src/bin/app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; var y; x = y; diff --git a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js index c4d451ba9f9d3..b8500ce35592e 100644 --- a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js +++ b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings1.js @@ -12,20 +12,20 @@ export var foo = 42; //// [c.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = 42; //// [b.js] "use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); __export(require("./c")); //// [a.js] "use strict"; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); __export(require("./b")); __export(require("./c")); diff --git a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js index d1f6dc7abc7cf..dbc8010a951e1 100644 --- a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js +++ b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js @@ -15,7 +15,7 @@ export enum Animals { //// [c.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Animals; (function (Animals) { Animals[Animals["Cat"] = 0] = "Cat"; @@ -24,7 +24,7 @@ var Animals; ; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var c_1 = require("./c"); exports.Animals = c_1.Animals; //// [a.js] @@ -32,6 +32,6 @@ exports.Animals = c_1.Animals; function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); __export(require("./b")); __export(require("./c")); diff --git a/tests/baselines/reference/moduleScoping.js b/tests/baselines/reference/moduleScoping.js index 601d7e41fcde0..131dcbb9d29a8 100644 --- a/tests/baselines/reference/moduleScoping.js +++ b/tests/baselines/reference/moduleScoping.js @@ -29,12 +29,12 @@ var v2 = 42; // Global scope var v4 = function () { return 5; }; //// [file3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.v3 = true; var v2 = [1, 2, 3]; // Module scope. Should not appear in global scope //// [file4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file3 = require("./file3"); var t1 = v1; var t2 = v2; diff --git a/tests/baselines/reference/multiImportExport.js b/tests/baselines/reference/multiImportExport.js index 07e353cb301b2..a7edfcf1789d3 100644 --- a/tests/baselines/reference/multiImportExport.js +++ b/tests/baselines/reference/multiImportExport.js @@ -44,11 +44,11 @@ var Math = { module.exports = Math; //// [Drawing.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.Math = require("./Math/Math"); //// [consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Drawing = require("./Drawing"); var addr = new Drawing.Math.Adder(); diff --git a/tests/baselines/reference/multipleExportDefault1.js b/tests/baselines/reference/multipleExportDefault1.js index 8375c2f9e6f3e..1c0b9a116d459 100644 --- a/tests/baselines/reference/multipleExportDefault1.js +++ b/tests/baselines/reference/multipleExportDefault1.js @@ -10,10 +10,10 @@ export default { //// [multipleExportDefault1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function Foo() { } -exports["default"] = Foo; -exports["default"] = { +exports.default = Foo; +exports.default = { uhoh: "another default" }; diff --git a/tests/baselines/reference/multipleExportDefault2.js b/tests/baselines/reference/multipleExportDefault2.js index 0c06385f9af46..591ec52e8d3f0 100644 --- a/tests/baselines/reference/multipleExportDefault2.js +++ b/tests/baselines/reference/multipleExportDefault2.js @@ -9,9 +9,9 @@ export default function Foo() { } //// [multipleExportDefault2.js] "use strict"; -exports.__esModule = true; -exports["default"] = { +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { uhoh: "another default" }; function Foo() { } -exports["default"] = Foo; +exports.default = Foo; diff --git a/tests/baselines/reference/multipleExportDefault3.js b/tests/baselines/reference/multipleExportDefault3.js index 1091af16301ec..0ee80afa0fd00 100644 --- a/tests/baselines/reference/multipleExportDefault3.js +++ b/tests/baselines/reference/multipleExportDefault3.js @@ -9,8 +9,8 @@ export default class C { } //// [multipleExportDefault3.js] "use strict"; -exports.__esModule = true; -exports["default"] = { +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { uhoh: "another default" }; var C = (function () { @@ -18,4 +18,4 @@ var C = (function () { } return C; }()); -exports["default"] = C; +exports.default = C; diff --git a/tests/baselines/reference/multipleExportDefault4.js b/tests/baselines/reference/multipleExportDefault4.js index b3e0ef3e87069..9f20ca303e810 100644 --- a/tests/baselines/reference/multipleExportDefault4.js +++ b/tests/baselines/reference/multipleExportDefault4.js @@ -7,13 +7,13 @@ export default { //// [multipleExportDefault4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } return C; }()); -exports["default"] = C; -exports["default"] = { +exports.default = C; +exports.default = { uhoh: "another default" }; diff --git a/tests/baselines/reference/multipleExportDefault5.js b/tests/baselines/reference/multipleExportDefault5.js index a5032e45244c8..715943c128601 100644 --- a/tests/baselines/reference/multipleExportDefault5.js +++ b/tests/baselines/reference/multipleExportDefault5.js @@ -4,12 +4,12 @@ export default class C {} //// [multipleExportDefault5.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function bar() { } -exports["default"] = bar; +exports.default = bar; var C = (function () { function C() { } return C; }()); -exports["default"] = C; +exports.default = C; diff --git a/tests/baselines/reference/multipleExportDefault6.js b/tests/baselines/reference/multipleExportDefault6.js index aa372e4d4105c..9fcd61a6ef394 100644 --- a/tests/baselines/reference/multipleExportDefault6.js +++ b/tests/baselines/reference/multipleExportDefault6.js @@ -9,10 +9,10 @@ export default { //// [multipleExportDefault6.js] "use strict"; -exports.__esModule = true; -exports["default"] = { +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = { lol: 1 }; -exports["default"] = { +exports.default = { lol: 2 }; diff --git a/tests/baselines/reference/multipleExports.js b/tests/baselines/reference/multipleExports.js index 284b24ef4f9e0..fea958d853d2e 100644 --- a/tests/baselines/reference/multipleExports.js +++ b/tests/baselines/reference/multipleExports.js @@ -13,7 +13,7 @@ export module M { //// [multipleExports.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var M; (function (M) { M.v = 0; diff --git a/tests/baselines/reference/nameDelimitedBySlashes.js b/tests/baselines/reference/nameDelimitedBySlashes.js index 149b6a0d59f8d..fcf9a02e6e454 100644 --- a/tests/baselines/reference/nameDelimitedBySlashes.js +++ b/tests/baselines/reference/nameDelimitedBySlashes.js @@ -10,10 +10,10 @@ var x = foo.foo + 42; //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = 42; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./test/foo_0"); var x = foo.foo + 42; diff --git a/tests/baselines/reference/nameWithFileExtension.js b/tests/baselines/reference/nameWithFileExtension.js index 3c1cf8dce663d..48a9bff208d1b 100644 --- a/tests/baselines/reference/nameWithFileExtension.js +++ b/tests/baselines/reference/nameWithFileExtension.js @@ -10,10 +10,10 @@ var x = foo.foo + 42; //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = 42; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./foo_0.js"); var x = foo.foo + 42; diff --git a/tests/baselines/reference/nameWithRelativePaths.js b/tests/baselines/reference/nameWithRelativePaths.js index d070638417bdd..d89189a26f651 100644 --- a/tests/baselines/reference/nameWithRelativePaths.js +++ b/tests/baselines/reference/nameWithRelativePaths.js @@ -25,25 +25,25 @@ if(foo2.M2.x){ //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = 42; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function f() { return 42; } exports.f = f; //// [foo_2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var M2; (function (M2) { M2.x = true; })(M2 = exports.M2 || (exports.M2 = {})); //// [foo_3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo0 = require("../foo_0"); var foo1 = require("./test/foo_1"); var foo2 = require("./.././test/foo_2"); diff --git a/tests/baselines/reference/narrowingConstrainedTypeParameter.js b/tests/baselines/reference/narrowingConstrainedTypeParameter.js index a29468388516a..8293bd8d71ca3 100644 --- a/tests/baselines/reference/narrowingConstrainedTypeParameter.js +++ b/tests/baselines/reference/narrowingConstrainedTypeParameter.js @@ -19,7 +19,7 @@ export function speak(pet: TPet, voice: (pet: TPet) => string) //// [narrowingConstrainedTypeParameter.js] "use strict"; // Repro from #10811 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function isPet(pet) { return typeof pet.name === "string"; } diff --git a/tests/baselines/reference/nestedClassDeclaration.js b/tests/baselines/reference/nestedClassDeclaration.js index cc300ec75a31c..04e2f6348efb6 100644 --- a/tests/baselines/reference/nestedClassDeclaration.js +++ b/tests/baselines/reference/nestedClassDeclaration.js @@ -38,5 +38,5 @@ function foo() { }()); } var x = { - "class": C4 + class: C4 }, _a = void 0; diff --git a/tests/baselines/reference/newOperator.errors.txt b/tests/baselines/reference/newOperator.errors.txt index fc6f22d9eacb4..0daee4f7a9396 100644 --- a/tests/baselines/reference/newOperator.errors.txt +++ b/tests/baselines/reference/newOperator.errors.txt @@ -8,11 +8,10 @@ tests/cases/compiler/newOperator.ts(21,1): error TS2304: Cannot find name 'strin tests/cases/compiler/newOperator.ts(22,1): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/newOperator.ts(28,13): error TS2304: Cannot find name 'q'. tests/cases/compiler/newOperator.ts(31,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/newOperator.ts(44,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/newOperator.ts(45,23): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -==== tests/cases/compiler/newOperator.ts (12 errors) ==== +==== tests/cases/compiler/newOperator.ts (11 errors) ==== interface ifc { } // Attempting to 'new' an interface yields poor error var i = new ifc(); @@ -78,8 +77,6 @@ tests/cases/compiler/newOperator.ts(45,23): error TS1150: 'new T[]' cannot be us class S { public get xs(): M.T[] { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return new M.T[]; ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. diff --git a/tests/baselines/reference/newWithSpread.errors.txt b/tests/baselines/reference/newWithSpread.errors.txt deleted file mode 100644 index e91a6757ead3e..0000000000000 --- a/tests/baselines/reference/newWithSpread.errors.txt +++ /dev/null @@ -1,177 +0,0 @@ -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(36,13): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(37,13): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(40,8): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(41,13): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(45,13): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(46,13): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(50,15): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(51,15): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(55,17): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(56,17): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(60,18): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(61,18): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(65,22): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(66,22): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(70,13): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(71,13): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(75,20): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(76,20): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(80,22): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(81,22): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(85,23): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(86,23): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(90,27): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(91,27): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(95,23): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/functionCalls/newWithSpread.ts(96,23): error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/expressions/functionCalls/newWithSpread.ts (26 errors) ==== - function f(x: number, y: number, ...z: string[]) { - } - - function f2(...x: string[]) { - } - - interface A { - f: { - new (x: number, y: number, ...z: string[]); - } - } - - class B { - constructor(x: number, y: number, ...z: string[]) {} - } - - interface C { - "a-b": typeof B; - } - - interface D { - 1: typeof B; - } - - var a: string[]; - var b: A; - var c: C; - var d: A[]; - var e: { [key: string]: A }; - var g: C[]; - var h: { [key: string]: C }; - var i: C[][]; - - // Basic expression - new f(1, 2, "string"); - new f(1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new f(1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Multiple spreads arguments - new f2(...a, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new f(1 ,2, ...a, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Call expression - new f(1, 2, "string")(); - new f(1, 2, ...a)(); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new f(1, 2, ...a, "string")(); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Property access expression - new b.f(1, 2, "string"); - new b.f(1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new b.f(1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Parenthesised expression - new (b.f)(1, 2, "string"); - new (b.f)(1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new (b.f)(1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Element access expression - new d[1].f(1, 2, "string"); - new d[1].f(1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new d[1].f(1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Element access expression with a punctuated key - new e["a-b"].f(1, 2, "string"); - new e["a-b"].f(1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new e["a-b"].f(1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Basic expression - new B(1, 2, "string"); - new B(1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new B(1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Property access expression - new c["a-b"](1, 2, "string"); - new c["a-b"](1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new c["a-b"](1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Parenthesised expression - new (c["a-b"])(1, 2, "string"); - new (c["a-b"])(1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new (c["a-b"])(1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Element access expression - new g[1]["a-b"](1, 2, "string"); - new g[1]["a-b"](1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new g[1]["a-b"](1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Element access expression with a punctuated key - new h["a-b"]["a-b"](1, 2, "string"); - new h["a-b"]["a-b"](1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new h["a-b"]["a-b"](1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - - // Element access expression with a number - new i["a-b"][1](1, 2, "string"); - new i["a-b"][1](1, 2, ...a); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. - new i["a-b"][1](1, 2, ...a, "string"); - ~~~~ -!!! error TS2472: Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/newWithSpread.symbols b/tests/baselines/reference/newWithSpread.symbols new file mode 100644 index 0000000000000..564d49912c2a6 --- /dev/null +++ b/tests/baselines/reference/newWithSpread.symbols @@ -0,0 +1,273 @@ +=== tests/cases/conformance/expressions/functionCalls/newWithSpread.ts === +function f(x: number, y: number, ...z: string[]) { +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) +>x : Symbol(x, Decl(newWithSpread.ts, 0, 11)) +>y : Symbol(y, Decl(newWithSpread.ts, 0, 21)) +>z : Symbol(z, Decl(newWithSpread.ts, 0, 32)) +} + +function f2(...x: string[]) { +>f2 : Symbol(f2, Decl(newWithSpread.ts, 1, 1)) +>x : Symbol(x, Decl(newWithSpread.ts, 3, 12)) +} + +interface A { +>A : Symbol(A, Decl(newWithSpread.ts, 4, 1)) + + f: { +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) + + new (x: number, y: number, ...z: string[]); +>x : Symbol(x, Decl(newWithSpread.ts, 8, 13)) +>y : Symbol(y, Decl(newWithSpread.ts, 8, 23)) +>z : Symbol(z, Decl(newWithSpread.ts, 8, 34)) + } +} + +class B { +>B : Symbol(B, Decl(newWithSpread.ts, 10, 1)) + + constructor(x: number, y: number, ...z: string[]) {} +>x : Symbol(x, Decl(newWithSpread.ts, 13, 16)) +>y : Symbol(y, Decl(newWithSpread.ts, 13, 26)) +>z : Symbol(z, Decl(newWithSpread.ts, 13, 37)) +} + +interface C { +>C : Symbol(C, Decl(newWithSpread.ts, 14, 1)) + + "a-b": typeof B; +>B : Symbol(B, Decl(newWithSpread.ts, 10, 1)) +} + +interface D { +>D : Symbol(D, Decl(newWithSpread.ts, 18, 1)) + + 1: typeof B; +>B : Symbol(B, Decl(newWithSpread.ts, 10, 1)) +} + +var a: string[]; +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +var b: A; +>b : Symbol(b, Decl(newWithSpread.ts, 25, 3)) +>A : Symbol(A, Decl(newWithSpread.ts, 4, 1)) + +var c: C; +>c : Symbol(c, Decl(newWithSpread.ts, 26, 3)) +>C : Symbol(C, Decl(newWithSpread.ts, 14, 1)) + +var d: A[]; +>d : Symbol(d, Decl(newWithSpread.ts, 27, 3)) +>A : Symbol(A, Decl(newWithSpread.ts, 4, 1)) + +var e: { [key: string]: A }; +>e : Symbol(e, Decl(newWithSpread.ts, 28, 3)) +>key : Symbol(key, Decl(newWithSpread.ts, 28, 10)) +>A : Symbol(A, Decl(newWithSpread.ts, 4, 1)) + +var g: C[]; +>g : Symbol(g, Decl(newWithSpread.ts, 29, 3)) +>C : Symbol(C, Decl(newWithSpread.ts, 14, 1)) + +var h: { [key: string]: C }; +>h : Symbol(h, Decl(newWithSpread.ts, 30, 3)) +>key : Symbol(key, Decl(newWithSpread.ts, 30, 10)) +>C : Symbol(C, Decl(newWithSpread.ts, 14, 1)) + +var i: C[][]; +>i : Symbol(i, Decl(newWithSpread.ts, 31, 3)) +>C : Symbol(C, Decl(newWithSpread.ts, 14, 1)) + +// Basic expression +new f(1, 2, "string"); +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) + +new f(1, 2, ...a); +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new f(1, 2, ...a, "string"); +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Multiple spreads arguments +new f2(...a, ...a); +>f2 : Symbol(f2, Decl(newWithSpread.ts, 1, 1)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new f(1 ,2, ...a, ...a); +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Call expression +new f(1, 2, "string")(); +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) + +new f(1, 2, ...a)(); +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new f(1, 2, ...a, "string")(); +>f : Symbol(f, Decl(newWithSpread.ts, 0, 0)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Property access expression +new b.f(1, 2, "string"); +>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>b : Symbol(b, Decl(newWithSpread.ts, 25, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) + +new b.f(1, 2, ...a); +>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>b : Symbol(b, Decl(newWithSpread.ts, 25, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new b.f(1, 2, ...a, "string"); +>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>b : Symbol(b, Decl(newWithSpread.ts, 25, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Parenthesised expression +new (b.f)(1, 2, "string"); +>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>b : Symbol(b, Decl(newWithSpread.ts, 25, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) + +new (b.f)(1, 2, ...a); +>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>b : Symbol(b, Decl(newWithSpread.ts, 25, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new (b.f)(1, 2, ...a, "string"); +>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>b : Symbol(b, Decl(newWithSpread.ts, 25, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Element access expression +new d[1].f(1, 2, "string"); +>d[1].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>d : Symbol(d, Decl(newWithSpread.ts, 27, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) + +new d[1].f(1, 2, ...a); +>d[1].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>d : Symbol(d, Decl(newWithSpread.ts, 27, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new d[1].f(1, 2, ...a, "string"); +>d[1].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>d : Symbol(d, Decl(newWithSpread.ts, 27, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Element access expression with a punctuated key +new e["a-b"].f(1, 2, "string"); +>e["a-b"].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>e : Symbol(e, Decl(newWithSpread.ts, 28, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) + +new e["a-b"].f(1, 2, ...a); +>e["a-b"].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>e : Symbol(e, Decl(newWithSpread.ts, 28, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new e["a-b"].f(1, 2, ...a, "string"); +>e["a-b"].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>e : Symbol(e, Decl(newWithSpread.ts, 28, 3)) +>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Basic expression +new B(1, 2, "string"); +>B : Symbol(B, Decl(newWithSpread.ts, 10, 1)) + +new B(1, 2, ...a); +>B : Symbol(B, Decl(newWithSpread.ts, 10, 1)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new B(1, 2, ...a, "string"); +>B : Symbol(B, Decl(newWithSpread.ts, 10, 1)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Property access expression +new c["a-b"](1, 2, "string"); +>c : Symbol(c, Decl(newWithSpread.ts, 26, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) + +new c["a-b"](1, 2, ...a); +>c : Symbol(c, Decl(newWithSpread.ts, 26, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new c["a-b"](1, 2, ...a, "string"); +>c : Symbol(c, Decl(newWithSpread.ts, 26, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Parenthesised expression +new (c["a-b"])(1, 2, "string"); +>c : Symbol(c, Decl(newWithSpread.ts, 26, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) + +new (c["a-b"])(1, 2, ...a); +>c : Symbol(c, Decl(newWithSpread.ts, 26, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new (c["a-b"])(1, 2, ...a, "string"); +>c : Symbol(c, Decl(newWithSpread.ts, 26, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Element access expression +new g[1]["a-b"](1, 2, "string"); +>g : Symbol(g, Decl(newWithSpread.ts, 29, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) + +new g[1]["a-b"](1, 2, ...a); +>g : Symbol(g, Decl(newWithSpread.ts, 29, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new g[1]["a-b"](1, 2, ...a, "string"); +>g : Symbol(g, Decl(newWithSpread.ts, 29, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Element access expression with a punctuated key +new h["a-b"]["a-b"](1, 2, "string"); +>h : Symbol(h, Decl(newWithSpread.ts, 30, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) + +new h["a-b"]["a-b"](1, 2, ...a); +>h : Symbol(h, Decl(newWithSpread.ts, 30, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new h["a-b"]["a-b"](1, 2, ...a, "string"); +>h : Symbol(h, Decl(newWithSpread.ts, 30, 3)) +>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +// Element access expression with a number +new i["a-b"][1](1, 2, "string"); +>i : Symbol(i, Decl(newWithSpread.ts, 31, 3)) + +new i["a-b"][1](1, 2, ...a); +>i : Symbol(i, Decl(newWithSpread.ts, 31, 3)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + +new i["a-b"][1](1, 2, ...a, "string"); +>i : Symbol(i, Decl(newWithSpread.ts, 31, 3)) +>a : Symbol(a, Decl(newWithSpread.ts, 24, 3)) + diff --git a/tests/baselines/reference/newWithSpread.types b/tests/baselines/reference/newWithSpread.types new file mode 100644 index 0000000000000..67cc63e6281b1 --- /dev/null +++ b/tests/baselines/reference/newWithSpread.types @@ -0,0 +1,494 @@ +=== tests/cases/conformance/expressions/functionCalls/newWithSpread.ts === +function f(x: number, y: number, ...z: string[]) { +>f : (x: number, y: number, ...z: string[]) => void +>x : number +>y : number +>z : string[] +} + +function f2(...x: string[]) { +>f2 : (...x: string[]) => void +>x : string[] +} + +interface A { +>A : A + + f: { +>f : new (x: number, y: number, ...z: string[]) => any + + new (x: number, y: number, ...z: string[]); +>x : number +>y : number +>z : string[] + } +} + +class B { +>B : B + + constructor(x: number, y: number, ...z: string[]) {} +>x : number +>y : number +>z : string[] +} + +interface C { +>C : C + + "a-b": typeof B; +>B : typeof B +} + +interface D { +>D : D + + 1: typeof B; +>B : typeof B +} + +var a: string[]; +>a : string[] + +var b: A; +>b : A +>A : A + +var c: C; +>c : C +>C : C + +var d: A[]; +>d : A[] +>A : A + +var e: { [key: string]: A }; +>e : { [key: string]: A; } +>key : string +>A : A + +var g: C[]; +>g : C[] +>C : C + +var h: { [key: string]: C }; +>h : { [key: string]: C; } +>key : string +>C : C + +var i: C[][]; +>i : C[][] +>C : C + +// Basic expression +new f(1, 2, "string"); +>new f(1, 2, "string") : any +>f : (x: number, y: number, ...z: string[]) => void +>1 : 1 +>2 : 2 +>"string" : "string" + +new f(1, 2, ...a); +>new f(1, 2, ...a) : any +>f : (x: number, y: number, ...z: string[]) => void +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new f(1, 2, ...a, "string"); +>new f(1, 2, ...a, "string") : any +>f : (x: number, y: number, ...z: string[]) => void +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Multiple spreads arguments +new f2(...a, ...a); +>new f2(...a, ...a) : any +>f2 : (...x: string[]) => void +>...a : string +>a : string[] +>...a : string +>a : string[] + +new f(1 ,2, ...a, ...a); +>new f(1 ,2, ...a, ...a) : any +>f : (x: number, y: number, ...z: string[]) => void +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>...a : string +>a : string[] + +// Call expression +new f(1, 2, "string")(); +>new f(1, 2, "string")() : any +>new f(1, 2, "string") : any +>f : (x: number, y: number, ...z: string[]) => void +>1 : 1 +>2 : 2 +>"string" : "string" + +new f(1, 2, ...a)(); +>new f(1, 2, ...a)() : any +>new f(1, 2, ...a) : any +>f : (x: number, y: number, ...z: string[]) => void +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new f(1, 2, ...a, "string")(); +>new f(1, 2, ...a, "string")() : any +>new f(1, 2, ...a, "string") : any +>f : (x: number, y: number, ...z: string[]) => void +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Property access expression +new b.f(1, 2, "string"); +>new b.f(1, 2, "string") : any +>b.f : new (x: number, y: number, ...z: string[]) => any +>b : A +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>"string" : "string" + +new b.f(1, 2, ...a); +>new b.f(1, 2, ...a) : any +>b.f : new (x: number, y: number, ...z: string[]) => any +>b : A +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new b.f(1, 2, ...a, "string"); +>new b.f(1, 2, ...a, "string") : any +>b.f : new (x: number, y: number, ...z: string[]) => any +>b : A +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Parenthesised expression +new (b.f)(1, 2, "string"); +>new (b.f)(1, 2, "string") : any +>(b.f) : new (x: number, y: number, ...z: string[]) => any +>b.f : new (x: number, y: number, ...z: string[]) => any +>b : A +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>"string" : "string" + +new (b.f)(1, 2, ...a); +>new (b.f)(1, 2, ...a) : any +>(b.f) : new (x: number, y: number, ...z: string[]) => any +>b.f : new (x: number, y: number, ...z: string[]) => any +>b : A +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new (b.f)(1, 2, ...a, "string"); +>new (b.f)(1, 2, ...a, "string") : any +>(b.f) : new (x: number, y: number, ...z: string[]) => any +>b.f : new (x: number, y: number, ...z: string[]) => any +>b : A +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Element access expression +new d[1].f(1, 2, "string"); +>new d[1].f(1, 2, "string") : any +>d[1].f : new (x: number, y: number, ...z: string[]) => any +>d[1] : A +>d : A[] +>1 : 1 +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>"string" : "string" + +new d[1].f(1, 2, ...a); +>new d[1].f(1, 2, ...a) : any +>d[1].f : new (x: number, y: number, ...z: string[]) => any +>d[1] : A +>d : A[] +>1 : 1 +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new d[1].f(1, 2, ...a, "string"); +>new d[1].f(1, 2, ...a, "string") : any +>d[1].f : new (x: number, y: number, ...z: string[]) => any +>d[1] : A +>d : A[] +>1 : 1 +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Element access expression with a punctuated key +new e["a-b"].f(1, 2, "string"); +>new e["a-b"].f(1, 2, "string") : any +>e["a-b"].f : new (x: number, y: number, ...z: string[]) => any +>e["a-b"] : A +>e : { [key: string]: A; } +>"a-b" : "a-b" +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>"string" : "string" + +new e["a-b"].f(1, 2, ...a); +>new e["a-b"].f(1, 2, ...a) : any +>e["a-b"].f : new (x: number, y: number, ...z: string[]) => any +>e["a-b"] : A +>e : { [key: string]: A; } +>"a-b" : "a-b" +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new e["a-b"].f(1, 2, ...a, "string"); +>new e["a-b"].f(1, 2, ...a, "string") : any +>e["a-b"].f : new (x: number, y: number, ...z: string[]) => any +>e["a-b"] : A +>e : { [key: string]: A; } +>"a-b" : "a-b" +>f : new (x: number, y: number, ...z: string[]) => any +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Basic expression +new B(1, 2, "string"); +>new B(1, 2, "string") : B +>B : typeof B +>1 : 1 +>2 : 2 +>"string" : "string" + +new B(1, 2, ...a); +>new B(1, 2, ...a) : B +>B : typeof B +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new B(1, 2, ...a, "string"); +>new B(1, 2, ...a, "string") : B +>B : typeof B +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Property access expression +new c["a-b"](1, 2, "string"); +>new c["a-b"](1, 2, "string") : B +>c["a-b"] : typeof B +>c : C +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>"string" : "string" + +new c["a-b"](1, 2, ...a); +>new c["a-b"](1, 2, ...a) : B +>c["a-b"] : typeof B +>c : C +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new c["a-b"](1, 2, ...a, "string"); +>new c["a-b"](1, 2, ...a, "string") : B +>c["a-b"] : typeof B +>c : C +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Parenthesised expression +new (c["a-b"])(1, 2, "string"); +>new (c["a-b"])(1, 2, "string") : B +>(c["a-b"]) : typeof B +>c["a-b"] : typeof B +>c : C +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>"string" : "string" + +new (c["a-b"])(1, 2, ...a); +>new (c["a-b"])(1, 2, ...a) : B +>(c["a-b"]) : typeof B +>c["a-b"] : typeof B +>c : C +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new (c["a-b"])(1, 2, ...a, "string"); +>new (c["a-b"])(1, 2, ...a, "string") : B +>(c["a-b"]) : typeof B +>c["a-b"] : typeof B +>c : C +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Element access expression +new g[1]["a-b"](1, 2, "string"); +>new g[1]["a-b"](1, 2, "string") : B +>g[1]["a-b"] : typeof B +>g[1] : C +>g : C[] +>1 : 1 +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>"string" : "string" + +new g[1]["a-b"](1, 2, ...a); +>new g[1]["a-b"](1, 2, ...a) : B +>g[1]["a-b"] : typeof B +>g[1] : C +>g : C[] +>1 : 1 +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new g[1]["a-b"](1, 2, ...a, "string"); +>new g[1]["a-b"](1, 2, ...a, "string") : B +>g[1]["a-b"] : typeof B +>g[1] : C +>g : C[] +>1 : 1 +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Element access expression with a punctuated key +new h["a-b"]["a-b"](1, 2, "string"); +>new h["a-b"]["a-b"](1, 2, "string") : B +>h["a-b"]["a-b"] : typeof B +>h["a-b"] : C +>h : { [key: string]: C; } +>"a-b" : "a-b" +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>"string" : "string" + +new h["a-b"]["a-b"](1, 2, ...a); +>new h["a-b"]["a-b"](1, 2, ...a) : B +>h["a-b"]["a-b"] : typeof B +>h["a-b"] : C +>h : { [key: string]: C; } +>"a-b" : "a-b" +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new h["a-b"]["a-b"](1, 2, ...a, "string"); +>new h["a-b"]["a-b"](1, 2, ...a, "string") : B +>h["a-b"]["a-b"] : typeof B +>h["a-b"] : C +>h : { [key: string]: C; } +>"a-b" : "a-b" +>"a-b" : "a-b" +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + +// Element access expression with a number +new i["a-b"][1](1, 2, "string"); +>new i["a-b"][1](1, 2, "string") : any +>i["a-b"][1] : any +>i["a-b"] : any +>i : C[][] +>"a-b" : "a-b" +>1 : 1 +>1 : 1 +>2 : 2 +>"string" : "string" + +new i["a-b"][1](1, 2, ...a); +>new i["a-b"][1](1, 2, ...a) : any +>i["a-b"][1] : any +>i["a-b"] : any +>i : C[][] +>"a-b" : "a-b" +>1 : 1 +>1 : 1 +>2 : 2 +>...a : string +>a : string[] + +new i["a-b"][1](1, 2, ...a, "string"); +>new i["a-b"][1](1, 2, ...a, "string") : any +>i["a-b"][1] : any +>i["a-b"] : any +>i : C[][] +>"a-b" : "a-b" +>1 : 1 +>1 : 1 +>2 : 2 +>...a : string +>a : string[] +>"string" : "string" + diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt deleted file mode 100644 index 2d322853cfec3..0000000000000 --- a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.errors.txt +++ /dev/null @@ -1,58 +0,0 @@ -tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(24,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts(34,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts (4 errors) ==== - class class1 { - get a(): number { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var x2 = { - doStuff: (callback) => () => { - var _this = 2; - return callback(_this); - } - } - - return 10; - } - set a(val: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var x2 = { - doStuff: (callback) => () => { - var _this = 2; - return callback(_this); - } - } - - } - } - - class class2 { - get a(): number { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var _this = 2; - var x2 = { - doStuff: (callback) => () => { - return callback(_this); - } - } - - return 10; - } - set a(val: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var _this = 2; - var x2 = { - doStuff: (callback) => () => { - return callback(_this); - } - } - - } - } \ No newline at end of file diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.symbols b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.symbols new file mode 100644 index 0000000000000..b534c8cadf41b --- /dev/null +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.symbols @@ -0,0 +1,94 @@ +=== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts === +class class1 { +>class1 : Symbol(class1, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 0, 0)) + + get a(): number { +>a : Symbol(class1.a, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 0, 14), Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 10, 5)) + + var x2 = { +>x2 : Symbol(x2, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 2, 11)) + + doStuff: (callback) => () => { +>doStuff : Symbol(doStuff, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 2, 18)) +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 3, 22)) + + var _this = 2; +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 4, 19)) + + return callback(_this); +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 3, 22)) +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 4, 19)) + } + } + + return 10; + } + set a(val: number) { +>a : Symbol(class1.a, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 0, 14), Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 10, 5)) +>val : Symbol(val, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 11, 10)) + + var x2 = { +>x2 : Symbol(x2, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 12, 11)) + + doStuff: (callback) => () => { +>doStuff : Symbol(doStuff, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 12, 18)) +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 13, 22)) + + var _this = 2; +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 14, 19)) + + return callback(_this); +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 13, 22)) +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 14, 19)) + } + } + + } +} + +class class2 { +>class2 : Symbol(class2, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 20, 1)) + + get a(): number { +>a : Symbol(class2.a, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 22, 14), Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 32, 5)) + + var _this = 2; +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 24, 11)) + + var x2 = { +>x2 : Symbol(x2, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 25, 11)) + + doStuff: (callback) => () => { +>doStuff : Symbol(doStuff, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 25, 18)) +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 26, 22)) + + return callback(_this); +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 26, 22)) +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 24, 11)) + } + } + + return 10; + } + set a(val: number) { +>a : Symbol(class2.a, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 22, 14), Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 32, 5)) +>val : Symbol(val, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 33, 10)) + + var _this = 2; +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 34, 11)) + + var x2 = { +>x2 : Symbol(x2, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 35, 11)) + + doStuff: (callback) => () => { +>doStuff : Symbol(doStuff, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 35, 18)) +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 36, 22)) + + return callback(_this); +>callback : Symbol(callback, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 36, 22)) +>_this : Symbol(_this, Decl(noCollisionThisExpressionAndLocalVarInAccessors.ts, 34, 11)) + } + } + + } +} diff --git a/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.types b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.types new file mode 100644 index 0000000000000..0b394c448b315 --- /dev/null +++ b/tests/baselines/reference/noCollisionThisExpressionAndLocalVarInAccessors.types @@ -0,0 +1,116 @@ +=== tests/cases/compiler/noCollisionThisExpressionAndLocalVarInAccessors.ts === +class class1 { +>class1 : class1 + + get a(): number { +>a : number + + var x2 = { +>x2 : { doStuff: (callback: any) => () => any; } +>{ doStuff: (callback) => () => { var _this = 2; return callback(_this); } } : { doStuff: (callback: any) => () => any; } + + doStuff: (callback) => () => { +>doStuff : (callback: any) => () => any +>(callback) => () => { var _this = 2; return callback(_this); } : (callback: any) => () => any +>callback : any +>() => { var _this = 2; return callback(_this); } : () => any + + var _this = 2; +>_this : number +>2 : 2 + + return callback(_this); +>callback(_this) : any +>callback : any +>_this : number + } + } + + return 10; +>10 : 10 + } + set a(val: number) { +>a : number +>val : number + + var x2 = { +>x2 : { doStuff: (callback: any) => () => any; } +>{ doStuff: (callback) => () => { var _this = 2; return callback(_this); } } : { doStuff: (callback: any) => () => any; } + + doStuff: (callback) => () => { +>doStuff : (callback: any) => () => any +>(callback) => () => { var _this = 2; return callback(_this); } : (callback: any) => () => any +>callback : any +>() => { var _this = 2; return callback(_this); } : () => any + + var _this = 2; +>_this : number +>2 : 2 + + return callback(_this); +>callback(_this) : any +>callback : any +>_this : number + } + } + + } +} + +class class2 { +>class2 : class2 + + get a(): number { +>a : number + + var _this = 2; +>_this : number +>2 : 2 + + var x2 = { +>x2 : { doStuff: (callback: any) => () => any; } +>{ doStuff: (callback) => () => { return callback(_this); } } : { doStuff: (callback: any) => () => any; } + + doStuff: (callback) => () => { +>doStuff : (callback: any) => () => any +>(callback) => () => { return callback(_this); } : (callback: any) => () => any +>callback : any +>() => { return callback(_this); } : () => any + + return callback(_this); +>callback(_this) : any +>callback : any +>_this : number + } + } + + return 10; +>10 : 10 + } + set a(val: number) { +>a : number +>val : number + + var _this = 2; +>_this : number +>2 : 2 + + var x2 = { +>x2 : { doStuff: (callback: any) => () => any; } +>{ doStuff: (callback) => () => { return callback(_this); } } : { doStuff: (callback: any) => () => any; } + + doStuff: (callback) => () => { +>doStuff : (callback: any) => () => any +>(callback) => () => { return callback(_this); } : (callback: any) => () => any +>callback : any +>() => { return callback(_this); } : () => any + + return callback(_this); +>callback(_this) : any +>callback : any +>_this : number + } + } + + } +} diff --git a/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile2.js b/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile2.js index fc778fbda09c7..5d558f540c8bb 100644 --- a/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile2.js +++ b/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile2.js @@ -9,5 +9,5 @@ declare var a: number; //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.j = "hello"; // error diff --git a/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile3.js b/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile3.js index b97e6e306d7b8..db44370ee9c50 100644 --- a/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile3.js +++ b/tests/baselines/reference/noErrorUsingImportExportModuleAugmentationInDeclarationFile3.js @@ -10,5 +10,5 @@ export var j = "hello"; // error //// [1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.j = "hello"; // error diff --git a/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.js b/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.js index 63788fd860ffe..adf24860a1c72 100644 --- a/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.js +++ b/tests/baselines/reference/noImplicitAnyDestructuringInPrivateMethod.js @@ -13,7 +13,7 @@ export declare class Bar2 { //// [noImplicitAnyDestructuringInPrivateMethod.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Bar = (function () { function Bar() { } diff --git a/tests/baselines/reference/noImplicitUseStrict_amd.js b/tests/baselines/reference/noImplicitUseStrict_amd.js index b91eb949ef186..80e7b18a71b88 100644 --- a/tests/baselines/reference/noImplicitUseStrict_amd.js +++ b/tests/baselines/reference/noImplicitUseStrict_amd.js @@ -3,6 +3,6 @@ export var x = 0; //// [noImplicitUseStrict_amd.js] define(["require", "exports"], function (require, exports) { - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 0; }); diff --git a/tests/baselines/reference/noImplicitUseStrict_commonjs.js b/tests/baselines/reference/noImplicitUseStrict_commonjs.js index 842eae22229c5..00e26b9fae12e 100644 --- a/tests/baselines/reference/noImplicitUseStrict_commonjs.js +++ b/tests/baselines/reference/noImplicitUseStrict_commonjs.js @@ -2,5 +2,5 @@ export var x = 0; //// [noImplicitUseStrict_commonjs.js] -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 0; diff --git a/tests/baselines/reference/noImplicitUseStrict_umd.js b/tests/baselines/reference/noImplicitUseStrict_umd.js index f53d6098298ee..f702e1d33013f 100644 --- a/tests/baselines/reference/noImplicitUseStrict_umd.js +++ b/tests/baselines/reference/noImplicitUseStrict_umd.js @@ -11,6 +11,6 @@ export var x = 0; define(["require", "exports"], factory); } })(function (require, exports) { - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 0; }); diff --git a/tests/baselines/reference/nodeResolution1.js b/tests/baselines/reference/nodeResolution1.js index 91f423084d84b..10bdbd9b2aa5f 100644 --- a/tests/baselines/reference/nodeResolution1.js +++ b/tests/baselines/reference/nodeResolution1.js @@ -8,8 +8,8 @@ import y = require("./a"); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeResolution2.js b/tests/baselines/reference/nodeResolution2.js index 0d66b012ca76a..842cfc66c1ef8 100644 --- a/tests/baselines/reference/nodeResolution2.js +++ b/tests/baselines/reference/nodeResolution2.js @@ -8,4 +8,4 @@ import y = require("a"); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeResolution3.js b/tests/baselines/reference/nodeResolution3.js index 74eeec7057bc4..7dedaf6d4c8b9 100644 --- a/tests/baselines/reference/nodeResolution3.js +++ b/tests/baselines/reference/nodeResolution3.js @@ -8,4 +8,4 @@ import y = require("b"); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeResolution4.js b/tests/baselines/reference/nodeResolution4.js index 3285f3b8e20b9..dcfe2e782cc96 100644 --- a/tests/baselines/reference/nodeResolution4.js +++ b/tests/baselines/reference/nodeResolution4.js @@ -14,7 +14,7 @@ import y = require("./a"); var x = 1; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeResolution5.js b/tests/baselines/reference/nodeResolution5.js index 3dfedea4aab02..109810a436458 100644 --- a/tests/baselines/reference/nodeResolution5.js +++ b/tests/baselines/reference/nodeResolution5.js @@ -11,4 +11,4 @@ import y = require("a"); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeResolution6.js b/tests/baselines/reference/nodeResolution6.js index 0610c53edcf4c..3ee4da97624c6 100644 --- a/tests/baselines/reference/nodeResolution6.js +++ b/tests/baselines/reference/nodeResolution6.js @@ -14,4 +14,4 @@ import y = require("a"); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeResolution7.js b/tests/baselines/reference/nodeResolution7.js index 118f9cd3994cc..570f6143c9318 100644 --- a/tests/baselines/reference/nodeResolution7.js +++ b/tests/baselines/reference/nodeResolution7.js @@ -11,4 +11,4 @@ import y = require("a"); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeResolution8.js b/tests/baselines/reference/nodeResolution8.js index 59a6ee67ec8dc..0e5fbf5225b15 100644 --- a/tests/baselines/reference/nodeResolution8.js +++ b/tests/baselines/reference/nodeResolution8.js @@ -13,4 +13,4 @@ import y = require("a"); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nonMergedOverloads.js b/tests/baselines/reference/nonMergedOverloads.js index 515792feb7055..fb60c2b78ef7e 100644 --- a/tests/baselines/reference/nonMergedOverloads.js +++ b/tests/baselines/reference/nonMergedOverloads.js @@ -7,7 +7,7 @@ export function f() { //// [nonMergedOverloads.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f = 10; function f() { } diff --git a/tests/baselines/reference/nounusedTypeParameterConstraint.js b/tests/baselines/reference/nounusedTypeParameterConstraint.js index a448315fa70db..e4ca10195d77d 100644 --- a/tests/baselines/reference/nounusedTypeParameterConstraint.js +++ b/tests/baselines/reference/nounusedTypeParameterConstraint.js @@ -9,7 +9,7 @@ export type DomainEntityConstructor = { new //// [bar.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [test.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt index f532bd237559d..9f7982ec28be0 100644 --- a/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/numericIndexerConstrainsPropertyDeclarations.errors.txt @@ -1,18 +1,13 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(18,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(21,5): error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(36,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(50,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(68,5): error TS2412: Property '2.0' of type 'number' is not assignable to numeric index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(79,5): error TS2322: Type '{ a: string; b: number; c: () => void; "d": string; "e": number; 1.0: string; 2.0: number; "3.0": string; "4.0": number; f: any; X: string; foo(): string; }' is not assignable to type '{ [x: number]: string; }'. Object literal may only specify known properties, and 'a' does not exist in type '{ [x: number]: string; }'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(88,9): error TS2304: Cannot find name 'Myn'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(90,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts(93,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts (11 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerConstrainsPropertyDeclarations.ts (6 errors) ==== // String indexer types constrain the types of named properties in their containing type interface MyNumber extends Number { @@ -40,13 +35,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo !!! error TS2412: Property '3.0' of type 'MyNumber' is not assignable to numeric index type 'string'. get X() { // ok - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } set X(v) { } // ok - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { return ''; @@ -57,8 +48,6 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo static foo() { } // ok static get X() { // ok - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } } @@ -122,13 +111,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/numericIndexerCo !!! error TS2304: Cannot find name 'Myn'. get X() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; }, set X(v) { }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { return ''; } diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js index ec0cae158fc2b..c0de5807e568e 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers01.js @@ -2,4 +2,4 @@ var { while } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers01.js] -var = { "while": 1 }["while"]; +var = { while: 1 }.while; diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js index 88f5e1b56d87f..a11af94d7757b 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers02.js @@ -2,4 +2,4 @@ var { while: while } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers02.js] -var _a = { "while": 1 }, = _a["while"], = _a["while"]; +var _a = { while: 1 }, = _a.while, = _a.while; diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js index 6c9a539bb694e..edd017977ae67 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers03.js @@ -2,4 +2,4 @@ var { "while" } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers03.js] -var = { "while": 1 }["while"]; +var = { while: 1 }["while"]; diff --git a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js index a93e76c7e9c0c..f10a47179b883 100644 --- a/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js +++ b/tests/baselines/reference/objectBindingPatternKeywordIdentifiers04.js @@ -2,4 +2,4 @@ var { "while": while } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers04.js] -var _a = { "while": 1 }, = _a["while"], = _a["while"]; +var _a = { while: 1 }, = _a["while"], = _a.while; diff --git a/tests/baselines/reference/objectIndexer.js b/tests/baselines/reference/objectIndexer.js index c93172951e929..631439390c853 100644 --- a/tests/baselines/reference/objectIndexer.js +++ b/tests/baselines/reference/objectIndexer.js @@ -18,7 +18,7 @@ class Emitter { //// [objectIndexer.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Emitter = (function () { function Emitter() { this.listeners = {}; diff --git a/tests/baselines/reference/objectLitPropertyScoping.errors.txt b/tests/baselines/reference/objectLitPropertyScoping.errors.txt deleted file mode 100644 index 420f8a5f192e0..0000000000000 --- a/tests/baselines/reference/objectLitPropertyScoping.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -tests/cases/compiler/objectLitPropertyScoping.ts(5,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/objectLitPropertyScoping.ts(8,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/objectLitPropertyScoping.ts (2 errors) ==== - // Should compile, x and y should not be picked up from the properties - - function makePoint(x: number, y: number) { - return { - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return x; - }, - get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return y; - }, - dist: function () { - return Math.sqrt(x * x + y * y); - } - } - }; \ No newline at end of file diff --git a/tests/baselines/reference/objectLitPropertyScoping.symbols b/tests/baselines/reference/objectLitPropertyScoping.symbols new file mode 100644 index 0000000000000..e1686e1dc7dcc --- /dev/null +++ b/tests/baselines/reference/objectLitPropertyScoping.symbols @@ -0,0 +1,37 @@ +=== tests/cases/compiler/objectLitPropertyScoping.ts === +// Should compile, x and y should not be picked up from the properties + +function makePoint(x: number, y: number) { +>makePoint : Symbol(makePoint, Decl(objectLitPropertyScoping.ts, 0, 0)) +>x : Symbol(x, Decl(objectLitPropertyScoping.ts, 2, 19)) +>y : Symbol(y, Decl(objectLitPropertyScoping.ts, 2, 29)) + + return { + get x() { +>x : Symbol(x, Decl(objectLitPropertyScoping.ts, 3, 12)) + + return x; +>x : Symbol(x, Decl(objectLitPropertyScoping.ts, 2, 19)) + + }, + get y() { +>y : Symbol(y, Decl(objectLitPropertyScoping.ts, 6, 10)) + + return y; +>y : Symbol(y, Decl(objectLitPropertyScoping.ts, 2, 29)) + + }, + dist: function () { +>dist : Symbol(dist, Decl(objectLitPropertyScoping.ts, 9, 10)) + + return Math.sqrt(x * x + y * y); +>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(objectLitPropertyScoping.ts, 2, 19)) +>x : Symbol(x, Decl(objectLitPropertyScoping.ts, 2, 19)) +>y : Symbol(y, Decl(objectLitPropertyScoping.ts, 2, 29)) +>y : Symbol(y, Decl(objectLitPropertyScoping.ts, 2, 29)) + } + } +}; diff --git a/tests/baselines/reference/objectLitPropertyScoping.types b/tests/baselines/reference/objectLitPropertyScoping.types new file mode 100644 index 0000000000000..a0cc4e8960f44 --- /dev/null +++ b/tests/baselines/reference/objectLitPropertyScoping.types @@ -0,0 +1,44 @@ +=== tests/cases/compiler/objectLitPropertyScoping.ts === +// Should compile, x and y should not be picked up from the properties + +function makePoint(x: number, y: number) { +>makePoint : (x: number, y: number) => { readonly x: number; readonly y: number; dist: () => number; } +>x : number +>y : number + + return { +>{ get x() { return x; }, get y() { return y; }, dist: function () { return Math.sqrt(x * x + y * y); } } : { readonly x: number; readonly y: number; dist: () => number; } + + get x() { +>x : number + + return x; +>x : number + + }, + get y() { +>y : number + + return y; +>y : number + + }, + dist: function () { +>dist : () => number +>function () { return Math.sqrt(x * x + y * y); } : () => number + + return Math.sqrt(x * x + y * y); +>Math.sqrt(x * x + y * y) : number +>Math.sqrt : (x: number) => number +>Math : Math +>sqrt : (x: number) => number +>x * x + y * y : number +>x * x : number +>x : number +>x : number +>y * y : number +>y : number +>y : number + } + } +}; diff --git a/tests/baselines/reference/objectLiteralErrorsES3.errors.txt b/tests/baselines/reference/objectLiteralErrorsES3.errors.txt deleted file mode 100644 index 99b4f5c4ae01d..0000000000000 --- a/tests/baselines/reference/objectLiteralErrorsES3.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(1,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts(3,40): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts (4 errors) ==== - var e1 = { get a() { return 4; } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var e2 = { set a(n) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var e3 = { get a() { return ''; }, set a(n) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralErrorsES3.symbols b/tests/baselines/reference/objectLiteralErrorsES3.symbols new file mode 100644 index 0000000000000..266758cce4103 --- /dev/null +++ b/tests/baselines/reference/objectLiteralErrorsES3.symbols @@ -0,0 +1,17 @@ +=== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts === +var e1 = { get a() { return 4; } }; +>e1 : Symbol(e1, Decl(objectLiteralErrorsES3.ts, 0, 3)) +>a : Symbol(a, Decl(objectLiteralErrorsES3.ts, 0, 10)) + +var e2 = { set a(n) { } }; +>e2 : Symbol(e2, Decl(objectLiteralErrorsES3.ts, 1, 3)) +>a : Symbol(a, Decl(objectLiteralErrorsES3.ts, 1, 10)) +>n : Symbol(n, Decl(objectLiteralErrorsES3.ts, 1, 17)) + +var e3 = { get a() { return ''; }, set a(n) { } }; +>e3 : Symbol(e3, Decl(objectLiteralErrorsES3.ts, 2, 3)) +>a : Symbol(a, Decl(objectLiteralErrorsES3.ts, 2, 10), Decl(objectLiteralErrorsES3.ts, 2, 34)) +>a : Symbol(a, Decl(objectLiteralErrorsES3.ts, 2, 10), Decl(objectLiteralErrorsES3.ts, 2, 34)) +>n : Symbol(n, Decl(objectLiteralErrorsES3.ts, 2, 41)) + + diff --git a/tests/baselines/reference/objectLiteralErrorsES3.types b/tests/baselines/reference/objectLiteralErrorsES3.types new file mode 100644 index 0000000000000..c1fd00cf8bf67 --- /dev/null +++ b/tests/baselines/reference/objectLiteralErrorsES3.types @@ -0,0 +1,22 @@ +=== tests/cases/conformance/expressions/objectLiterals/objectLiteralErrorsES3.ts === +var e1 = { get a() { return 4; } }; +>e1 : { readonly a: number; } +>{ get a() { return 4; } } : { readonly a: number; } +>a : number +>4 : 4 + +var e2 = { set a(n) { } }; +>e2 : { a: any; } +>{ set a(n) { } } : { a: any; } +>a : any +>n : any + +var e3 = { get a() { return ''; }, set a(n) { } }; +>e3 : { a: string; } +>{ get a() { return ''; }, set a(n) { } } : { a: string; } +>a : string +>'' : "" +>a : string +>n : string + + diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt b/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt deleted file mode 100644 index 1290859fbf9f0..0000000000000 --- a/tests/baselines/reference/objectLiteralGettersAndSetters.errors.txt +++ /dev/null @@ -1,188 +0,0 @@ -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(2,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(2,50): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(3,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(3,50): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(4,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(4,51): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(5,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(5,49): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(6,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(6,51): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(7,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(7,50): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(18,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(22,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(26,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(30,21): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(35,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(35,62): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(36,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(36,69): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(37,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(37,59): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(38,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(38,60): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(42,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(43,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(50,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(55,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(60,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(64,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(67,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(68,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(76,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts(77,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts (34 errors) ==== - // Get and set accessor with the same name - var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} - var callSig1 = { num(n: number) { return '' } }; - var callSig1: { num: (n: number) => string; }; - var callSig2 = { num: function (n: number) { return '' } }; - var callSig2: { num: (n: number) => string; }; - var callSig3 = { num: (n: number) => '' }; - var callSig3: { num: (n: number) => string; }; - - // Get accessor only, type of the property is the annotated return type of the get accessor - var getter1 = { get x(): string { return undefined; } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var getter1: { readonly x: string; } - - // Get accessor only, type of the property is the inferred return type of the get accessor - var getter2 = { get x() { return ''; } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var getter2: { readonly x: string; } - - // Set accessor only, type of the property is the param type of the set accessor - var setter1 = { set x(n: number) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var setter1: { x: number }; - - // Set accessor only, type of the property is Any for an unannotated set accessor - var setter2 = { set x(n) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var setter2: { x: any }; - - var anyVar: any; - // Get and set accessor with matching type annotations - var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - // Type of unannotated get accessor return type is the type annotation of the set accessor param - var setParamType1 = { - set n(x: (t: string) => void) { }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - get n() { return (t) => { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var p: string; - var p = t; - } - } - }; - var setParamType2 = { - get n() { return (t) => { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - - // Type of unannotated set accessor parameter is the return type annotation of the get accessor - var getParamType1 = { - set n(x) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var y = x; - var y: string; - }, - get n() { return ''; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - var getParamType2 = { - get n() { return ''; }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set n(x) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var y = x; - var y: string; - } - }; - - // Type of unannotated accessors is the inferred return type of the get accessor - var getParamType3 = { - get n() { return ''; }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - set n(x) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var y = x; - var y: string; - } - }; - - \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.symbols b/tests/baselines/reference/objectLiteralGettersAndSetters.symbols new file mode 100644 index 0000000000000..5a4250f9c8239 --- /dev/null +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.symbols @@ -0,0 +1,256 @@ +=== tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts === +// Get and set accessor with the same name +var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; +>sameName1a : Symbol(sameName1a, Decl(objectLiteralGettersAndSetters.ts, 1, 3)) +>a : Symbol('a', Decl(objectLiteralGettersAndSetters.ts, 1, 18), Decl(objectLiteralGettersAndSetters.ts, 1, 44)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 1, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 1, 59), Decl(objectLiteralGettersAndSetters.ts, 1, 70)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 1, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 1, 59), Decl(objectLiteralGettersAndSetters.ts, 1, 70)) + +var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; +>sameName2a : Symbol(sameName2a, Decl(objectLiteralGettersAndSetters.ts, 2, 3)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 2, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 2, 59), Decl(objectLiteralGettersAndSetters.ts, 2, 70)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 2, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 2, 59), Decl(objectLiteralGettersAndSetters.ts, 2, 70)) + +var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; +>sameName3a : Symbol(sameName3a, Decl(objectLiteralGettersAndSetters.ts, 3, 3)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 3, 56)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 3, 64), Decl(objectLiteralGettersAndSetters.ts, 3, 75)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 3, 56)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 3, 64), Decl(objectLiteralGettersAndSetters.ts, 3, 75)) + +var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; +>sameName4a : Symbol(sameName4a, Decl(objectLiteralGettersAndSetters.ts, 4, 3)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 4, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 4, 59), Decl(objectLiteralGettersAndSetters.ts, 4, 70)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 4, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 4, 59), Decl(objectLiteralGettersAndSetters.ts, 4, 70)) + +var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; +>sameName5a : Symbol(sameName5a, Decl(objectLiteralGettersAndSetters.ts, 5, 3)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 5, 55)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 5, 63), Decl(objectLiteralGettersAndSetters.ts, 5, 74)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 5, 55)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 5, 63), Decl(objectLiteralGettersAndSetters.ts, 5, 74)) + +var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; +>sameName6a : Symbol(sameName6a, Decl(objectLiteralGettersAndSetters.ts, 6, 3)) +>a : Symbol('a', Decl(objectLiteralGettersAndSetters.ts, 6, 18), Decl(objectLiteralGettersAndSetters.ts, 6, 44)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 6, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 6, 59), Decl(objectLiteralGettersAndSetters.ts, 6, 70)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 6, 51)) +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 6, 59), Decl(objectLiteralGettersAndSetters.ts, 6, 70)) + +// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} +var callSig1 = { num(n: number) { return '' } }; +>callSig1 : Symbol(callSig1, Decl(objectLiteralGettersAndSetters.ts, 9, 3), Decl(objectLiteralGettersAndSetters.ts, 10, 3)) +>num : Symbol(num, Decl(objectLiteralGettersAndSetters.ts, 9, 16)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 9, 21)) + +var callSig1: { num: (n: number) => string; }; +>callSig1 : Symbol(callSig1, Decl(objectLiteralGettersAndSetters.ts, 9, 3), Decl(objectLiteralGettersAndSetters.ts, 10, 3)) +>num : Symbol(num, Decl(objectLiteralGettersAndSetters.ts, 10, 15)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 10, 22)) + +var callSig2 = { num: function (n: number) { return '' } }; +>callSig2 : Symbol(callSig2, Decl(objectLiteralGettersAndSetters.ts, 11, 3), Decl(objectLiteralGettersAndSetters.ts, 12, 3)) +>num : Symbol(num, Decl(objectLiteralGettersAndSetters.ts, 11, 16)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 11, 32)) + +var callSig2: { num: (n: number) => string; }; +>callSig2 : Symbol(callSig2, Decl(objectLiteralGettersAndSetters.ts, 11, 3), Decl(objectLiteralGettersAndSetters.ts, 12, 3)) +>num : Symbol(num, Decl(objectLiteralGettersAndSetters.ts, 12, 15)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 12, 22)) + +var callSig3 = { num: (n: number) => '' }; +>callSig3 : Symbol(callSig3, Decl(objectLiteralGettersAndSetters.ts, 13, 3), Decl(objectLiteralGettersAndSetters.ts, 14, 3)) +>num : Symbol(num, Decl(objectLiteralGettersAndSetters.ts, 13, 16)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 13, 23)) + +var callSig3: { num: (n: number) => string; }; +>callSig3 : Symbol(callSig3, Decl(objectLiteralGettersAndSetters.ts, 13, 3), Decl(objectLiteralGettersAndSetters.ts, 14, 3)) +>num : Symbol(num, Decl(objectLiteralGettersAndSetters.ts, 14, 15)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 14, 22)) + +// Get accessor only, type of the property is the annotated return type of the get accessor +var getter1 = { get x(): string { return undefined; } }; +>getter1 : Symbol(getter1, Decl(objectLiteralGettersAndSetters.ts, 17, 3), Decl(objectLiteralGettersAndSetters.ts, 18, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 17, 15)) +>undefined : Symbol(undefined) + +var getter1: { readonly x: string; } +>getter1 : Symbol(getter1, Decl(objectLiteralGettersAndSetters.ts, 17, 3), Decl(objectLiteralGettersAndSetters.ts, 18, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 18, 14)) + +// Get accessor only, type of the property is the inferred return type of the get accessor +var getter2 = { get x() { return ''; } }; +>getter2 : Symbol(getter2, Decl(objectLiteralGettersAndSetters.ts, 21, 3), Decl(objectLiteralGettersAndSetters.ts, 22, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 21, 15)) + +var getter2: { readonly x: string; } +>getter2 : Symbol(getter2, Decl(objectLiteralGettersAndSetters.ts, 21, 3), Decl(objectLiteralGettersAndSetters.ts, 22, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 22, 14)) + +// Set accessor only, type of the property is the param type of the set accessor +var setter1 = { set x(n: number) { } }; +>setter1 : Symbol(setter1, Decl(objectLiteralGettersAndSetters.ts, 25, 3), Decl(objectLiteralGettersAndSetters.ts, 26, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 25, 15)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 25, 22)) + +var setter1: { x: number }; +>setter1 : Symbol(setter1, Decl(objectLiteralGettersAndSetters.ts, 25, 3), Decl(objectLiteralGettersAndSetters.ts, 26, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 26, 14)) + +// Set accessor only, type of the property is Any for an unannotated set accessor +var setter2 = { set x(n) { } }; +>setter2 : Symbol(setter2, Decl(objectLiteralGettersAndSetters.ts, 29, 3), Decl(objectLiteralGettersAndSetters.ts, 30, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 29, 15)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 29, 22)) + +var setter2: { x: any }; +>setter2 : Symbol(setter2, Decl(objectLiteralGettersAndSetters.ts, 29, 3), Decl(objectLiteralGettersAndSetters.ts, 30, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 30, 14)) + +var anyVar: any; +>anyVar : Symbol(anyVar, Decl(objectLiteralGettersAndSetters.ts, 32, 3)) + +// Get and set accessor with matching type annotations +var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; +>sameType1 : Symbol(sameType1, Decl(objectLiteralGettersAndSetters.ts, 34, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 34, 17), Decl(objectLiteralGettersAndSetters.ts, 34, 56)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 34, 17), Decl(objectLiteralGettersAndSetters.ts, 34, 56)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 34, 63)) + +var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; +>sameType2 : Symbol(sameType2, Decl(objectLiteralGettersAndSetters.ts, 35, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 35, 17), Decl(objectLiteralGettersAndSetters.ts, 35, 63)) +>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 35, 17), Decl(objectLiteralGettersAndSetters.ts, 35, 63)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 35, 70)) + +var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; +>sameType3 : Symbol(sameType3, Decl(objectLiteralGettersAndSetters.ts, 36, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 36, 17), Decl(objectLiteralGettersAndSetters.ts, 36, 53)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 36, 17), Decl(objectLiteralGettersAndSetters.ts, 36, 53)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 36, 60)) +>anyVar : Symbol(anyVar, Decl(objectLiteralGettersAndSetters.ts, 32, 3)) + +var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; +>sameType4 : Symbol(sameType4, Decl(objectLiteralGettersAndSetters.ts, 37, 3)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 37, 17), Decl(objectLiteralGettersAndSetters.ts, 37, 54)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 37, 17), Decl(objectLiteralGettersAndSetters.ts, 37, 54)) +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 37, 61)) +>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + +// Type of unannotated get accessor return type is the type annotation of the set accessor param +var setParamType1 = { +>setParamType1 : Symbol(setParamType1, Decl(objectLiteralGettersAndSetters.ts, 40, 3)) + + set n(x: (t: string) => void) { }, +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 40, 21), Decl(objectLiteralGettersAndSetters.ts, 41, 38)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 41, 10)) +>t : Symbol(t, Decl(objectLiteralGettersAndSetters.ts, 41, 14)) + + get n() { return (t) => { +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 40, 21), Decl(objectLiteralGettersAndSetters.ts, 41, 38)) +>t : Symbol(t, Decl(objectLiteralGettersAndSetters.ts, 42, 22)) + + var p: string; +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 43, 15), Decl(objectLiteralGettersAndSetters.ts, 44, 15)) + + var p = t; +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 43, 15), Decl(objectLiteralGettersAndSetters.ts, 44, 15)) +>t : Symbol(t, Decl(objectLiteralGettersAndSetters.ts, 42, 22)) + } + } +}; +var setParamType2 = { +>setParamType2 : Symbol(setParamType2, Decl(objectLiteralGettersAndSetters.ts, 48, 3)) + + get n() { return (t) => { +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 48, 21), Decl(objectLiteralGettersAndSetters.ts, 53, 6)) +>t : Symbol(t, Decl(objectLiteralGettersAndSetters.ts, 49, 22)) + + var p: string; +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 50, 15), Decl(objectLiteralGettersAndSetters.ts, 51, 15)) + + var p = t; +>p : Symbol(p, Decl(objectLiteralGettersAndSetters.ts, 50, 15), Decl(objectLiteralGettersAndSetters.ts, 51, 15)) +>t : Symbol(t, Decl(objectLiteralGettersAndSetters.ts, 49, 22)) + } + }, + set n(x: (t: string) => void) { } +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 48, 21), Decl(objectLiteralGettersAndSetters.ts, 53, 6)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 54, 10)) +>t : Symbol(t, Decl(objectLiteralGettersAndSetters.ts, 54, 14)) + +}; + +// Type of unannotated set accessor parameter is the return type annotation of the get accessor +var getParamType1 = { +>getParamType1 : Symbol(getParamType1, Decl(objectLiteralGettersAndSetters.ts, 58, 3)) + + set n(x) { +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 58, 21), Decl(objectLiteralGettersAndSetters.ts, 62, 6)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 59, 10)) + + var y = x; +>y : Symbol(y, Decl(objectLiteralGettersAndSetters.ts, 60, 11), Decl(objectLiteralGettersAndSetters.ts, 61, 11)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 59, 10)) + + var y: string; +>y : Symbol(y, Decl(objectLiteralGettersAndSetters.ts, 60, 11), Decl(objectLiteralGettersAndSetters.ts, 61, 11)) + + }, + get n() { return ''; } +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 58, 21), Decl(objectLiteralGettersAndSetters.ts, 62, 6)) + +}; +var getParamType2 = { +>getParamType2 : Symbol(getParamType2, Decl(objectLiteralGettersAndSetters.ts, 65, 3)) + + get n() { return ''; }, +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 65, 21), Decl(objectLiteralGettersAndSetters.ts, 66, 27)) + + set n(x) { +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 65, 21), Decl(objectLiteralGettersAndSetters.ts, 66, 27)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 67, 10)) + + var y = x; +>y : Symbol(y, Decl(objectLiteralGettersAndSetters.ts, 68, 11), Decl(objectLiteralGettersAndSetters.ts, 69, 11)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 67, 10)) + + var y: string; +>y : Symbol(y, Decl(objectLiteralGettersAndSetters.ts, 68, 11), Decl(objectLiteralGettersAndSetters.ts, 69, 11)) + } +}; + +// Type of unannotated accessors is the inferred return type of the get accessor +var getParamType3 = { +>getParamType3 : Symbol(getParamType3, Decl(objectLiteralGettersAndSetters.ts, 74, 3)) + + get n() { return ''; }, +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 74, 21), Decl(objectLiteralGettersAndSetters.ts, 75, 27)) + + set n(x) { +>n : Symbol(n, Decl(objectLiteralGettersAndSetters.ts, 74, 21), Decl(objectLiteralGettersAndSetters.ts, 75, 27)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 76, 10)) + + var y = x; +>y : Symbol(y, Decl(objectLiteralGettersAndSetters.ts, 77, 11), Decl(objectLiteralGettersAndSetters.ts, 78, 11)) +>x : Symbol(x, Decl(objectLiteralGettersAndSetters.ts, 76, 10)) + + var y: string; +>y : Symbol(y, Decl(objectLiteralGettersAndSetters.ts, 77, 11), Decl(objectLiteralGettersAndSetters.ts, 78, 11)) + } +}; + + diff --git a/tests/baselines/reference/objectLiteralGettersAndSetters.types b/tests/baselines/reference/objectLiteralGettersAndSetters.types new file mode 100644 index 0000000000000..5302bcdbbf561 --- /dev/null +++ b/tests/baselines/reference/objectLiteralGettersAndSetters.types @@ -0,0 +1,295 @@ +=== tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts === +// Get and set accessor with the same name +var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; +>sameName1a : { 'a': string; } +>{ get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } } : { 'a': string; } +>'' : "" +>a : string +>n : string +>p : string +>n : string +>p : string + +var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; +>sameName2a : { 0.0: string; } +>{ get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } } : { 0.0: string; } +>'' : "" +>n : string +>p : string +>n : string +>p : string + +var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; +>sameName3a : { 0x20: string; } +>{ get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } } : { 0x20: string; } +>'' : "" +>n : string +>p : string +>n : string +>p : string + +var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; +>sameName4a : { '': string; } +>{ get ''() { return ''; }, set ""(n) { var p = n; var p: string; } } : { '': string; } +>'' : "" +>n : string +>p : string +>n : string +>p : string + +var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; +>sameName5a : { '\t': string; } +>{ get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } } : { '\t': string; } +>'' : "" +>n : string +>p : string +>n : string +>p : string + +var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; +>sameName6a : { 'a': string; } +>{ get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } } : { 'a': string; } +>'' : "" +>a : string +>n : string +>p : string +>n : string +>p : string + +// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} +var callSig1 = { num(n: number) { return '' } }; +>callSig1 : { num(n: number): string; } +>{ num(n: number) { return '' } } : { num(n: number): string; } +>num : (n: number) => string +>n : number +>'' : "" + +var callSig1: { num: (n: number) => string; }; +>callSig1 : { num(n: number): string; } +>num : (n: number) => string +>n : number + +var callSig2 = { num: function (n: number) { return '' } }; +>callSig2 : { num: (n: number) => string; } +>{ num: function (n: number) { return '' } } : { num: (n: number) => string; } +>num : (n: number) => string +>function (n: number) { return '' } : (n: number) => string +>n : number +>'' : "" + +var callSig2: { num: (n: number) => string; }; +>callSig2 : { num: (n: number) => string; } +>num : (n: number) => string +>n : number + +var callSig3 = { num: (n: number) => '' }; +>callSig3 : { num: (n: number) => string; } +>{ num: (n: number) => '' } : { num: (n: number) => string; } +>num : (n: number) => string +>(n: number) => '' : (n: number) => string +>n : number +>'' : "" + +var callSig3: { num: (n: number) => string; }; +>callSig3 : { num: (n: number) => string; } +>num : (n: number) => string +>n : number + +// Get accessor only, type of the property is the annotated return type of the get accessor +var getter1 = { get x(): string { return undefined; } }; +>getter1 : { readonly x: string; } +>{ get x(): string { return undefined; } } : { readonly x: string; } +>x : string +>undefined : undefined + +var getter1: { readonly x: string; } +>getter1 : { readonly x: string; } +>x : string + +// Get accessor only, type of the property is the inferred return type of the get accessor +var getter2 = { get x() { return ''; } }; +>getter2 : { readonly x: string; } +>{ get x() { return ''; } } : { readonly x: string; } +>x : string +>'' : "" + +var getter2: { readonly x: string; } +>getter2 : { readonly x: string; } +>x : string + +// Set accessor only, type of the property is the param type of the set accessor +var setter1 = { set x(n: number) { } }; +>setter1 : { x: number; } +>{ set x(n: number) { } } : { x: number; } +>x : number +>n : number + +var setter1: { x: number }; +>setter1 : { x: number; } +>x : number + +// Set accessor only, type of the property is Any for an unannotated set accessor +var setter2 = { set x(n) { } }; +>setter2 : { x: any; } +>{ set x(n) { } } : { x: any; } +>x : any +>n : any + +var setter2: { x: any }; +>setter2 : { x: any; } +>x : any + +var anyVar: any; +>anyVar : any + +// Get and set accessor with matching type annotations +var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; +>sameType1 : { x: string; } +>{ get x(): string { return undefined; }, set x(n: string) { } } : { x: string; } +>x : string +>undefined : undefined +>x : string +>n : string + +var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; +>sameType2 : { x: number[]; } +>{ get x(): Array { return undefined; }, set x(n: number[]) { } } : { x: number[]; } +>x : number[] +>Array : T[] +>undefined : undefined +>x : number[] +>n : number[] + +var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; +>sameType3 : { x: any; } +>{ get x(): any { return undefined; }, set x(n: typeof anyVar) { } } : { x: any; } +>x : any +>undefined : undefined +>x : any +>n : any +>anyVar : any + +var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; +>sameType4 : { x: Date; } +>{ get x(): Date { return undefined; }, set x(n: Date) { } } : { x: Date; } +>x : Date +>Date : Date +>undefined : undefined +>x : Date +>n : Date +>Date : Date + +// Type of unannotated get accessor return type is the type annotation of the set accessor param +var setParamType1 = { +>setParamType1 : { n: (t: string) => void; } +>{ set n(x: (t: string) => void) { }, get n() { return (t) => { var p: string; var p = t; } }} : { n: (t: string) => void; } + + set n(x: (t: string) => void) { }, +>n : (t: string) => void +>x : (t: string) => void +>t : string + + get n() { return (t) => { +>n : (t: string) => void +>(t) => { var p: string; var p = t; } : (t: string) => void +>t : string + + var p: string; +>p : string + + var p = t; +>p : string +>t : string + } + } +}; +var setParamType2 = { +>setParamType2 : { n: (t: string) => void; } +>{ get n() { return (t) => { var p: string; var p = t; } }, set n(x: (t: string) => void) { }} : { n: (t: string) => void; } + + get n() { return (t) => { +>n : (t: string) => void +>(t) => { var p: string; var p = t; } : (t: string) => void +>t : string + + var p: string; +>p : string + + var p = t; +>p : string +>t : string + } + }, + set n(x: (t: string) => void) { } +>n : (t: string) => void +>x : (t: string) => void +>t : string + +}; + +// Type of unannotated set accessor parameter is the return type annotation of the get accessor +var getParamType1 = { +>getParamType1 : { n: string; } +>{ set n(x) { var y = x; var y: string; }, get n() { return ''; }} : { n: string; } + + set n(x) { +>n : string +>x : string + + var y = x; +>y : string +>x : string + + var y: string; +>y : string + + }, + get n() { return ''; } +>n : string +>'' : "" + +}; +var getParamType2 = { +>getParamType2 : { n: string; } +>{ get n() { return ''; }, set n(x) { var y = x; var y: string; }} : { n: string; } + + get n() { return ''; }, +>n : string +>'' : "" + + set n(x) { +>n : string +>x : string + + var y = x; +>y : string +>x : string + + var y: string; +>y : string + } +}; + +// Type of unannotated accessors is the inferred return type of the get accessor +var getParamType3 = { +>getParamType3 : { n: string; } +>{ get n() { return ''; }, set n(x) { var y = x; var y: string; }} : { n: string; } + + get n() { return ''; }, +>n : string +>'' : "" + + set n(x) { +>n : string +>x : string + + var y = x; +>y : string +>x : string + + var y: string; +>y : string + } +}; + + diff --git a/tests/baselines/reference/objectLiteralMemberWithModifiers2.errors.txt b/tests/baselines/reference/objectLiteralMemberWithModifiers2.errors.txt index 0d1822339b643..1a932b0dddf48 100644 --- a/tests/baselines/reference/objectLiteralMemberWithModifiers2.errors.txt +++ b/tests/baselines/reference/objectLiteralMemberWithModifiers2.errors.txt @@ -1,13 +1,10 @@ tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,11): error TS1042: 'public' modifier cannot be used here. -tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,22): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/objectLiteralMemberWithModifiers2.ts(1,22): error TS2378: A 'get' accessor must return a value. -==== tests/cases/compiler/objectLiteralMemberWithModifiers2.ts (3 errors) ==== +==== tests/cases/compiler/objectLiteralMemberWithModifiers2.ts (2 errors) ==== var v = { public get foo() { } } ~~~~~~ !!! error TS1042: 'public' modifier cannot be used here. ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2378: A 'get' accessor must return a value. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js index 7b9c9f5d32850..b72f0351b9c82 100644 --- a/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js +++ b/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js @@ -27,15 +27,15 @@ var y = { 42: , get e() { }, set f() { }, - "this": , - "super": , - "var": , - "class": , - "typeof": + this: , + super: , + var: , + class: , + typeof: }; var x = { a: .b, a: ["ss"], a: [1] }; -var v = { "class": }; // error +var v = { class: }; // error diff --git a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt deleted file mode 100644 index 1b1426e28b20e..0000000000000 --- a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -tests/cases/compiler/objectLiteralWithGetAccessorInsideFunction.ts(3,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/objectLiteralWithGetAccessorInsideFunction.ts (1 errors) ==== - function bar() { - var x = { - get _extraOccluded() { - ~~~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var occluded = 0; - return occluded; - }, - } - } \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.symbols b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.symbols new file mode 100644 index 0000000000000..77925d5c8053f --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.symbols @@ -0,0 +1,19 @@ +=== tests/cases/compiler/objectLiteralWithGetAccessorInsideFunction.ts === +function bar() { +>bar : Symbol(bar, Decl(objectLiteralWithGetAccessorInsideFunction.ts, 0, 0)) + + var x = { +>x : Symbol(x, Decl(objectLiteralWithGetAccessorInsideFunction.ts, 1, 7)) + + get _extraOccluded() { +>_extraOccluded : Symbol(_extraOccluded, Decl(objectLiteralWithGetAccessorInsideFunction.ts, 1, 13)) + + var occluded = 0; +>occluded : Symbol(occluded, Decl(objectLiteralWithGetAccessorInsideFunction.ts, 3, 15)) + + return occluded; +>occluded : Symbol(occluded, Decl(objectLiteralWithGetAccessorInsideFunction.ts, 3, 15)) + + }, + } +} diff --git a/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.types b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.types new file mode 100644 index 0000000000000..fd229afbbad52 --- /dev/null +++ b/tests/baselines/reference/objectLiteralWithGetAccessorInsideFunction.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/objectLiteralWithGetAccessorInsideFunction.ts === +function bar() { +>bar : () => void + + var x = { +>x : { readonly _extraOccluded: number; } +>{ get _extraOccluded() { var occluded = 0; return occluded; }, } : { readonly _extraOccluded: number; } + + get _extraOccluded() { +>_extraOccluded : number + + var occluded = 0; +>occluded : number +>0 : 0 + + return occluded; +>occluded : number + + }, + } +} diff --git a/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.errors.txt b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.errors.txt new file mode 100644 index 0000000000000..d357fc6e1cb5b --- /dev/null +++ b/tests/baselines/reference/objectTypeWithStringNamedNumericProperty.errors.txt @@ -0,0 +1,153 @@ +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(33,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(34,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(64,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(65,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(94,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(95,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(124,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. +tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts(125,13): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. + + +==== tests/cases/conformance/types/members/objectTypeWithStringNamedNumericProperty.ts (8 errors) ==== + // string named numeric properties are legal and distinct when indexed by string values + // indexed numerically the value is converted to a number + // no errors expected below + + class C { + "0.1": void; + ".1": Object; + "1": number; + "1.": string; + "1..": boolean; + "1.0": Date; + "-1.0": RegExp; + "-1": Date; + } + + var c: C; + var r1 = c['0.1']; + var r2 = c['.1']; + var r3 = c['1']; + var r3 = c[1]; + var r4 = c['1.']; + var r3 = c[1.]; // same as indexing by 1 when done numerically + var r5 = c['1..']; + var r6 = c['1.0']; + var r3 = c[1.0]; // same as indexing by 1 when done numerically + // BUG 823822 + var r7 = i[-1]; + var r7 = i[-1.0]; + var r8 = i["-1.0"]; + var r9 = i["-1"]; + var r10 = i[0x1] + var r11 = i[-0x1] + var r12 = i[01] + ~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. + var r13 = i[-01] + ~~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. + + interface I { + "0.1": void; + ".1": Object; + "1": number; + "1.": string; + "1..": boolean; + "1.0": Date; + "-1.0": RegExp; + "-1": Date; + } + + var i: I; + var r1 = i['0.1']; + var r2 = i['.1']; + var r3 = i['1']; + var r3 = c[1]; + var r4 = i['1.']; + var r3 = c[1.]; // same as indexing by 1 when done numerically + var r5 = i['1..']; + var r6 = i['1.0']; + var r3 = c[1.0]; // same as indexing by 1 when done numerically + // BUG 823822 + var r7 = i[-1]; + var r7 = i[-1.0]; + var r8 = i["-1.0"]; + var r9 = i["-1"]; + var r10 = i[0x1] + var r11 = i[-0x1] + var r12 = i[01] + ~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. + var r13 = i[-01] + ~~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. + + var a: { + "0.1": void; + ".1": Object; + "1": number; + "1.": string; + "1..": boolean; + "1.0": Date; + "-1.0": RegExp; + "-1": Date; + } + + var r1 = a['0.1']; + var r2 = a['.1']; + var r3 = a['1']; + var r3 = c[1]; + var r4 = a['1.']; + var r3 = c[1.]; // same as indexing by 1 when done numerically + var r5 = a['1..']; + var r6 = a['1.0']; + var r3 = c[1.0]; // same as indexing by 1 when done numerically + // BUG 823822 + var r7 = i[-1]; + var r7 = i[-1.0]; + var r8 = i["-1.0"]; + var r9 = i["-1"]; + var r10 = i[0x1] + var r11 = i[-0x1] + var r12 = i[01] + ~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. + var r13 = i[-01] + ~~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. + + var b = { + "0.1": null, + ".1": new Object(), + "1": 1, + "1.": "", + "1..": true, + "1.0": new Date(), + "-1.0": /123/, + "-1": Date + }; + + var r1 = b['0.1']; + var r2 = b['.1']; + var r3 = b['1']; + var r3 = c[1]; + var r4 = b['1.']; + var r3 = c[1.]; // same as indexing by 1 when done numerically + var r5 = b['1..']; + var r6 = b['1.0']; + var r3 = c[1.0]; // same as indexing by 1 when done numerically + // BUG 823822 + var r7 = i[-1]; + var r7 = i[-1.0]; + var r8 = i["-1.0"]; + var r9 = i["-1"]; + var r10 = i[0x1] + var r11 = i[-0x1] + var r12 = i[01] + ~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. + var r13 = i[-01] + ~~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '-0o1'. + \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js index 0a422dbda6f0f..315e079d429bf 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x) { return ''; } }; // not a construct signature, function called new +var b = { new: function (x) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js index 5fa148b541d45..a61bedfd52f23 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x) { return ''; } }; // not a construct signature, function called new +var b = { new: function (x) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js index 6a66e8bbda3b9..c15c53b9bf80d 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js @@ -92,7 +92,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x) { return ''; } }; // not a construct signature, function called new +var b = { new: function (x) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js index e19837a9f7f2c..f8aff596dc9c5 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js @@ -109,7 +109,7 @@ var D = (function () { return D; }()); var a; -var b = { "new": function (x, y) { return ''; } }; // not a construct signature, function called new +var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js index 735c5bdc2d69c..141aa86823b27 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.js @@ -128,7 +128,7 @@ var D = (function () { return D; }()); var a; -var b = { "new": function (x, y) { return ''; } }; // not a construct signature, function called new +var b = { new: function (x, y) { return ''; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js index 6eab84a49ddb4..b651d368f334b 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js @@ -99,7 +99,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x) { return null; } }; // not a construct signature, function called new +var b = { new: function (x) { return null; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js index d927a8e082a22..ff7095c4ea1a1 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js @@ -95,7 +95,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x) { return null; } }; // not a construct signature, function called new +var b = { new: function (x) { return null; } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js index 512bebb3b0e8d..314eb700c4b19 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js @@ -87,7 +87,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x) { return x; } }; +var b = { new: function (x) { return x; } }; function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js index 80cfcd23ec9c3..182cf8263b779 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js @@ -87,7 +87,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x) { return new C(x); } }; +var b = { new: function (x) { return new C(x); } }; function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js index 87cb0b33531e5..5c5dd26c33171 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x, y) { return new C(x, y); } }; // not a construct signature, function called new +var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js index 6b0e91f817ff9..14b2ec3c0ca0a 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x, y) { return new C(x, y); } }; // not a construct signature, function called new +var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js index 55f2a0217e934..ffc238cacae09 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js @@ -91,7 +91,7 @@ var C = (function () { return C; }()); var a; -var b = { "new": function (x, y) { return new C(x, y); } }; // not a construct signature, function called new +var b = { new: function (x, y) { return new C(x, y); } }; // not a construct signature, function called new function foo1b(x) { } function foo1c(x) { } function foo2(x) { } diff --git a/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt b/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt index a884dbc500565..ce569787913eb 100644 --- a/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt +++ b/tests/baselines/reference/octalLiteralInStrictModeES3.errors.txt @@ -1,8 +1,11 @@ +tests/cases/conformance/parser/ecmascript5/StrictMode/octalLiteralInStrictModeES3.ts(2,1): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o3'. tests/cases/conformance/parser/ecmascript5/StrictMode/octalLiteralInStrictModeES3.ts(2,1): error TS1121: Octal literals are not allowed in strict mode. -==== tests/cases/conformance/parser/ecmascript5/StrictMode/octalLiteralInStrictModeES3.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/StrictMode/octalLiteralInStrictModeES3.ts (2 errors) ==== "use strict"; 03; ~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o3'. + ~~ !!! error TS1121: Octal literals are not allowed in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/optionalSetterParam.errors.txt b/tests/baselines/reference/optionalSetterParam.errors.txt index 732351671ce25..1e87132ffa798 100644 --- a/tests/baselines/reference/optionalSetterParam.errors.txt +++ b/tests/baselines/reference/optionalSetterParam.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/optionalSetterParam.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/compiler/optionalSetterParam.ts(3,25): error TS1051: A 'set' accessor cannot have an optional parameter. ==== tests/cases/compiler/optionalSetterParam.ts (1 errors) ==== class foo { public set bar(param?:any) { } - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. + ~ +!!! error TS1051: A 'set' accessor cannot have an optional parameter. } \ No newline at end of file diff --git a/tests/baselines/reference/overloadModifiersMustAgree.js b/tests/baselines/reference/overloadModifiersMustAgree.js index 783bf854a8424..44b139b30cab2 100644 --- a/tests/baselines/reference/overloadModifiersMustAgree.js +++ b/tests/baselines/reference/overloadModifiersMustAgree.js @@ -17,7 +17,7 @@ interface I { //// [overloadModifiersMustAgree.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var baz = (function () { function baz() { } diff --git a/tests/baselines/reference/packageJsonMain.js b/tests/baselines/reference/packageJsonMain.js index 8a545c490163a..e40316801bf8b 100644 --- a/tests/baselines/reference/packageJsonMain.js +++ b/tests/baselines/reference/packageJsonMain.js @@ -27,7 +27,7 @@ foo + bar + baz; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("foo"); var bar = require("bar"); var baz = require("baz"); diff --git a/tests/baselines/reference/packageJsonMain_isNonRecursive.js b/tests/baselines/reference/packageJsonMain_isNonRecursive.js index 61d98c81f112e..db02ba5bd214b 100644 --- a/tests/baselines/reference/packageJsonMain_isNonRecursive.js +++ b/tests/baselines/reference/packageJsonMain_isNonRecursive.js @@ -15,4 +15,4 @@ import foo = require("foo"); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/parser0_004152.js b/tests/baselines/reference/parser0_004152.js index b4443e0413632..6e7700ba5b5c4 100644 --- a/tests/baselines/reference/parser0_004152.js +++ b/tests/baselines/reference/parser0_004152.js @@ -6,7 +6,7 @@ export class Game { //// [parser0_004152.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Game = (function () { function Game() { this.position = new DisplayPosition([]); diff --git a/tests/baselines/reference/parser509546.js b/tests/baselines/reference/parser509546.js index e99d1d1764d67..142fa5914222b 100644 --- a/tests/baselines/reference/parser509546.js +++ b/tests/baselines/reference/parser509546.js @@ -6,7 +6,7 @@ export class Logger { //// [parser509546.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Logger = (function () { function Logger() { } diff --git a/tests/baselines/reference/parser509546_1.js b/tests/baselines/reference/parser509546_1.js index 3fc82755fbf91..23c7e4f076869 100644 --- a/tests/baselines/reference/parser509546_1.js +++ b/tests/baselines/reference/parser509546_1.js @@ -6,7 +6,7 @@ export class Logger { //// [parser509546_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Logger = (function () { function Logger() { } diff --git a/tests/baselines/reference/parser509546_2.js b/tests/baselines/reference/parser509546_2.js index c16f041b2db71..83ef574fe5d25 100644 --- a/tests/baselines/reference/parser509546_2.js +++ b/tests/baselines/reference/parser509546_2.js @@ -8,7 +8,7 @@ export class Logger { //// [parser509546_2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Logger = (function () { function Logger() { } diff --git a/tests/baselines/reference/parser618973.js b/tests/baselines/reference/parser618973.js index bfef06b061f70..e752fdf9ffb50 100644 --- a/tests/baselines/reference/parser618973.js +++ b/tests/baselines/reference/parser618973.js @@ -6,7 +6,7 @@ export export class Foo { //// [parser618973.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = (function () { function Foo() { } diff --git a/tests/baselines/reference/parserArgumentList1.js b/tests/baselines/reference/parserArgumentList1.js index 36c8f61923549..b26dc4fd87c66 100644 --- a/tests/baselines/reference/parserArgumentList1.js +++ b/tests/baselines/reference/parserArgumentList1.js @@ -7,7 +7,7 @@ export function removeClass (node:HTMLElement, className:string) { //// [parserArgumentList1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function removeClass(node, className) { node.className = node.className.replace(_classNameRegexp(className), function (everything, leftDelimiter, name, rightDelimiter) { return leftDelimiter.length + rightDelimiter.length === 2 ? ' ' : ''; diff --git a/tests/baselines/reference/parserAstSpans1.errors.txt b/tests/baselines/reference/parserAstSpans1.errors.txt index 648929e974e3e..7eb18222f7fd0 100644 --- a/tests/baselines/reference/parserAstSpans1.errors.txt +++ b/tests/baselines/reference/parserAstSpans1.errors.txt @@ -1,14 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(79,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(85,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(94,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(100,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(111,25): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(119,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(125,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(217,24): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -==== tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts (8 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts (2 errors) ==== /** i1 is interface with properties*/ interface i1 { /** i1_p1*/ @@ -88,16 +82,12 @@ tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(217,24): error TS2 } /** c2 c2_prop*/ public get c2_prop() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } public c2_nc_p1: number; public c2_nc_f1() { } public get c2_nc_prop() { - ~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } /** c2 p1*/ @@ -107,16 +97,12 @@ tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(217,24): error TS2 } /** c2 prop*/ public get prop() { - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } public nc_p1: number; public nc_f1() { } public get nc_prop() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } /** c2 constructor*/ @@ -138,16 +124,12 @@ tests/cases/conformance/parser/ecmascript5/parserAstSpans1.ts(217,24): error TS2 } /** c3 prop*/ public get prop() { - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } public nc_p1: number; public nc_f1() { } public get nc_prop() { - ~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 10; } } diff --git a/tests/baselines/reference/parserClass1.js b/tests/baselines/reference/parserClass1.js index 7fcbf29f242be..71aaca5dd4b61 100644 --- a/tests/baselines/reference/parserClass1.js +++ b/tests/baselines/reference/parserClass1.js @@ -11,7 +11,7 @@ //// [parserClass1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var NullLogger = (function () { function NullLogger() { } diff --git a/tests/baselines/reference/parserClass2.js b/tests/baselines/reference/parserClass2.js index 80c1fd8ff6ae8..e41312cca6929 100644 --- a/tests/baselines/reference/parserClass2.js +++ b/tests/baselines/reference/parserClass2.js @@ -7,7 +7,7 @@ //// [parserClass2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var LoggerAdapter = (function () { function LoggerAdapter(logger) { this.logger = logger; diff --git a/tests/baselines/reference/parserES3Accessors1.errors.txt b/tests/baselines/reference/parserES3Accessors1.errors.txt index 9c6dbf0e76f63..53fa24a9e33b2 100644 --- a/tests/baselines/reference/parserES3Accessors1.errors.txt +++ b/tests/baselines/reference/parserES3Accessors1.errors.txt @@ -1,12 +1,9 @@ -tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors1.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors1.ts(2,9): error TS2378: A 'get' accessor must return a value. -==== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors1.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors1.ts (1 errors) ==== class C { get Foo() { } ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2378: A 'get' accessor must return a value. } \ No newline at end of file diff --git a/tests/baselines/reference/parserES3Accessors2.errors.txt b/tests/baselines/reference/parserES3Accessors2.errors.txt deleted file mode 100644 index 006e31145a6c9..0000000000000 --- a/tests/baselines/reference/parserES3Accessors2.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors2.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors2.ts (1 errors) ==== - class C { - set Foo(a) { } - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/parserES3Accessors2.symbols b/tests/baselines/reference/parserES3Accessors2.symbols new file mode 100644 index 0000000000000..ba0a8aac2e5d6 --- /dev/null +++ b/tests/baselines/reference/parserES3Accessors2.symbols @@ -0,0 +1,8 @@ +=== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors2.ts === +class C { +>C : Symbol(C, Decl(parserES3Accessors2.ts, 0, 0)) + + set Foo(a) { } +>Foo : Symbol(C.Foo, Decl(parserES3Accessors2.ts, 0, 9)) +>a : Symbol(a, Decl(parserES3Accessors2.ts, 1, 12)) +} diff --git a/tests/baselines/reference/parserES3Accessors2.types b/tests/baselines/reference/parserES3Accessors2.types new file mode 100644 index 0000000000000..d945a4695376f --- /dev/null +++ b/tests/baselines/reference/parserES3Accessors2.types @@ -0,0 +1,8 @@ +=== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors2.ts === +class C { +>C : C + + set Foo(a) { } +>Foo : any +>a : any +} diff --git a/tests/baselines/reference/parserES3Accessors3.errors.txt b/tests/baselines/reference/parserES3Accessors3.errors.txt index 70ab3f2072e08..332ef8c801e8c 100644 --- a/tests/baselines/reference/parserES3Accessors3.errors.txt +++ b/tests/baselines/reference/parserES3Accessors3.errors.txt @@ -1,10 +1,7 @@ -tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors3.ts(1,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors3.ts(1,15): error TS2378: A 'get' accessor must return a value. -==== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors3.ts (2 errors) ==== +==== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors3.ts (1 errors) ==== var v = { get Foo() { } }; ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~~~ !!! error TS2378: A 'get' accessor must return a value. \ No newline at end of file diff --git a/tests/baselines/reference/parserES3Accessors4.errors.txt b/tests/baselines/reference/parserES3Accessors4.errors.txt deleted file mode 100644 index 8ac3df5ddb1da..0000000000000 --- a/tests/baselines/reference/parserES3Accessors4.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors4.ts(1,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors4.ts (1 errors) ==== - var v = { set Foo(a) { } }; - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/parserES3Accessors4.symbols b/tests/baselines/reference/parserES3Accessors4.symbols new file mode 100644 index 0000000000000..671207448dfdd --- /dev/null +++ b/tests/baselines/reference/parserES3Accessors4.symbols @@ -0,0 +1,6 @@ +=== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors4.ts === +var v = { set Foo(a) { } }; +>v : Symbol(v, Decl(parserES3Accessors4.ts, 0, 3)) +>Foo : Symbol(Foo, Decl(parserES3Accessors4.ts, 0, 9)) +>a : Symbol(a, Decl(parserES3Accessors4.ts, 0, 18)) + diff --git a/tests/baselines/reference/parserES3Accessors4.types b/tests/baselines/reference/parserES3Accessors4.types new file mode 100644 index 0000000000000..26e80a150b31a --- /dev/null +++ b/tests/baselines/reference/parserES3Accessors4.types @@ -0,0 +1,7 @@ +=== tests/cases/conformance/parser/ecmascript3/Accessors/parserES3Accessors4.ts === +var v = { set Foo(a) { } }; +>v : { Foo: any; } +>{ set Foo(a) { } } : { Foo: any; } +>Foo : any +>a : any + diff --git a/tests/baselines/reference/parserEnum1.js b/tests/baselines/reference/parserEnum1.js index 10f24cc86017d..838f92641d7ac 100644 --- a/tests/baselines/reference/parserEnum1.js +++ b/tests/baselines/reference/parserEnum1.js @@ -8,7 +8,7 @@ //// [parserEnum1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; diff --git a/tests/baselines/reference/parserEnum2.js b/tests/baselines/reference/parserEnum2.js index b1f28f6c5025a..0b673b1825d42 100644 --- a/tests/baselines/reference/parserEnum2.js +++ b/tests/baselines/reference/parserEnum2.js @@ -8,7 +8,7 @@ //// [parserEnum2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; diff --git a/tests/baselines/reference/parserEnum3.js b/tests/baselines/reference/parserEnum3.js index 3e5595911285a..8e19fd727046f 100644 --- a/tests/baselines/reference/parserEnum3.js +++ b/tests/baselines/reference/parserEnum3.js @@ -4,7 +4,7 @@ //// [parserEnum3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var SignatureFlags; (function (SignatureFlags) { })(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserEnum4.js b/tests/baselines/reference/parserEnum4.js index 90919ed8347ed..c80d1ffa73828 100644 --- a/tests/baselines/reference/parserEnum4.js +++ b/tests/baselines/reference/parserEnum4.js @@ -5,7 +5,7 @@ //// [parserEnum4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var SignatureFlags; (function (SignatureFlags) { })(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserErrantSemicolonInClass1.errors.txt b/tests/baselines/reference/parserErrantSemicolonInClass1.errors.txt index aec80ad934d03..05d93c56f284f 100644 --- a/tests/baselines/reference/parserErrantSemicolonInClass1.errors.txt +++ b/tests/baselines/reference/parserErrantSemicolonInClass1.errors.txt @@ -1,10 +1,7 @@ -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts(18,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts(24,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts(15,16): error TS1049: A 'set' accessor must have exactly one parameter. -==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts (4 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonInClass1.ts (1 errors) ==== class a { //constructor (); constructor (n: number); @@ -17,26 +14,20 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantSemicolonIn public pv; public get d() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 30; } public set d() { ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. +!!! error TS1049: A 'set' accessor must have exactly one parameter. } public static get p2() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return { x: 30, y: 40 }; } private static d2() { } private static get p3() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return "string"; } private pv3; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js index c206a30237a5e..6a703759fff75 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral2.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral2.js] var v = { a: , - "return": }; + return: }; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js index 6cee2b4272519..eecf45fea4fa0 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral3.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral3.js] var v = { a: , - "return": }; + return: }; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js index 23d17c8047b5c..87a1a31437ef7 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral4.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral4.js] var v = { a: 1, - "return": }; + return: }; diff --git a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js index 7b83132bf0fb4..97e618946a0e2 100644 --- a/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js +++ b/tests/baselines/reference/parserErrorRecovery_ObjectLiteral5.js @@ -4,4 +4,4 @@ return; //// [parserErrorRecovery_ObjectLiteral5.js] var v = { a: 1, - "return": }; + return: }; diff --git a/tests/baselines/reference/parserExportAsFunctionIdentifier.js b/tests/baselines/reference/parserExportAsFunctionIdentifier.js index 62429c76855c7..7ed76bb87d945 100644 --- a/tests/baselines/reference/parserExportAsFunctionIdentifier.js +++ b/tests/baselines/reference/parserExportAsFunctionIdentifier.js @@ -9,4 +9,4 @@ var x = f.export(); //// [parserExportAsFunctionIdentifier.js] var f; -var x = f["export"](); +var x = f.export(); diff --git a/tests/baselines/reference/parserInterfaceDeclaration6.js b/tests/baselines/reference/parserInterfaceDeclaration6.js index cbc734b534c53..ea5dfce7ad342 100644 --- a/tests/baselines/reference/parserInterfaceDeclaration6.js +++ b/tests/baselines/reference/parserInterfaceDeclaration6.js @@ -4,4 +4,4 @@ export export interface I { //// [parserInterfaceDeclaration6.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/parserInterfaceDeclaration7.js b/tests/baselines/reference/parserInterfaceDeclaration7.js index 0c52f4639ce07..62c1e3cb80d45 100644 --- a/tests/baselines/reference/parserInterfaceDeclaration7.js +++ b/tests/baselines/reference/parserInterfaceDeclaration7.js @@ -4,4 +4,4 @@ export interface I { //// [parserInterfaceDeclaration7.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/parserKeywordsAsIdentifierName1.js b/tests/baselines/reference/parserKeywordsAsIdentifierName1.js index a717abcc08ba0..c0c8c8443647f 100644 --- a/tests/baselines/reference/parserKeywordsAsIdentifierName1.js +++ b/tests/baselines/reference/parserKeywordsAsIdentifierName1.js @@ -8,7 +8,7 @@ var big = { //// [parserKeywordsAsIdentifierName1.js] var big = { - "break": 0, - "super": 0, - "const": 0 + break: 0, + super: 0, + const: 0 }; diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock1.js b/tests/baselines/reference/parserModifierOnStatementInBlock1.js index 43c1e4bf84588..8cc12f052d0c5 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock1.js +++ b/tests/baselines/reference/parserModifierOnStatementInBlock1.js @@ -6,7 +6,7 @@ export function foo() { //// [parserModifierOnStatementInBlock1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { export var x = this; } diff --git a/tests/baselines/reference/parserModifierOnStatementInBlock3.js b/tests/baselines/reference/parserModifierOnStatementInBlock3.js index 85c3d6da0a4c5..532a15bfd083f 100644 --- a/tests/baselines/reference/parserModifierOnStatementInBlock3.js +++ b/tests/baselines/reference/parserModifierOnStatementInBlock3.js @@ -7,7 +7,7 @@ export function foo() { //// [parserModifierOnStatementInBlock3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { export function bar() { } diff --git a/tests/baselines/reference/parserModule1.js b/tests/baselines/reference/parserModule1.js index 484c74f721c62..7ee402db9d08e 100644 --- a/tests/baselines/reference/parserModule1.js +++ b/tests/baselines/reference/parserModule1.js @@ -33,7 +33,7 @@ //// [parserModule1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var CompilerDiagnostics; (function (CompilerDiagnostics) { CompilerDiagnostics.debug = false; diff --git a/tests/baselines/reference/parserReturnStatement4.errors.txt b/tests/baselines/reference/parserReturnStatement4.errors.txt deleted file mode 100644 index 5ddb8e2e8de18..0000000000000 --- a/tests/baselines/reference/parserReturnStatement4.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement4.ts(1,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement4.ts (1 errors) ==== - var v = { get foo() { return } }; - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. \ No newline at end of file diff --git a/tests/baselines/reference/parserReturnStatement4.symbols b/tests/baselines/reference/parserReturnStatement4.symbols new file mode 100644 index 0000000000000..0f533c8c4efa0 --- /dev/null +++ b/tests/baselines/reference/parserReturnStatement4.symbols @@ -0,0 +1,5 @@ +=== tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement4.ts === +var v = { get foo() { return } }; +>v : Symbol(v, Decl(parserReturnStatement4.ts, 0, 3)) +>foo : Symbol(foo, Decl(parserReturnStatement4.ts, 0, 9)) + diff --git a/tests/baselines/reference/parserReturnStatement4.types b/tests/baselines/reference/parserReturnStatement4.types new file mode 100644 index 0000000000000..fdb0346deea39 --- /dev/null +++ b/tests/baselines/reference/parserReturnStatement4.types @@ -0,0 +1,6 @@ +=== tests/cases/conformance/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement4.ts === +var v = { get foo() { return } }; +>v : { readonly foo: void; } +>{ get foo() { return } } : { readonly foo: void; } +>foo : void + diff --git a/tests/baselines/reference/parserShorthandPropertyAssignment2.js b/tests/baselines/reference/parserShorthandPropertyAssignment2.js index 95d2f32ffad0e..0de0fa3829fc6 100644 --- a/tests/baselines/reference/parserShorthandPropertyAssignment2.js +++ b/tests/baselines/reference/parserShorthandPropertyAssignment2.js @@ -2,4 +2,4 @@ var v = { class }; //// [parserShorthandPropertyAssignment2.js] -var v = { "class": }; +var v = { class: }; diff --git a/tests/baselines/reference/parserSuperExpression3.js b/tests/baselines/reference/parserSuperExpression3.js index 064353669c80c..f311efcd0f6a8 100644 --- a/tests/baselines/reference/parserSuperExpression3.js +++ b/tests/baselines/reference/parserSuperExpression3.js @@ -10,7 +10,7 @@ var C = (function () { function C() { } C.prototype.M = function () { - this["super"](0); + this.super(0); }; return C; }()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js index e8c026429f164..ef34f4285354f 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_classic.js @@ -5,6 +5,6 @@ export var x = 1; //// [f1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution1_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.js index 6439d35aadf48..8bea317f07fe5 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution1_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution1_node.js @@ -4,5 +4,5 @@ export var x = 1; //// [f1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.js index df5115d536042..3a15ccad8c897 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.js @@ -4,6 +4,6 @@ export var x = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.js index a0c8d5df7ded6..dadb8e760cdb1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.js @@ -3,5 +3,5 @@ export var x = 1; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js index 16ef9260e8d12..1ff2aaf0c91fb 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.js @@ -21,25 +21,25 @@ export var y = 100; //// [file3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [file4.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.y = 100; }); //// [file2.js] define(["require", "exports", "./file3", "file4"], function (require, exports, file3_1, file4_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = file3_1.x + file4_1.y; }); //// [file1.js] // baseUrl set via command line define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); use(file2_1.x.toExponential()); }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js index 969a98dc4cc21..89288848adfb3 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.js @@ -20,17 +20,17 @@ export var y: number; //// [file3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file3_1 = require("./file3"); // found with baseurl var file4_1 = require("file4"); // found with fallback exports.x = file3_1.x + file4_1.y; //// [file1.js] "use strict"; // baseUrl set via command line -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file2_1 = require("folder2/file2"); use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js index 2a8254fb69687..77cddcb0d325c 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.js @@ -19,24 +19,24 @@ export var y = 100; //// [file3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [file4.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.y = 100; }); //// [file2.js] define(["require", "exports", "./file3", "file4"], function (require, exports, file3_1, file4_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = file3_1.x + file4_1.y; }); //// [file1.js] define(["require", "exports", "folder2/file2"], function (require, exports, file2_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); use(file2_1.x.toExponential()); }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.js index ff1a51662b062..07d07c76fb54b 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.js @@ -18,16 +18,16 @@ export var y: number; //// [file3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file3_1 = require("./file3"); // found with baseurl var file4_1 = require("file4"); // found with fallback exports.x = file3_1.x + file4_1.y; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file2_1 = require("folder2/file2"); use(file2_1.x.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.js index 1b9782660d8e9..02d922e1e1345 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.js @@ -28,31 +28,31 @@ export var z1 = 1; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); //// [file2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.y = 1; }); //// [file3.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.z = 1; }); //// [file4.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.z1 = 1; }); //// [file1.js] define(["require", "exports", "folder2/file1", "folder3/file2", "components/file3", "file4"], function (require, exports, file1_1, file2_1, file3_1, file4_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); use(file1_1.x.toExponential()); use(file2_1.y.toExponential()); use(file3_1.z.toExponential()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.js index 7d10c4d4a8bb5..509fe4cd8ea48 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.js @@ -27,19 +27,19 @@ export var z1 = 1; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.y = 1; //// [file4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.z1 = 1; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file1_1 = require("folder2/file1"); var file2_1 = require("folder3/file2"); var file3_1 = require("components/file3"); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js index 3289efd02095f..a6319187abac1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.js @@ -14,12 +14,12 @@ export {x} from "../file2"; //// [file3.js] define(["require", "exports", "../file2"], function (require, exports, file2_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = file2_1.x; }); //// [file1.js] define(["require", "exports", "./project/file3"], function (require, exports, file3_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); use(file3_1.x.toExponential()); }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js index 74c0f40758abc..99f319c64dec1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.js @@ -13,11 +13,11 @@ export {x} from "../file2"; //// [file3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file2_1 = require("../file2"); exports.x = file2_1.x; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file3_1 = require("./project/file3"); use(file3_1.x.toFixed()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js index 55aca054e8249..a8f165152f284 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.js @@ -31,18 +31,18 @@ export let y: number; //// [module2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [file2.js] define(["require", "exports", "module1", "templates/module2", "../file3"], function (require, exports, module1_1, module2_1, file3_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = module1_1.a + module2_1.b + file3_1.x; }); //// [file1.js] define(["require", "exports", "./project/file2", "module3"], function (require, exports, file2_1, module3_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); use(file2_1.x.toFixed()); use(module3_1.y.toFixed()); }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js index 303b98f4d83de..4f1e9101634a5 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.js @@ -30,17 +30,17 @@ export let y: number; //// [module2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var module1_1 = require("module1"); var module2_1 = require("templates/module2"); var file3_1 = require("../file3"); exports.x = module1_1.a + module2_1.b + file3_1.x; //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file2_1 = require("./project/file2"); var module3_1 = require("module3"); use(file2_1.x.toFixed()); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.js b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.js index 3a31b8cd95020..36505cff12779 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.js @@ -13,14 +13,14 @@ import { bar } from "bar"; //// [foo.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { } exports.foo = foo; //// [bar.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function bar() { } exports.bar = bar; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.js b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.js index e40fe32f46bfe..2191cabeb5e6a 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.js +++ b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.js @@ -4,4 +4,4 @@ import { foo } from "foo"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/prespecializedGenericMembers1.js b/tests/baselines/reference/prespecializedGenericMembers1.js index f7e41263237d6..2d545bbb68429 100644 --- a/tests/baselines/reference/prespecializedGenericMembers1.js +++ b/tests/baselines/reference/prespecializedGenericMembers1.js @@ -22,7 +22,7 @@ var catBag = new CatBag(catThing); //// [prespecializedGenericMembers1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Cat = (function () { function Cat() { } diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js index 9da4e922f77bf..e86795051bc46 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js @@ -101,7 +101,7 @@ var privateVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4() //// [privacyCannotNameVarTypeDeclFile_GlobalWidgets.js] //// [privacyCannotNameVarTypeDeclFile_Widgets.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -129,7 +129,7 @@ var SpecializedWidget; })(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyCannotNameVarTypeDeclFile_exporter.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var Widgets = require("./privacyCannotNameVarTypeDeclFile_Widgets"); var Widgets1 = require("GlobalWidgets"); @@ -151,7 +151,7 @@ function createExportedWidget4() { exports.createExportedWidget4 = createExportedWidget4; //// [privacyCannotNameVarTypeDeclFile_consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var exporter = require("./privacyCannotNameVarTypeDeclFile_exporter"); var publicClassWithWithPrivatePropertyTypes = (function () { function publicClassWithWithPrivatePropertyTypes() { diff --git a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js index 8ddcc60a8ff19..aa489b948db3f 100644 --- a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js +++ b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter.js @@ -18,7 +18,7 @@ module Query { //// [privacyCheckAnonymousFunctionParameter.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; // Makes this an external module var Query; (function (Query) { diff --git a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js index f18f47c20c312..01dbb1c2e3979 100644 --- a/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js +++ b/tests/baselines/reference/privacyCheckAnonymousFunctionParameter2.js @@ -17,7 +17,7 @@ module Q { //// [privacyCheckAnonymousFunctionParameter2.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; // Makes this an external module var Q; (function (Q) { diff --git a/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js b/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js index 98e87342287f6..12e3fff5c46f3 100644 --- a/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js +++ b/tests/baselines/reference/privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js @@ -10,7 +10,7 @@ export interface B extends A { //// [privacyCheckCallbackOfInterfaceMethodWithTypeParameter.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js b/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js index b8e8139675bcd..3995c96de72eb 100644 --- a/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js +++ b/tests/baselines/reference/privacyCheckExternalModuleExportAssignmentOfGenericClass.js @@ -24,7 +24,7 @@ var Foo = (function () { module.exports = Foo; //// [privacyCheckExternalModuleExportAssignmentOfGenericClass_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [privacyCheckExternalModuleExportAssignmentOfGenericClass_0.d.ts] diff --git a/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js b/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js index dc868d86bff76..f5d7b5377ecb7 100644 --- a/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js +++ b/tests/baselines/reference/privacyCheckOnTypeParameterReferenceInConstructorParameter.js @@ -13,7 +13,7 @@ export class B { //// [privacyCheckOnTypeParameterReferenceInConstructorParameter.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A(callback) { var child = new B(this); diff --git a/tests/baselines/reference/privacyCheckTypeOfFunction.js b/tests/baselines/reference/privacyCheckTypeOfFunction.js index 614bcedebe0de..53a99b1f90b06 100644 --- a/tests/baselines/reference/privacyCheckTypeOfFunction.js +++ b/tests/baselines/reference/privacyCheckTypeOfFunction.js @@ -7,7 +7,7 @@ export var b = foo; //// [privacyCheckTypeOfFunction.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { } exports.b = foo; diff --git a/tests/baselines/reference/privacyClass.js b/tests/baselines/reference/privacyClass.js index 95b12f4e2fa4f..1fb4758be7752 100644 --- a/tests/baselines/reference/privacyClass.js +++ b/tests/baselines/reference/privacyClass.js @@ -139,7 +139,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1; (function (m1) { var m1_c_public = (function () { diff --git a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js index 857d52e99bf17..a3a0059482030 100644 --- a/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassExtendsClauseDeclFile.js @@ -108,7 +108,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var publicModule; (function (publicModule) { var publicClassInPublicModule = (function () { diff --git a/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js b/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js index f4d48aae39d63..50bc9d4da35f4 100644 --- a/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js +++ b/tests/baselines/reference/privacyClassImplementsClauseDeclFile.js @@ -95,7 +95,7 @@ class publicClassImplementingPublicInterfaceInGlobal implements publicInterfaceI //// [privacyClassImplementsClauseDeclFile_externalModule.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var publicModule; (function (publicModule) { var privateClassImplementingPublicInterfaceInModule = (function () { diff --git a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js index 6b0ea3cafd220..0d73df0bc8c4d 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js @@ -157,7 +157,7 @@ function privateFunctionWithPrivateModuleParameterTypes1(param= exporter.createE //// [privacyFunctionCannotNameParameterTypeDeclFile_GlobalWidgets.js] //// [privacyFunctionCannotNameParameterTypeDeclFile_Widgets.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -185,7 +185,7 @@ var SpecializedWidget; })(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyFunctionCannotNameParameterTypeDeclFile_exporter.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var Widgets = require("./privacyFunctionCannotNameParameterTypeDeclFile_Widgets"); var Widgets1 = require("GlobalWidgets"); @@ -207,7 +207,7 @@ function createExportedWidget4() { exports.createExportedWidget4 = createExportedWidget4; //// [privacyFunctionCannotNameParameterTypeDeclFile_consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var exporter = require("./privacyFunctionCannotNameParameterTypeDeclFile_exporter"); var publicClassWithWithPrivateParmeterTypes = (function () { function publicClassWithWithPrivateParmeterTypes(param, param1, param2) { diff --git a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js index 61c7e0014db74..45d60edc44342 100644 --- a/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionCannotNameReturnTypeDeclFile.js @@ -164,7 +164,7 @@ function privateFunctionWithPrivateModuleReturnTypes1() { //// [privacyFunctionReturnTypeDeclFile_GlobalWidgets.js] //// [privacyFunctionReturnTypeDeclFile_Widgets.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Widget1 = (function () { function Widget1() { this.name = 'one'; @@ -192,7 +192,7 @@ var SpecializedWidget; })(SpecializedWidget = exports.SpecializedWidget || (exports.SpecializedWidget = {})); //// [privacyFunctionReturnTypeDeclFile_exporter.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var Widgets = require("./privacyFunctionReturnTypeDeclFile_Widgets"); var Widgets1 = require("GlobalWidgets"); @@ -214,7 +214,7 @@ function createExportedWidget4() { exports.createExportedWidget4 = createExportedWidget4; //// [privacyFunctionReturnTypeDeclFile_consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var exporter = require("./privacyFunctionReturnTypeDeclFile_exporter"); var publicClassWithWithPrivateParmeterTypes = (function () { function publicClassWithWithPrivateParmeterTypes() { diff --git a/tests/baselines/reference/privacyFunctionParameterDeclFile.js b/tests/baselines/reference/privacyFunctionParameterDeclFile.js index db00fb67d8a21..9729712d8ab10 100644 --- a/tests/baselines/reference/privacyFunctionParameterDeclFile.js +++ b/tests/baselines/reference/privacyFunctionParameterDeclFile.js @@ -687,7 +687,7 @@ module publicModuleInGlobal { //// [privacyFunctionParameterDeclFile_externalModule.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js b/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js index d3136f4310ed3..edea643cbcfe0 100644 --- a/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js +++ b/tests/baselines/reference/privacyFunctionReturnTypeDeclFile.js @@ -1194,7 +1194,7 @@ module publicModuleInGlobal { //// [privacyFunctionReturnTypeDeclFile_externalModule.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyGloFunc.js b/tests/baselines/reference/privacyGloFunc.js index 6bc177946809c..0b457687514f9 100644 --- a/tests/baselines/reference/privacyGloFunc.js +++ b/tests/baselines/reference/privacyGloFunc.js @@ -533,7 +533,7 @@ export function f12_public(): C5_private { //error //// [privacyGloFunc.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m1; (function (m1) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyImport.js b/tests/baselines/reference/privacyImport.js index 1a3dc9d9b1891..7167a65be5c24 100644 --- a/tests/baselines/reference/privacyImport.js +++ b/tests/baselines/reference/privacyImport.js @@ -358,7 +358,7 @@ export module m3 { //// [privacyImport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1; (function (m1) { var m1_M1_public; diff --git a/tests/baselines/reference/privacyImportParseErrors.js b/tests/baselines/reference/privacyImportParseErrors.js index 5a15a7280ecdf..fe6b357f16509 100644 --- a/tests/baselines/reference/privacyImportParseErrors.js +++ b/tests/baselines/reference/privacyImportParseErrors.js @@ -358,7 +358,7 @@ export module m3 { //// [privacyImportParseErrors.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1; (function (m1) { var m1_M1_public; diff --git a/tests/baselines/reference/privacyInterface.js b/tests/baselines/reference/privacyInterface.js index 360f1683b6a27..e7e1e3ddf1c23 100644 --- a/tests/baselines/reference/privacyInterface.js +++ b/tests/baselines/reference/privacyInterface.js @@ -266,7 +266,7 @@ export interface glo_C6_public extends glo_i_private, glo_i_public { //// [privacyInterface.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1; (function (m1) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js b/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js index cb25b2b5ff93b..23991f27674ca 100644 --- a/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js +++ b/tests/baselines/reference/privacyInterfaceExtendsClauseDeclFile.js @@ -95,5 +95,5 @@ interface publicInterfaceImplementingPublicInterfaceInGlobal extends publicInter //// [privacyInterfaceExtendsClauseDeclFile_externalModule.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [privacyInterfaceExtendsClauseDeclFile_GlobalFile.js] diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js index 408abc049405b..44645b2c5c9ab 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js @@ -154,7 +154,7 @@ module import_private { //// [privacyLocalInternalReferenceImportWithExport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js index 8b158d7cc3d18..ad9a2655bda31 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js @@ -155,7 +155,7 @@ module import_private { //// [privacyLocalInternalReferenceImportWithoutExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js index 312d682669c28..622619cf336e4 100644 --- a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithExport.js @@ -52,7 +52,7 @@ export var publicUse_im_public_mi_public = new im_public_mi_public.c_private(); //// [privacyTopLevelAmbientExternalModuleImportWithExport_require3.js] //// [privacyTopLevelAmbientExternalModuleImportWithExport_require.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Public elements var c_public = (function () { function c_public() { @@ -62,7 +62,7 @@ var c_public = (function () { exports.c_public = c_public; //// [privacyTopLevelAmbientExternalModuleImportWithExport_require1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var c_public = (function () { function c_public() { } @@ -71,7 +71,7 @@ var c_public = (function () { exports.c_public = c_public; //// [privacyTopLevelAmbientExternalModuleImportWithExport_core.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// /// // Privacy errors - importing private elements diff --git a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js index de464ddd11a6a..c8f8e75eafe26 100644 --- a/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelAmbientExternalModuleImportWithoutExport.js @@ -52,7 +52,7 @@ export var publicUse_im_private_mi_public = new im_private_mi_public.c_public(); //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_require.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // Public elements var c_public = (function () { function c_public() { @@ -64,7 +64,7 @@ define(["require", "exports"], function (require, exports) { //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_require1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var c_public = (function () { function c_public() { } @@ -75,7 +75,7 @@ define(["require", "exports"], function (require, exports) { //// [privacyTopLevelAmbientExternalModuleImportWithoutExport_core.js] define(["require", "exports", "m", "m2", "privacyTopLevelAmbientExternalModuleImportWithoutExport_require"], function (require, exports, im_private_mi_private, im_private_mu_private, im_private_mi_public) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // Usage of privacy error imports var privateUse_im_private_mi_private = new im_private_mi_private.c_private(); exports.publicUse_im_private_mi_private = new im_private_mi_private.c_private(); diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js index a89d49609e9cc..1a281295bff60 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js @@ -102,7 +102,7 @@ export var publicUse_im_public_mu_public: im_public_mu_public.i; //// [privacyTopLevelInternalReferenceImportWithExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js index 8646cbe6f7583..6b0823f47d688 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js @@ -102,7 +102,7 @@ export var publicUse_im_private_mu_public: im_private_mu_public.i; //// [privacyTopLevelInternalReferenceImportWithoutExport.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // private elements var m_private; (function (m_private) { diff --git a/tests/baselines/reference/privacyTypeParameterOfFunction.js b/tests/baselines/reference/privacyTypeParameterOfFunction.js index 98e0a57d59ea3..274366d2edb23 100644 --- a/tests/baselines/reference/privacyTypeParameterOfFunction.js +++ b/tests/baselines/reference/privacyTypeParameterOfFunction.js @@ -134,7 +134,7 @@ function privateFunctionWithPublicTypeParametersWithoutExtends() { //// [privacyTypeParameterOfFunction.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js b/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js index f5fdf6dfff868..46fc5b996d74e 100644 --- a/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js +++ b/tests/baselines/reference/privacyTypeParameterOfFunctionDeclFile.js @@ -440,7 +440,7 @@ module privateModule { //// [privacyTypeParameterOfFunctionDeclFile.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfClass.js b/tests/baselines/reference/privacyTypeParametersOfClass.js index ba1a9bd10e07a..b5b5a1fd20577 100644 --- a/tests/baselines/reference/privacyTypeParametersOfClass.js +++ b/tests/baselines/reference/privacyTypeParametersOfClass.js @@ -45,7 +45,7 @@ class privateClassWithPublicTypeParametersWithoutExtends { //// [privacyTypeParametersOfClass.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js b/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js index 8e21589de4229..6abaffa823056 100644 --- a/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js +++ b/tests/baselines/reference/privacyTypeParametersOfClassDeclFile.js @@ -156,7 +156,7 @@ module privateModule { //// [privacyTypeParametersOfClassDeclFile.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfInterface.js b/tests/baselines/reference/privacyTypeParametersOfInterface.js index 0b511a01f06d9..522733eea4e1a 100644 --- a/tests/baselines/reference/privacyTypeParametersOfInterface.js +++ b/tests/baselines/reference/privacyTypeParametersOfInterface.js @@ -60,7 +60,7 @@ interface privateInterfaceWithPublicTypeParametersWithoutExtends { //// [privacyTypeParametersOfInterface.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js b/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js index f7d107b5855fb..51d5c67d75660 100644 --- a/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js +++ b/tests/baselines/reference/privacyTypeParametersOfInterfaceDeclFile.js @@ -192,7 +192,7 @@ module privateModule { //// [privacyTypeParametersOfInterfaceDeclFile.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privacyVar.js b/tests/baselines/reference/privacyVar.js index 4c97d273c3e98..2fe6ec087af1f 100644 --- a/tests/baselines/reference/privacyVar.js +++ b/tests/baselines/reference/privacyVar.js @@ -176,7 +176,7 @@ export var glo_v24_public: glo_C2_private = new glo_C2_private(); // error //// [privacyVar.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1; (function (m1) { var C1_public = (function () { diff --git a/tests/baselines/reference/privacyVarDeclFile.js b/tests/baselines/reference/privacyVarDeclFile.js index b32fac91085d9..454bb68364ea9 100644 --- a/tests/baselines/reference/privacyVarDeclFile.js +++ b/tests/baselines/reference/privacyVarDeclFile.js @@ -426,7 +426,7 @@ module publicModuleInGlobal { //// [privacyVarDeclFile_externalModule.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.errors.txt b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.errors.txt deleted file mode 100644 index 594ed3807a1f1..0000000000000 --- a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.errors.txt +++ /dev/null @@ -1,58 +0,0 @@ -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(5,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(6,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(10,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(11,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(19,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(20,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(24,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts(25,24): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts (8 errors) ==== - // no errors - - class C { - private x: string; - private get y() { return this.x; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - private set y(x) { this.y = this.x; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - private foo() { return this.foo; } - - private static x: string; - private static get y() { return this.x; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - private static set y(x) { this.y = this.x; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - private static foo() { return this.foo; } - private static bar() { this.foo(); } - } - - // added level of function nesting - class C2 { - private x: string; - private get y() { () => this.x; return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - private set y(x) { () => { this.y = this.x; } } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - private foo() { () => this.foo; } - - private static x: string; - private static get y() { () => this.x; return null; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - private static set y(x) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - () => { this.y = this.x; } - } - private static foo() { () => this.foo; } - private static bar() { () => this.foo(); } - } - \ No newline at end of file diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.symbols b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.symbols new file mode 100644 index 0000000000000..17c8e03e9187f --- /dev/null +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.symbols @@ -0,0 +1,126 @@ +=== tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts === +// no errors + +class C { +>C : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) + + private x: string; +>x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 2, 9)) + + private get y() { return this.x; } +>y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 3, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 4, 38)) +>this.x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 2, 9)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 2, 9)) + + private set y(x) { this.y = this.x; } +>y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 3, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 4, 38)) +>x : Symbol(x, Decl(privateClassPropertyAccessibleWithinClass.ts, 5, 18)) +>this.y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 3, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 4, 38)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 3, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 4, 38)) +>this.x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 2, 9)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 2, 9)) + + private foo() { return this.foo; } +>foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 5, 41)) +>this.foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 5, 41)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 5, 41)) + + private static x: string; +>x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 6, 38)) + + private static get y() { return this.x; } +>y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 8, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 9, 45)) +>this.x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 6, 38)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 6, 38)) + + private static set y(x) { this.y = this.x; } +>y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 8, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 9, 45)) +>x : Symbol(x, Decl(privateClassPropertyAccessibleWithinClass.ts, 10, 25)) +>this.y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 8, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 9, 45)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>y : Symbol(C.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 8, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 9, 45)) +>this.x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 6, 38)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>x : Symbol(C.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 6, 38)) + + private static foo() { return this.foo; } +>foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 10, 48)) +>this.foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 10, 48)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 10, 48)) + + private static bar() { this.foo(); } +>bar : Symbol(C.bar, Decl(privateClassPropertyAccessibleWithinClass.ts, 11, 45)) +>this.foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 10, 48)) +>this : Symbol(C, Decl(privateClassPropertyAccessibleWithinClass.ts, 0, 0)) +>foo : Symbol(C.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 10, 48)) +} + +// added level of function nesting +class C2 { +>C2 : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) + + private x: string; +>x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 16, 10)) + + private get y() { () => this.x; return null; } +>y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 17, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 18, 50)) +>this.x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 16, 10)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 16, 10)) + + private set y(x) { () => { this.y = this.x; } } +>y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 17, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 18, 50)) +>x : Symbol(x, Decl(privateClassPropertyAccessibleWithinClass.ts, 19, 18)) +>this.y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 17, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 18, 50)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 17, 22), Decl(privateClassPropertyAccessibleWithinClass.ts, 18, 50)) +>this.x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 16, 10)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 16, 10)) + + private foo() { () => this.foo; } +>foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 19, 51)) +>this.foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 19, 51)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 19, 51)) + + private static x: string; +>x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 20, 37)) + + private static get y() { () => this.x; return null; } +>y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 22, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 23, 57)) +>this.x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 20, 37)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 20, 37)) + + private static set y(x) { +>y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 22, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 23, 57)) +>x : Symbol(x, Decl(privateClassPropertyAccessibleWithinClass.ts, 24, 25)) + + () => { this.y = this.x; } +>this.y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 22, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 23, 57)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>y : Symbol(C2.y, Decl(privateClassPropertyAccessibleWithinClass.ts, 22, 29), Decl(privateClassPropertyAccessibleWithinClass.ts, 23, 57)) +>this.x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 20, 37)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>x : Symbol(C2.x, Decl(privateClassPropertyAccessibleWithinClass.ts, 20, 37)) + } + private static foo() { () => this.foo; } +>foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 26, 6)) +>this.foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 26, 6)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 26, 6)) + + private static bar() { () => this.foo(); } +>bar : Symbol(C2.bar, Decl(privateClassPropertyAccessibleWithinClass.ts, 27, 44)) +>this.foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 26, 6)) +>this : Symbol(C2, Decl(privateClassPropertyAccessibleWithinClass.ts, 13, 1)) +>foo : Symbol(C2.foo, Decl(privateClassPropertyAccessibleWithinClass.ts, 26, 6)) +} + diff --git a/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types new file mode 100644 index 0000000000000..56aedbe253545 --- /dev/null +++ b/tests/baselines/reference/privateClassPropertyAccessibleWithinClass.types @@ -0,0 +1,141 @@ +=== tests/cases/conformance/classes/members/accessibility/privateClassPropertyAccessibleWithinClass.ts === +// no errors + +class C { +>C : C + + private x: string; +>x : string + + private get y() { return this.x; } +>y : string +>this.x : string +>this : this +>x : string + + private set y(x) { this.y = this.x; } +>y : string +>x : string +>this.y = this.x : string +>this.y : string +>this : this +>y : string +>this.x : string +>this : this +>x : string + + private foo() { return this.foo; } +>foo : () => any +>this.foo : () => any +>this : this +>foo : () => any + + private static x: string; +>x : string + + private static get y() { return this.x; } +>y : string +>this.x : string +>this : typeof C +>x : string + + private static set y(x) { this.y = this.x; } +>y : string +>x : string +>this.y = this.x : string +>this.y : string +>this : typeof C +>y : string +>this.x : string +>this : typeof C +>x : string + + private static foo() { return this.foo; } +>foo : () => typeof C.foo +>this.foo : () => typeof C.foo +>this : typeof C +>foo : () => typeof C.foo + + private static bar() { this.foo(); } +>bar : () => void +>this.foo() : () => typeof C.foo +>this.foo : () => typeof C.foo +>this : typeof C +>foo : () => typeof C.foo +} + +// added level of function nesting +class C2 { +>C2 : C2 + + private x: string; +>x : string + + private get y() { () => this.x; return null; } +>y : any +>() => this.x : () => string +>this.x : string +>this : this +>x : string +>null : null + + private set y(x) { () => { this.y = this.x; } } +>y : any +>x : any +>() => { this.y = this.x; } : () => void +>this.y = this.x : string +>this.y : any +>this : this +>y : any +>this.x : string +>this : this +>x : string + + private foo() { () => this.foo; } +>foo : () => void +>() => this.foo : () => () => void +>this.foo : () => void +>this : this +>foo : () => void + + private static x: string; +>x : string + + private static get y() { () => this.x; return null; } +>y : any +>() => this.x : () => string +>this.x : string +>this : typeof C2 +>x : string +>null : null + + private static set y(x) { +>y : any +>x : any + + () => { this.y = this.x; } +>() => { this.y = this.x; } : () => void +>this.y = this.x : string +>this.y : any +>this : typeof C2 +>y : any +>this.x : string +>this : typeof C2 +>x : string + } + private static foo() { () => this.foo; } +>foo : () => void +>() => this.foo : () => () => void +>this.foo : () => void +>this : typeof C2 +>foo : () => void + + private static bar() { () => this.foo(); } +>bar : () => void +>() => this.foo() : () => void +>this.foo() : void +>this.foo : () => void +>this : typeof C2 +>foo : () => void +} + diff --git a/tests/baselines/reference/privatePropertyUsingObjectType.js b/tests/baselines/reference/privatePropertyUsingObjectType.js index 65e2129a5fc9f..48dc840eb11e7 100644 --- a/tests/baselines/reference/privatePropertyUsingObjectType.js +++ b/tests/baselines/reference/privatePropertyUsingObjectType.js @@ -12,7 +12,7 @@ export interface IFilterProvider { //// [privatePropertyUsingObjectType.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var FilterManager = (function () { function FilterManager() { } diff --git a/tests/baselines/reference/project/baseline/amd/decl.js b/tests/baselines/reference/project/baseline/amd/decl.js index 1e03f7745d259..e56f886ee7101 100644 --- a/tests/baselines/reference/project/baseline/amd/decl.js +++ b/tests/baselines/reference/project/baseline/amd/decl.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline/amd/emit.js b/tests/baselines/reference/project/baseline/amd/emit.js index b4d6d12445bc9..647ea7c6c8ece 100644 --- a/tests/baselines/reference/project/baseline/amd/emit.js +++ b/tests/baselines/reference/project/baseline/amd/emit.js @@ -1,5 +1,5 @@ define(["require", "exports", "./decl"], function (require, exports, g) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var p = g.point(10, 20); }); diff --git a/tests/baselines/reference/project/baseline/node/decl.js b/tests/baselines/reference/project/baseline/node/decl.js index b7047c3f0473f..ecd7de642875d 100644 --- a/tests/baselines/reference/project/baseline/node/decl.js +++ b/tests/baselines/reference/project/baseline/node/decl.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline/node/emit.js b/tests/baselines/reference/project/baseline/node/emit.js index 9410f82bc328e..90c9a1547d2fa 100644 --- a/tests/baselines/reference/project/baseline/node/emit.js +++ b/tests/baselines/reference/project/baseline/node/emit.js @@ -1,4 +1,4 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var g = require("./decl"); var p = g.point(10, 20); diff --git a/tests/baselines/reference/project/baseline2/amd/decl.js b/tests/baselines/reference/project/baseline2/amd/decl.js index 1e03f7745d259..e56f886ee7101 100644 --- a/tests/baselines/reference/project/baseline2/amd/decl.js +++ b/tests/baselines/reference/project/baseline2/amd/decl.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline2/amd/dont_emit.js b/tests/baselines/reference/project/baseline2/amd/dont_emit.js index 18dae0f6420b3..e93727df1a631 100644 --- a/tests/baselines/reference/project/baseline2/amd/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/amd/dont_emit.js @@ -1,5 +1,5 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var p = { x: 10, y: 20 }; }); diff --git a/tests/baselines/reference/project/baseline2/node/decl.js b/tests/baselines/reference/project/baseline2/node/decl.js index b7047c3f0473f..ecd7de642875d 100644 --- a/tests/baselines/reference/project/baseline2/node/decl.js +++ b/tests/baselines/reference/project/baseline2/node/decl.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); ; function point(x, y) { return { x: x, y: y }; diff --git a/tests/baselines/reference/project/baseline2/node/dont_emit.js b/tests/baselines/reference/project/baseline2/node/dont_emit.js index ce766eee086a3..76446389a37e7 100644 --- a/tests/baselines/reference/project/baseline2/node/dont_emit.js +++ b/tests/baselines/reference/project/baseline2/node/dont_emit.js @@ -1,3 +1,3 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var p = { x: 10, y: 20 }; diff --git a/tests/baselines/reference/project/baseline3/amd/nestedModule.js b/tests/baselines/reference/project/baseline3/amd/nestedModule.js index c4f4e37489dbe..42c02546516a3 100644 --- a/tests/baselines/reference/project/baseline3/amd/nestedModule.js +++ b/tests/baselines/reference/project/baseline3/amd/nestedModule.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var outer; (function (outer) { var inner; diff --git a/tests/baselines/reference/project/baseline3/node/nestedModule.js b/tests/baselines/reference/project/baseline3/node/nestedModule.js index 345fd8914cc6f..beb22615bf18e 100644 --- a/tests/baselines/reference/project/baseline3/node/nestedModule.js +++ b/tests/baselines/reference/project/baseline3/node/nestedModule.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var outer; (function (outer) { var inner; diff --git a/tests/baselines/reference/project/declarationDir/amd/a.js b/tests/baselines/reference/project/declarationDir/amd/a.js index 4db463a796620..a1f1c3d9bd0b5 100644 --- a/tests/baselines/reference/project/declarationDir/amd/a.js +++ b/tests/baselines/reference/project/declarationDir/amd/a.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } diff --git a/tests/baselines/reference/project/declarationDir/amd/subfolder/b.js b/tests/baselines/reference/project/declarationDir/amd/subfolder/b.js index bdae3c44b0aa1..ca3818a53d729 100644 --- a/tests/baselines/reference/project/declarationDir/amd/subfolder/b.js +++ b/tests/baselines/reference/project/declarationDir/amd/subfolder/b.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } diff --git a/tests/baselines/reference/project/declarationDir/amd/subfolder/c.js b/tests/baselines/reference/project/declarationDir/amd/subfolder/c.js index ff657652a4a98..d8b60f0daec58 100644 --- a/tests/baselines/reference/project/declarationDir/amd/subfolder/c.js +++ b/tests/baselines/reference/project/declarationDir/amd/subfolder/c.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/project/declarationDir/node/a.js b/tests/baselines/reference/project/declarationDir/node/a.js index 2139e86c811c4..51f73513ad326 100644 --- a/tests/baselines/reference/project/declarationDir/node/a.js +++ b/tests/baselines/reference/project/declarationDir/node/a.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } diff --git a/tests/baselines/reference/project/declarationDir/node/subfolder/b.js b/tests/baselines/reference/project/declarationDir/node/subfolder/b.js index df27fec56d182..9ea046c8ed374 100644 --- a/tests/baselines/reference/project/declarationDir/node/subfolder/b.js +++ b/tests/baselines/reference/project/declarationDir/node/subfolder/b.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } diff --git a/tests/baselines/reference/project/declarationDir/node/subfolder/c.js b/tests/baselines/reference/project/declarationDir/node/subfolder/c.js index 385b6df759167..339257769a20a 100644 --- a/tests/baselines/reference/project/declarationDir/node/subfolder/c.js +++ b/tests/baselines/reference/project/declarationDir/node/subfolder/c.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/project/declarationDir2/amd/out/a.js b/tests/baselines/reference/project/declarationDir2/amd/out/a.js index 4db463a796620..a1f1c3d9bd0b5 100644 --- a/tests/baselines/reference/project/declarationDir2/amd/out/a.js +++ b/tests/baselines/reference/project/declarationDir2/amd/out/a.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } diff --git a/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/b.js b/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/b.js index bdae3c44b0aa1..ca3818a53d729 100644 --- a/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/b.js +++ b/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/b.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } diff --git a/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/c.js b/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/c.js index ff657652a4a98..d8b60f0daec58 100644 --- a/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/c.js +++ b/tests/baselines/reference/project/declarationDir2/amd/out/subfolder/c.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/project/declarationDir2/node/out/a.js b/tests/baselines/reference/project/declarationDir2/node/out/a.js index 2139e86c811c4..51f73513ad326 100644 --- a/tests/baselines/reference/project/declarationDir2/node/out/a.js +++ b/tests/baselines/reference/project/declarationDir2/node/out/a.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } diff --git a/tests/baselines/reference/project/declarationDir2/node/out/subfolder/b.js b/tests/baselines/reference/project/declarationDir2/node/out/subfolder/b.js index df27fec56d182..9ea046c8ed374 100644 --- a/tests/baselines/reference/project/declarationDir2/node/out/subfolder/b.js +++ b/tests/baselines/reference/project/declarationDir2/node/out/subfolder/b.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } diff --git a/tests/baselines/reference/project/declarationDir2/node/out/subfolder/c.js b/tests/baselines/reference/project/declarationDir2/node/out/subfolder/c.js index 385b6df759167..339257769a20a 100644 --- a/tests/baselines/reference/project/declarationDir2/node/out/subfolder/c.js +++ b/tests/baselines/reference/project/declarationDir2/node/out/subfolder/c.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/project/declarationDir3/amd/out.js b/tests/baselines/reference/project/declarationDir3/amd/out.js index b90d4415806a6..0fadf1e9e2f67 100644 --- a/tests/baselines/reference/project/declarationDir3/amd/out.js +++ b/tests/baselines/reference/project/declarationDir3/amd/out.js @@ -1,6 +1,6 @@ define("subfolder/b", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var B = (function () { function B() { } @@ -10,7 +10,7 @@ define("subfolder/b", ["require", "exports"], function (require, exports) { }); define("a", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -20,7 +20,7 @@ define("a", ["require", "exports"], function (require, exports) { }); define("subfolder/c", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } diff --git a/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js b/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js +++ b/tests/baselines/reference/project/declarationsCascadingImports/amd/m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js b/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js +++ b/tests/baselines/reference/project/declarationsCascadingImports/node/m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js b/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/amd/glo_m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js b/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js index 1610052986d7e..3b52083e818aa 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/amd/useModule.js @@ -1,6 +1,6 @@ define(["require", "exports", "glo_m4"], function (require, exports, glo_m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.useGlo_m4_x4 = glo_m4.x; exports.useGlo_m4_d4 = glo_m4.d; exports.useGlo_m4_f4 = glo_m4.foo(); diff --git a/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js b/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/node/glo_m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js b/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js index b7ddd253b1a93..869f36da817cb 100644 --- a/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsGlobalImport/node/useModule.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var glo_m4 = require("glo_m4"); exports.useGlo_m4_x4 = glo_m4.x; exports.useGlo_m4_d4 = glo_m4.d; diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/private_m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js index 6ecb0c59793af..6fe8dd5553adb 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/amd/useModule.js @@ -1,6 +1,6 @@ define(["require", "exports", "private_m4"], function (require, exports, private_m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var usePrivate_m4_m1; (function (usePrivate_m4_m1) { var x3 = private_m4.x; diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js b/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/node/private_m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js b/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js index 79310d89c02b4..80b2642bf2b86 100644 --- a/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedInPrivate/node/useModule.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // only used privately no need to emit var private_m4 = require("private_m4"); var usePrivate_m4_m1; diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/fncOnly_m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js index c6c57dabc810d..8ea0b3ecaa05d 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.js @@ -1,5 +1,5 @@ define(["require", "exports", "fncOnly_m4"], function (require, exports, fncOnly_m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.useFncOnly_m4_f4 = fncOnly_m4.foo(); }); diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/fncOnly_m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js index 991afa567cffe..c3b0063547a37 100644 --- a/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js +++ b/tests/baselines/reference/project/declarationsImportedUseInFunction/node/useModule.js @@ -1,4 +1,4 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var fncOnly_m4 = require("fncOnly_m4"); exports.useFncOnly_m4_f4 = fncOnly_m4.foo(); diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js index 1a0305591ccbd..4c8dc0c5bc6ba 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/m5.js @@ -1,6 +1,6 @@ define(["require", "exports", "m4"], function (require, exports, m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo2() { return new m4.d(); } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js index 6f962bd42e5ed..228e666438f60 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/amd/useModule.js @@ -1,6 +1,6 @@ define(["require", "exports", "m5"], function (require, exports, m5) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.d = m5.foo2(); exports.x = m5.foo2; function n() { diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js index db280e7fd8e1b..da452a5dd1492 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/m5.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m4 = require("m4"); // Emit used function foo2() { return new m4.d(); diff --git a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js index 7cc88b54ff394..15a4a5040b385 100644 --- a/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js +++ b/tests/baselines/reference/project/declarationsIndirectImportShouldResultInError/node/useModule.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Do not emit unused import var m5 = require("m5"); exports.d = m5.foo2(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js index 5375f44c01361..5dca5e455091a 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/amd/useModule.js @@ -1,6 +1,6 @@ define(["require", "exports", "m4", "m4"], function (require, exports, m4, multiImport_m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js index 395cbeee96693..b59db54829079 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesImport/node/useModule.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js index 1a0305591ccbd..4c8dc0c5bc6ba 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/m5.js @@ -1,6 +1,6 @@ define(["require", "exports", "m4"], function (require, exports, m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function foo2() { return new m4.d(); } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js index b8a22cfdc1f76..99a4aee63a5ae 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/amd/useModule.js @@ -1,6 +1,6 @@ define(["require", "exports", "m4", "m5"], function (require, exports, m4, m5) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js index db280e7fd8e1b..da452a5dd1492 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/m5.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m4 = require("m4"); // Emit used function foo2() { return new m4.d(); diff --git a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js index 49958bb9814bc..bb9c112c50d65 100644 --- a/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsMultipleTimesMultipleImport/node/useModule.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; diff --git a/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js b/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js index d1c2d5f4aca40..2ff15b12d6c2e 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/amd/m4.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js b/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js index af5fcb7d87409..c960e57060484 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/amd/useModule.js @@ -1,6 +1,6 @@ define(["require", "exports", "m4"], function (require, exports, m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x4 = m4.x; exports.d4 = m4.d; exports.f4 = m4.foo(); diff --git a/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js b/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js index 1c9931a6d1dc8..e6d99b2cb8929 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/node/m4.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var d = (function () { function d() { } diff --git a/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js b/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js index 3a5602a21664d..9241d18705194 100644 --- a/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js +++ b/tests/baselines/reference/project/declarationsSimpleImport/node/useModule.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m4 = require("m4"); // Emit used exports.x4 = m4.x; exports.d4 = m4.d; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js index 7eeee43049b85..d0ae0291de186 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js index d393dda0c5749..14338d7f52ce1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 7eeee43049b85..d0ae0291de186 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index d393dda0c5749..14338d7f52ce1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 1c199b7384adb..d921ef46d9232 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 749fbd732a5b9..45b58d25d902c 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js index c67e35d1b89b4..1264f15db5dd1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js index 1935dadfdb358..32fedae4b7d72 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js index fa9c56910474d..ca6a7146d22d4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js index dabe72d27872a..0d5a5944c4ed2 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js index d28465d805ea8..51966c80f4315 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js index 46d82346a3749..2a8e86fcaf9ef 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 1935dadfdb358..32fedae4b7d72 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index fa9c56910474d..ca6a7146d22d4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index c67e35d1b89b4..1264f15db5dd1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index d28465d805ea8..51966c80f4315 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 46d82346a3749..2a8e86fcaf9ef 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index dabe72d27872a..0d5a5944c4ed2 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 371d873f34591..da0a0adf86cc4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js index 1f3b6d7a6dcf5..0ece461e71517 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js index a112cba6d0e90..c9855609a46d1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js index a6a299a8a7eb0..ab9e4150fb61d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js index 94e4facb645a8..8396c5c721fb3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 1f3b6d7a6dcf5..0ece461e71517 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index a112cba6d0e90..c9855609a46d1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index a6a299a8a7eb0..ab9e4150fb61d 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 94e4facb645a8..8396c5c721fb3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index c5e2f0c04bf73..ee61edd6cbbe9 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js index 8359b4472ee37..204f203ea02ee 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js index 32cd3e8915e13..21892f5286e7e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js index 39f0b1365680c..82fac44c69fc8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js index 61925246a0e91..e5f7b56c67149 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 8359b4472ee37..204f203ea02ee 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 32cd3e8915e13..21892f5286e7e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 39f0b1365680c..82fac44c69fc8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 61925246a0e91..e5f7b56c67149 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 11d40e4d23be7..b25d5f3150785 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js index c467f0b8be0aa..5d25d0d40dd21 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js index d43267b1c9a13..3a69b4a45f68b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 9a46a37deb80e..23c6132b6732a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 727afdc29fd5a..9710fbfc827d3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index 2a89c0fc929bc..dffac182acb7b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 62af54d370044..e627411eb5c8e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js index 6cf63b567ba6e..68f7385329e09 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js index 2a191801c438a..a974e99d36781 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js index 2dcea15d05055..f1c957da942af 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js index 28edf7546504a..2d5686dea0284 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js index 9a8f5b774980b..43565256b4a4e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js index 603b29da7fac8..23dce2210c557 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 4090486a73038..7d43827a1747e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index f637a581e133f..42896312df8a4 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index fa97d15a89a17..8df7c84af5b94 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 8de8d6f84b688..4724fc84bc75d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index ca070c2062fb7..54aac5b8bcff2 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 6ce6e73202e8e..d6a5c414b74f8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index e4a7bb40897a2..59916781e2080 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js index b890ae8232aa5..7923dc8adb042 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js index 2cbff5fc156d3..e333213361ea8 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js index a0cc81f5af957..a4bc9e338a42f 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js index 2cce36f74c262..b54b00a127882 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index f5001a6551e1f..93a3130599c94 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 2fb4fbfd5c382..a2f2c6c179c5a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 0110f9dce1662..cf0586a078865 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 4849c53d0c431..2f554b96d6c10 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index 587721fb87ae8..d4c121ea5ec7f 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js index b99a41c8c3cc1..08964ddaec9cd 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js index c4c2a04f642fd..587434f4011e3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js index 9574bd33b835a..b39dd8630c704 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js index 4ac58aea85631..b17345860faf3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 2885a499091ac..907eef66d429b 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 0ee63c4207043..e07e16d9f4942 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index fa9502d4d6475..096f875ced4a3 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index cabfd9f98d668..2703437560398 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index d6d1268972139..a87481475bf94 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js index f373c246d4867..245a41b44e1c2 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js index 9557c3a613c1c..9e5eaef25273b 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index f373c246d4867..245a41b44e1c2 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 9557c3a613c1c..9e5eaef25273b 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js index d9f0f5b153109..c470ba4f35e0d 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index cc3f604524fcc..4a9d90b07d746 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js index f6057bf162a8e..ba19ca0d04a0b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js index 196a531920ba4..b1f3bfee08ea1 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js index b4a0aa2d25d1d..cbcdc152e6bf7 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js index 9324632b44acb..94fc1a8b2ce78 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js index f590179583204..9bca5531f7456 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js index e8734ca6d27b0..bdd46ad19c099 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 196a531920ba4..b1f3bfee08ea1 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index b4a0aa2d25d1d..cbcdc152e6bf7 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index f6057bf162a8e..ba19ca0d04a0b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index f590179583204..9bca5531f7456 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index e8734ca6d27b0..bdd46ad19c099 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 9324632b44acb..94fc1a8b2ce78 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 1ea95ed9ba028..50968e5a86da6 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js index fc2d3408b2be8..f507dc7c8347f 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js index 1e0dea14dc890..d85883ff410fe 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js index 8a7e9f1069e62..1e06a8c53db80 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js index d7e6d6733402b..86185d149d70e 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index fc2d3408b2be8..f507dc7c8347f 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 1e0dea14dc890..d85883ff410fe 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 8a7e9f1069e62..1e06a8c53db80 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index d7e6d6733402b..86185d149d70e 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js index d19b91956859e..e06752c0f43a9 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js index 5aa59f6dc9259..e74d220d8220f 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js index d56cdf72bf299..dd8e985418d85 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js index b4abab78e9aaf..8672bb2bd4650 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js index 6bc25238daca8..a6b06e1ef599b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 5aa59f6dc9259..e74d220d8220f 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index d56cdf72bf299..dd8e985418d85 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index b4abab78e9aaf..8672bb2bd4650 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 6bc25238daca8..a6b06e1ef599b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 63e58be27dc68..2b05ef8059e38 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js index f373c246d4867..245a41b44e1c2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js index 9557c3a613c1c..9e5eaef25273b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index f373c246d4867..245a41b44e1c2 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 9557c3a613c1c..9e5eaef25273b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js index d9f0f5b153109..c470ba4f35e0d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index cc3f604524fcc..4a9d90b07d746 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js index f6057bf162a8e..ba19ca0d04a0b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js index 196a531920ba4..b1f3bfee08ea1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js index b4a0aa2d25d1d..cbcdc152e6bf7 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js index 9324632b44acb..94fc1a8b2ce78 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js index f590179583204..9bca5531f7456 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js index e8734ca6d27b0..bdd46ad19c099 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 196a531920ba4..b1f3bfee08ea1 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index b4a0aa2d25d1d..cbcdc152e6bf7 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index f6057bf162a8e..ba19ca0d04a0b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index f590179583204..9bca5531f7456 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index e8734ca6d27b0..bdd46ad19c099 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 9324632b44acb..94fc1a8b2ce78 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js index 1ea95ed9ba028..50968e5a86da6 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js index fc2d3408b2be8..f507dc7c8347f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js index 1e0dea14dc890..d85883ff410fe 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js index 8a7e9f1069e62..1e06a8c53db80 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js index d7e6d6733402b..86185d149d70e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index fc2d3408b2be8..f507dc7c8347f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index 1e0dea14dc890..d85883ff410fe 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 8a7e9f1069e62..1e06a8c53db80 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index d7e6d6733402b..86185d149d70e 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js index d19b91956859e..e06752c0f43a9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js index 5aa59f6dc9259..e74d220d8220f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js index d56cdf72bf299..dd8e985418d85 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js index b4abab78e9aaf..8672bb2bd4650 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js index 6bc25238daca8..a6b06e1ef599b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 5aa59f6dc9259..e74d220d8220f 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index d56cdf72bf299..dd8e985418d85 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index b4abab78e9aaf..8672bb2bd4650 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 6bc25238daca8..a6b06e1ef599b 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 63e58be27dc68..2b05ef8059e38 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/nodeModulesImportHigher/amd/importHigher/root.js b/tests/baselines/reference/project/nodeModulesImportHigher/amd/importHigher/root.js index 65e3b33be1a80..15d7b1dd43044 100644 --- a/tests/baselines/reference/project/nodeModulesImportHigher/amd/importHigher/root.js +++ b/tests/baselines/reference/project/nodeModulesImportHigher/amd/importHigher/root.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); m1.f1("test"); m1.f2.a = 10; m1.f2.person.age = "10"; // Error: Should be number (if direct import of m2 made the m3 module visible). diff --git a/tests/baselines/reference/project/nodeModulesImportHigher/node/importHigher/root.js b/tests/baselines/reference/project/nodeModulesImportHigher/node/importHigher/root.js index 4fc36cd0222e6..ae48958106a95 100644 --- a/tests/baselines/reference/project/nodeModulesImportHigher/node/importHigher/root.js +++ b/tests/baselines/reference/project/nodeModulesImportHigher/node/importHigher/root.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); m1.f1("test"); m1.f2.a = 10; diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/amd/maxDepthExceeded/built/root.js b/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/amd/maxDepthExceeded/built/root.js index 493e1b9636e3d..dd162fc2f89f2 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/amd/maxDepthExceeded/built/root.js +++ b/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/amd/maxDepthExceeded/built/root.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); m1.f1("test"); m1.f2.a = "10"; // Error: Should be number m1.rel = 42; // Error: Should be boolean diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/node/maxDepthExceeded/built/root.js b/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/node/maxDepthExceeded/built/root.js index 5137083683789..9597d626ed7c2 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/node/maxDepthExceeded/built/root.js +++ b/tests/baselines/reference/project/nodeModulesMaxDepthExceeded/node/maxDepthExceeded/built/root.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); m1.f1("test"); m1.f2.a = "10"; // Error: Should be number diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/maxDepthIncreased/root.js b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/maxDepthIncreased/root.js index 948a6d68b8338..0cc4ffe817ce8 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/maxDepthIncreased/root.js +++ b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/amd/maxDepthIncreased/root.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1", "m4"], function (require, exports, m1, m4) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); m1.f1("test"); m1.f2.a = 10; m1.f2.person.age = "10"; // Should error if loaded the .js files correctly diff --git a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/maxDepthIncreased/root.js b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/maxDepthIncreased/root.js index 50feab5d27f86..5c69ac5bc9250 100644 --- a/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/maxDepthIncreased/root.js +++ b/tests/baselines/reference/project/nodeModulesMaxDepthIncreased/node/maxDepthIncreased/root.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); var m4 = require("m4"); m1.f1("test"); diff --git a/tests/baselines/reference/project/nonRelative/amd/consume.js b/tests/baselines/reference/project/nonRelative/amd/consume.js index a6bce0ab2c63f..4a0971e868d4d 100644 --- a/tests/baselines/reference/project/nonRelative/amd/consume.js +++ b/tests/baselines/reference/project/nonRelative/amd/consume.js @@ -1,6 +1,6 @@ define(["require", "exports", "decl", "lib/foo/a", "lib/bar/a"], function (require, exports, mod, x, y) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); x.hello(); y.hello(); var str = mod.call(); diff --git a/tests/baselines/reference/project/nonRelative/amd/decl.js b/tests/baselines/reference/project/nonRelative/amd/decl.js index d22c3ced24e55..4c5b37dcd1eab 100644 --- a/tests/baselines/reference/project/nonRelative/amd/decl.js +++ b/tests/baselines/reference/project/nonRelative/amd/decl.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function call() { return "success"; } diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js index b92af88609dd4..6c90d9d231dea 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/bar/a.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js index b92af88609dd4..6c90d9d231dea 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/a.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js index b92af88609dd4..6c90d9d231dea 100644 --- a/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/amd/lib/foo/b.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function hello() { } exports.hello = hello; }); diff --git a/tests/baselines/reference/project/nonRelative/node/consume.js b/tests/baselines/reference/project/nonRelative/node/consume.js index 51d811bb72ada..8812f79110e77 100644 --- a/tests/baselines/reference/project/nonRelative/node/consume.js +++ b/tests/baselines/reference/project/nonRelative/node/consume.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var mod = require("decl"); var x = require("lib/foo/a"); var y = require("lib/bar/a"); diff --git a/tests/baselines/reference/project/nonRelative/node/decl.js b/tests/baselines/reference/project/nonRelative/node/decl.js index 7cde1400c608e..f4e8efac9bd8c 100644 --- a/tests/baselines/reference/project/nonRelative/node/decl.js +++ b/tests/baselines/reference/project/nonRelative/node/decl.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function call() { return "success"; } diff --git a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js index c83848543b20f..183e73a24a1a1 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/bar/a.js @@ -1,4 +1,4 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js index c83848543b20f..183e73a24a1a1 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/a.js @@ -1,4 +1,4 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js index c83848543b20f..183e73a24a1a1 100644 --- a/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js +++ b/tests/baselines/reference/project/nonRelative/node/lib/foo/b.js @@ -1,4 +1,4 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function hello() { } exports.hello = hello; diff --git a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js index 257b2bbaa8fc8..3ff4f2092e37a 100644 --- a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js index 7a90183baf30b..4e54885a80618 100644 --- a/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 257b2bbaa8fc8..3ff4f2092e37a 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 7a90183baf30b..4e54885a80618 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js index ef652b9e92970..b31010492032d 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index ef652b9e92970..b31010492032d 100644 --- a/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/outMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js index 257b2bbaa8fc8..3ff4f2092e37a 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/diskFile0.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js index b5ccdc63b22ee..0fa6be4fd5dae 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js index fb9329a59b47e..6d1a128390c70 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js index 7a90183baf30b..4e54885a80618 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/diskFile0.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js index 52ebad557038b..b6ae4af7b313f 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js index 18fccdca8bbd2..c67bb6c8f14dd 100644 --- a/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index b5ccdc63b22ee..0fa6be4fd5dae 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index fb9329a59b47e..6d1a128390c70 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 257b2bbaa8fc8..3ff4f2092e37a 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 52ebad557038b..b6ae4af7b313f 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 18fccdca8bbd2..c67bb6c8f14dd 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 7a90183baf30b..4e54885a80618 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js index adb1b5061b50d..d046a97dc7ff9 100644 --- a/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js index b5ccdc63b22ee..0fa6be4fd5dae 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js index c062c0ac6d4a8..333c3b4d87628 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js index 52ebad557038b..b6ae4af7b313f 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js index 2e50e0b798937..d08047d908777 100644 --- a/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/outModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index b5ccdc63b22ee..0fa6be4fd5dae 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index c062c0ac6d4a8..333c3b4d87628 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 52ebad557038b..b6ae4af7b313f 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 2e50e0b798937..d08047d908777 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js index 0a1f6b523c998..49a7ee96981e9 100644 --- a/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js index b5ccdc63b22ee..0fa6be4fd5dae 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js index 0fdf8d91b324b..81c9dcd9fd89c 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js index 52ebad557038b..b6ae4af7b313f 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js index 33f201ce9d5e2..10d4c642989ee 100644 --- a/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index b5ccdc63b22ee..0fa6be4fd5dae 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index 0fdf8d91b324b..81c9dcd9fd89c 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 52ebad557038b..b6ae4af7b313f 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 33f201ce9d5e2..10d4c642989ee 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 2ddfb9277a3ad..bea92a7f2653e 100644 --- a/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/outModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index f070fff6f1cb8..39da758ce9cac 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 3e02cc09fcb7a..4cd82e7ddeb9d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index b77e0a462a773..4028a44cd30e2 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index cbe79e3318b88..406c9de1cd354 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 22a9cf7b4d73d..220b429a89a4a 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js index f070fff6f1cb8..39da758ce9cac 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 3e02cc09fcb7a..4cd82e7ddeb9d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js index b77e0a462a773..4028a44cd30e2 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js index cbe79e3318b88..406c9de1cd354 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 22a9cf7b4d73d..220b429a89a4a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js index f070fff6f1cb8..39da758ce9cac 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 3e02cc09fcb7a..4cd82e7ddeb9d 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js index b77e0a462a773..4028a44cd30e2 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js index cbe79e3318b88..406c9de1cd354 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 22a9cf7b4d73d..220b429a89a4a 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js index f070fff6f1cb8..39da758ce9cac 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js index 3e02cc09fcb7a..4cd82e7ddeb9d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js @@ -10,7 +10,7 @@ function m1_f1() { } define("ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js index 90f7f12fcb186..9cb9049b30fc9 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js index 08855ec797b4d..b0d7bf62675db 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js index 43d151f3fd963..b0fc9573dcd51 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); var m2 = require("../outputdir_module_multifolder_ref/m2"); exports.a1 = 10; diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js index 8ad833cd4eba9..477a6c9173c45 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js index b77e0a462a773..4028a44cd30e2 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("outputdir_module_multifolder/ref/m1", ["require", "exports"], function ( }); define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m2_a1 = 10; var m2_c1 = (function () { function m2_c1() { @@ -32,7 +32,7 @@ define("outputdir_module_multifolder_ref/m2", ["require", "exports"], function ( }); define("outputdir_module_multifolder/test", ["require", "exports", "outputdir_module_multifolder/ref/m1", "outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js index e5ed53fd0e1a2..1fe1fc0e3f547 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js index 56c8debf9b699..d6f4719f4c2e9 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js index cbe79e3318b88..406c9de1cd354 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js index 391c6ef6630d8..4ed4d91ad41cb 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js index c95451ac730f8..6718e0d789853 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js @@ -1,6 +1,6 @@ define(["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js index 02586d67fcc6d..7dd20b3aa5c85 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js index 97ca26f319840..f975c00ba542c 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("ref/m1"); exports.a1 = 10; var c1 = (function () { diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js index 22a9cf7b4d73d..220b429a89a4a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js @@ -1,6 +1,6 @@ define("ref/m1", ["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.m1_a1 = 10; var m1_c1 = (function () { function m1_c1() { @@ -16,7 +16,7 @@ define("ref/m1", ["require", "exports"], function (require, exports) { }); define("test", ["require", "exports", "ref/m1"], function (require, exports, m1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.a1 = 10; var c1 = (function () { function c1() { diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js index eb08364649a70..98a3e36463644 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/commands.js @@ -1,4 +1,4 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js index 66facecde7f6b..247a41e634e5a 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/fs.js @@ -1,6 +1,6 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var RM = (function () { function RM() { } diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js index eb08364649a70..98a3e36463644 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/amd/server.js @@ -1,4 +1,4 @@ define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js index 64cbe53a86127..ce03781e22194 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/commands.js @@ -1,2 +1,2 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js index 221c232222727..db5607d92b807 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/fs.js @@ -1,5 +1,5 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var RM = (function () { function RM() { } diff --git a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js index 64cbe53a86127..ce03781e22194 100644 --- a/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js +++ b/tests/baselines/reference/project/visibilityOfTypeUsedAcrossModules/node/server.js @@ -1,2 +1,2 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/promiseIdentity.js b/tests/baselines/reference/promiseIdentity.js index 526bae62c0812..a4274cc4c5a4c 100644 --- a/tests/baselines/reference/promiseIdentity.js +++ b/tests/baselines/reference/promiseIdentity.js @@ -23,7 +23,7 @@ var y: Promise2; //// [promiseIdentity.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; var x; // Ok because T in this particular Promise2 is any, as are all the U and W references. diff --git a/tests/baselines/reference/promiseIdentity2.js b/tests/baselines/reference/promiseIdentity2.js index 81beb44d78a74..5d617ccd73b20 100644 --- a/tests/baselines/reference/promiseIdentity2.js +++ b/tests/baselines/reference/promiseIdentity2.js @@ -13,7 +13,7 @@ var x: Promise; //// [promiseIdentity2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // error because T is string in the first declaration, and T is boolean in the second // Return type and callback return type are ok because T is any in this particular Promise var x; diff --git a/tests/baselines/reference/promiseIdentityWithAny.js b/tests/baselines/reference/promiseIdentityWithAny.js index 422d00a131272..3b5eb8505ff01 100644 --- a/tests/baselines/reference/promiseIdentityWithAny.js +++ b/tests/baselines/reference/promiseIdentityWithAny.js @@ -12,7 +12,7 @@ var x: Promise; //// [promiseIdentityWithAny.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Should be ok because signature type parameters get erased to any var x; var x; diff --git a/tests/baselines/reference/promiseIdentityWithAny2.js b/tests/baselines/reference/promiseIdentityWithAny2.js index a26cfd0508448..9ba95603961e9 100644 --- a/tests/baselines/reference/promiseIdentityWithAny2.js +++ b/tests/baselines/reference/promiseIdentityWithAny2.js @@ -24,7 +24,7 @@ var y: Promise2; //// [promiseIdentityWithAny2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Error because type parameter arity doesn't match var x; var x; diff --git a/tests/baselines/reference/promiseIdentityWithConstraints.js b/tests/baselines/reference/promiseIdentityWithConstraints.js index 5c0549dc99d78..565fb2c6d5be3 100644 --- a/tests/baselines/reference/promiseIdentityWithConstraints.js +++ b/tests/baselines/reference/promiseIdentityWithConstraints.js @@ -12,7 +12,7 @@ var x: Promise; //// [promiseIdentityWithConstraints.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Error because constraint V doesn't match var x; var x; diff --git a/tests/baselines/reference/propertyAccessNumericLiterals.errors.txt b/tests/baselines/reference/propertyAccessNumericLiterals.errors.txt new file mode 100644 index 0000000000000..d5bffbb1d2798 --- /dev/null +++ b/tests/baselines/reference/propertyAccessNumericLiterals.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/expressions/propertyAccess/propertyAccessNumericLiterals.ts(6,1): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o0'. + + +==== tests/cases/conformance/expressions/propertyAccess/propertyAccessNumericLiterals.ts (1 errors) ==== + 0xffffffff.toString(); + 0o01234.toString(); + 0b01101101.toString(); + 1234..toString(); + 1e0.toString(); + 000.toString(); + ~~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o0'. \ No newline at end of file diff --git a/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt b/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt index 620f4dc5940a3..8c01d5840f867 100644 --- a/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt +++ b/tests/baselines/reference/propertyAndAccessorWithSameName.errors.txt @@ -1,25 +1,19 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(9,5): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(10,9): error TS2300: Duplicate identifier 'x'. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(14,13): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(15,9): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts(18,9): error TS2300: Duplicate identifier 'x'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts (11 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWithSameName.ts (7 errors) ==== class C { x: number; ~ !!! error TS2300: Duplicate identifier 'x'. get x() { // error ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. return 1; } @@ -31,8 +25,6 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWi !!! error TS2300: Duplicate identifier 'x'. set x(v) { } // error ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. } @@ -42,14 +34,10 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndAccessorWi !!! error TS2300: Duplicate identifier 'x'. get x() { // error ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. return 1; } set x(v) { } ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js index 457f929fe623d..09ed2bc41b6f0 100644 --- a/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js +++ b/tests/baselines/reference/propertyIdentityWithPrivacyMismatch.js @@ -31,7 +31,7 @@ var y: Foo2; //// [propertyIdentityWithPrivacyMismatch_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var x; var x; // Should be error (mod1.Foo !== mod2.Foo) var Foo1 = (function () { diff --git a/tests/baselines/reference/protoAsIndexInIndexExpression.js b/tests/baselines/reference/protoAsIndexInIndexExpression.js index 7805cebbee32d..5f4761cc74d21 100644 --- a/tests/baselines/reference/protoAsIndexInIndexExpression.js +++ b/tests/baselines/reference/protoAsIndexInIndexExpression.js @@ -21,7 +21,7 @@ class C { //// [protoAsIndexInIndexExpression_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [protoAsIndexInIndexExpression_1.js] /// var EntityPrototype = undefined; diff --git a/tests/baselines/reference/prototypeOnConstructorFunctions.js b/tests/baselines/reference/prototypeOnConstructorFunctions.js index de1fec1f7e8ac..d2e5ddde9251f 100644 --- a/tests/baselines/reference/prototypeOnConstructorFunctions.js +++ b/tests/baselines/reference/prototypeOnConstructorFunctions.js @@ -12,4 +12,4 @@ i.const.prototype.prop = "yo"; //// [prototypeOnConstructorFunctions.js] var i; -i["const"].prototype.prop = "yo"; +i.const.prototype.prop = "yo"; diff --git a/tests/baselines/reference/quotedAccessorName1.errors.txt b/tests/baselines/reference/quotedAccessorName1.errors.txt deleted file mode 100644 index 89b2edfd32f51..0000000000000 --- a/tests/baselines/reference/quotedAccessorName1.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/compiler/quotedAccessorName1.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/quotedAccessorName1.ts (1 errors) ==== - class C { - get "foo"() { return 0; } - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/quotedAccessorName1.symbols b/tests/baselines/reference/quotedAccessorName1.symbols new file mode 100644 index 0000000000000..d7afe8fa3d651 --- /dev/null +++ b/tests/baselines/reference/quotedAccessorName1.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/quotedAccessorName1.ts === +class C { +>C : Symbol(C, Decl(quotedAccessorName1.ts, 0, 0)) + + get "foo"() { return 0; } +} diff --git a/tests/baselines/reference/quotedAccessorName1.types b/tests/baselines/reference/quotedAccessorName1.types new file mode 100644 index 0000000000000..cbd63c919a6b3 --- /dev/null +++ b/tests/baselines/reference/quotedAccessorName1.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/quotedAccessorName1.ts === +class C { +>C : C + + get "foo"() { return 0; } +>0 : 0 +} diff --git a/tests/baselines/reference/quotedAccessorName2.errors.txt b/tests/baselines/reference/quotedAccessorName2.errors.txt deleted file mode 100644 index 2f74fc528083e..0000000000000 --- a/tests/baselines/reference/quotedAccessorName2.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/compiler/quotedAccessorName2.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/quotedAccessorName2.ts (1 errors) ==== - class C { - static get "foo"() { return 0; } - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } \ No newline at end of file diff --git a/tests/baselines/reference/quotedAccessorName2.symbols b/tests/baselines/reference/quotedAccessorName2.symbols new file mode 100644 index 0000000000000..5ff7fa26bf574 --- /dev/null +++ b/tests/baselines/reference/quotedAccessorName2.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/quotedAccessorName2.ts === +class C { +>C : Symbol(C, Decl(quotedAccessorName2.ts, 0, 0)) + + static get "foo"() { return 0; } +} diff --git a/tests/baselines/reference/quotedAccessorName2.types b/tests/baselines/reference/quotedAccessorName2.types new file mode 100644 index 0000000000000..849a986ff1d64 --- /dev/null +++ b/tests/baselines/reference/quotedAccessorName2.types @@ -0,0 +1,7 @@ +=== tests/cases/compiler/quotedAccessorName2.ts === +class C { +>C : C + + static get "foo"() { return 0; } +>0 : 0 +} diff --git a/tests/baselines/reference/reExportGlobalDeclaration1.js b/tests/baselines/reference/reExportGlobalDeclaration1.js index 334d20de2144a..00c3bbe3453b5 100644 --- a/tests/baselines/reference/reExportGlobalDeclaration1.js +++ b/tests/baselines/reference/reExportGlobalDeclaration1.js @@ -21,4 +21,4 @@ export {b as b2}; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/reExportGlobalDeclaration2.js b/tests/baselines/reference/reExportGlobalDeclaration2.js index 5e58bf4b68ab7..67fe89ac000f4 100644 --- a/tests/baselines/reference/reExportGlobalDeclaration2.js +++ b/tests/baselines/reference/reExportGlobalDeclaration2.js @@ -17,4 +17,4 @@ export {I2 as III2}; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/reExportGlobalDeclaration3.js b/tests/baselines/reference/reExportGlobalDeclaration3.js index 0cd5132049d43..c401bcd2efd3d 100644 --- a/tests/baselines/reference/reExportGlobalDeclaration3.js +++ b/tests/baselines/reference/reExportGlobalDeclaration3.js @@ -17,4 +17,4 @@ export {NS2 as NNNS2}; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/reExportGlobalDeclaration4.js b/tests/baselines/reference/reExportGlobalDeclaration4.js index d860d20b83c1e..569c0e2c83458 100644 --- a/tests/baselines/reference/reExportGlobalDeclaration4.js +++ b/tests/baselines/reference/reExportGlobalDeclaration4.js @@ -17,4 +17,4 @@ export {Cls2 as CCCls2}; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/reExportUndefined1.js b/tests/baselines/reference/reExportUndefined1.js index 3dfacd62df258..1769a5d6a436a 100644 --- a/tests/baselines/reference/reExportUndefined1.js +++ b/tests/baselines/reference/reExportUndefined1.js @@ -3,4 +3,4 @@ export { undefined }; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/reExportUndefined2.js b/tests/baselines/reference/reExportUndefined2.js index 49aacf98e6af8..f4b6f91e020b6 100644 --- a/tests/baselines/reference/reExportUndefined2.js +++ b/tests/baselines/reference/reExportUndefined2.js @@ -11,11 +11,11 @@ use(undefined); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var undefined; exports.undefined = undefined; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a_1 = require("./a"); use(a_1.undefined); diff --git a/tests/baselines/reference/reactNamespaceImportPresevation.js b/tests/baselines/reference/reactNamespaceImportPresevation.js index a3e9ac800fee4..5a52664ee1338 100644 --- a/tests/baselines/reference/reactNamespaceImportPresevation.js +++ b/tests/baselines/reference/reactNamespaceImportPresevation.js @@ -15,6 +15,6 @@ declare var foo: any; //// [test.jsx] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var myReactLib = require("my-React-Lib"); // should not be elided ; diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js index 87ef9fe86710f..7a5d8798c9879 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType1.js @@ -29,5 +29,5 @@ define(["require", "exports"], function (require, exports) { //// [recursiveExportAssignmentAndFindAliasedType1_moduleA.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js index c38c38ea325c6..17cb34f665880 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType2.js @@ -33,5 +33,5 @@ define(["require", "exports"], function (require, exports) { //// [recursiveExportAssignmentAndFindAliasedType2_moduleA.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js index 178d8b3b3eed8..7d7c49287eb5d 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType3.js @@ -37,5 +37,5 @@ define(["require", "exports"], function (require, exports) { //// [recursiveExportAssignmentAndFindAliasedType3_moduleA.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js index 893c4ec990fb1..c1ba34ab2dfc7 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType4.js @@ -31,5 +31,5 @@ define(["require", "exports"], function (require, exports) { //// [recursiveExportAssignmentAndFindAliasedType4_moduleA.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js index 39cb223d1a0f2..788b958f35274 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType5.js @@ -40,5 +40,5 @@ define(["require", "exports"], function (require, exports) { //// [recursiveExportAssignmentAndFindAliasedType5_moduleA.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js index d8541df0c2c1a..1508ab3a28ae0 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType6.js @@ -49,5 +49,5 @@ define(["require", "exports"], function (require, exports) { //// [recursiveExportAssignmentAndFindAliasedType6_moduleA.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js index 01f818d5bb27b..b70a6a3c521cc 100644 --- a/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js +++ b/tests/baselines/reference/recursiveExportAssignmentAndFindAliasedType7.js @@ -51,5 +51,5 @@ define(["require", "exports"], function (require, exports) { //// [recursiveExportAssignmentAndFindAliasedType7_moduleA.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/recursiveGetterAccess.errors.txt b/tests/baselines/reference/recursiveGetterAccess.errors.txt deleted file mode 100644 index 160e9280b226a..0000000000000 --- a/tests/baselines/reference/recursiveGetterAccess.errors.txt +++ /dev/null @@ -1,11 +0,0 @@ -tests/cases/compiler/recursiveGetterAccess.ts(2,5): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/recursiveGetterAccess.ts (1 errors) ==== - class MyClass { - get testProp() { return this.testProp; } - ~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - \ No newline at end of file diff --git a/tests/baselines/reference/recursiveGetterAccess.symbols b/tests/baselines/reference/recursiveGetterAccess.symbols new file mode 100644 index 0000000000000..fe9b12f0ae2ca --- /dev/null +++ b/tests/baselines/reference/recursiveGetterAccess.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/recursiveGetterAccess.ts === +class MyClass { +>MyClass : Symbol(MyClass, Decl(recursiveGetterAccess.ts, 0, 0)) + +get testProp() { return this.testProp; } +>testProp : Symbol(MyClass.testProp, Decl(recursiveGetterAccess.ts, 0, 15)) +>this.testProp : Symbol(MyClass.testProp, Decl(recursiveGetterAccess.ts, 0, 15)) +>this : Symbol(MyClass, Decl(recursiveGetterAccess.ts, 0, 0)) +>testProp : Symbol(MyClass.testProp, Decl(recursiveGetterAccess.ts, 0, 15)) +} + + diff --git a/tests/baselines/reference/recursiveGetterAccess.types b/tests/baselines/reference/recursiveGetterAccess.types new file mode 100644 index 0000000000000..4e8702dffaf3a --- /dev/null +++ b/tests/baselines/reference/recursiveGetterAccess.types @@ -0,0 +1,12 @@ +=== tests/cases/compiler/recursiveGetterAccess.ts === +class MyClass { +>MyClass : MyClass + +get testProp() { return this.testProp; } +>testProp : any +>this.testProp : any +>this : this +>testProp : any +} + + diff --git a/tests/baselines/reference/recursiveInferenceBug.errors.txt b/tests/baselines/reference/recursiveInferenceBug.errors.txt deleted file mode 100644 index 9e01e36748e7e..0000000000000 --- a/tests/baselines/reference/recursiveInferenceBug.errors.txt +++ /dev/null @@ -1,17 +0,0 @@ -tests/cases/compiler/recursiveInferenceBug.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/recursiveInferenceBug.ts (1 errors) ==== - function f(x: number) { - var z = f(x); - return x; - } - - - var zz = { - g: () =>{ }, - get f() { return "abc"; }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - }; - \ No newline at end of file diff --git a/tests/baselines/reference/recursiveInferenceBug.symbols b/tests/baselines/reference/recursiveInferenceBug.symbols new file mode 100644 index 0000000000000..4640b4a9ef95e --- /dev/null +++ b/tests/baselines/reference/recursiveInferenceBug.symbols @@ -0,0 +1,26 @@ +=== tests/cases/compiler/recursiveInferenceBug.ts === +function f(x: number) { +>f : Symbol(f, Decl(recursiveInferenceBug.ts, 0, 0)) +>x : Symbol(x, Decl(recursiveInferenceBug.ts, 0, 11)) + + var z = f(x); +>z : Symbol(z, Decl(recursiveInferenceBug.ts, 1, 7)) +>f : Symbol(f, Decl(recursiveInferenceBug.ts, 0, 0)) +>x : Symbol(x, Decl(recursiveInferenceBug.ts, 0, 11)) + + return x; +>x : Symbol(x, Decl(recursiveInferenceBug.ts, 0, 11)) +} + + +var zz = { +>zz : Symbol(zz, Decl(recursiveInferenceBug.ts, 6, 3)) + + g: () =>{ }, +>g : Symbol(g, Decl(recursiveInferenceBug.ts, 6, 10)) + + get f() { return "abc"; }, +>f : Symbol(f, Decl(recursiveInferenceBug.ts, 7, 16)) + +}; + diff --git a/tests/baselines/reference/recursiveInferenceBug.types b/tests/baselines/reference/recursiveInferenceBug.types new file mode 100644 index 0000000000000..501ebc1522a1e --- /dev/null +++ b/tests/baselines/reference/recursiveInferenceBug.types @@ -0,0 +1,30 @@ +=== tests/cases/compiler/recursiveInferenceBug.ts === +function f(x: number) { +>f : (x: number) => number +>x : number + + var z = f(x); +>z : number +>f(x) : number +>f : (x: number) => number +>x : number + + return x; +>x : number +} + + +var zz = { +>zz : { g: () => void; readonly f: string; } +>{ g: () =>{ }, get f() { return "abc"; },} : { g: () => void; readonly f: string; } + + g: () =>{ }, +>g : () => void +>() =>{ } : () => void + + get f() { return "abc"; }, +>f : string +>"abc" : "abc" + +}; + diff --git a/tests/baselines/reference/recursiveMods.js b/tests/baselines/reference/recursiveMods.js index f9f48a4a891ce..3ce7075d608ab 100644 --- a/tests/baselines/reference/recursiveMods.js +++ b/tests/baselines/reference/recursiveMods.js @@ -25,7 +25,7 @@ export module Foo { //// [recursiveMods.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo; (function (Foo) { var C = (function () { diff --git a/tests/baselines/reference/recursiveSpecializationOfSignatures.errors.txt b/tests/baselines/reference/recursiveSpecializationOfSignatures.errors.txt deleted file mode 100644 index 2bec20c316a96..0000000000000 --- a/tests/baselines/reference/recursiveSpecializationOfSignatures.errors.txt +++ /dev/null @@ -1,12 +0,0 @@ -tests/cases/compiler/recursiveSpecializationOfSignatures.ts(2,5): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/recursiveSpecializationOfSignatures.ts (1 errors) ==== - class S0 { - set S1(S2: S0) { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - constructor(public S17: S0 A>) { } - } - \ No newline at end of file diff --git a/tests/baselines/reference/recursiveSpecializationOfSignatures.symbols b/tests/baselines/reference/recursiveSpecializationOfSignatures.symbols new file mode 100644 index 0000000000000..95971d31780c8 --- /dev/null +++ b/tests/baselines/reference/recursiveSpecializationOfSignatures.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/recursiveSpecializationOfSignatures.ts === +class S0 { +>S0 : Symbol(S0, Decl(recursiveSpecializationOfSignatures.ts, 0, 0)) +>B : Symbol(B, Decl(recursiveSpecializationOfSignatures.ts, 0, 9)) +>A : Symbol(A, Decl(recursiveSpecializationOfSignatures.ts, 0, 11)) + +set S1(S2: S0) { +>S1 : Symbol(S0.S1, Decl(recursiveSpecializationOfSignatures.ts, 0, 16)) +>S2 : Symbol(S2, Decl(recursiveSpecializationOfSignatures.ts, 1, 7)) +>S0 : Symbol(S0, Decl(recursiveSpecializationOfSignatures.ts, 0, 0)) +} +constructor(public S17: S0 A>) { } +>S17 : Symbol(S0.S17, Decl(recursiveSpecializationOfSignatures.ts, 3, 12)) +>S0 : Symbol(S0, Decl(recursiveSpecializationOfSignatures.ts, 0, 0)) +>S18 : Symbol(S18, Decl(recursiveSpecializationOfSignatures.ts, 3, 33)) +>A : Symbol(A, Decl(recursiveSpecializationOfSignatures.ts, 0, 11)) +} + diff --git a/tests/baselines/reference/recursiveSpecializationOfSignatures.types b/tests/baselines/reference/recursiveSpecializationOfSignatures.types new file mode 100644 index 0000000000000..7a8a6fe5c58b7 --- /dev/null +++ b/tests/baselines/reference/recursiveSpecializationOfSignatures.types @@ -0,0 +1,18 @@ +=== tests/cases/compiler/recursiveSpecializationOfSignatures.ts === +class S0 { +>S0 : S0 +>B : B +>A : A + +set S1(S2: S0) { +>S1 : S0 +>S2 : S0 +>S0 : S0 +} +constructor(public S17: S0 A>) { } +>S17 : S0 A> +>S0 : S0 +>S18 : any +>A : A +} + diff --git a/tests/baselines/reference/recursiveTypeRelations.js b/tests/baselines/reference/recursiveTypeRelations.js index d006c9482d833..2c60edee813b1 100644 --- a/tests/baselines/reference/recursiveTypeRelations.js +++ b/tests/baselines/reference/recursiveTypeRelations.js @@ -39,7 +39,7 @@ export function css(styles: S, ...classNam //// [recursiveTypeRelations.js] "use strict"; // Repro from #14896 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Query = (function () { function Query() { } diff --git a/tests/baselines/reference/reexportClassDefinition.js b/tests/baselines/reference/reexportClassDefinition.js index aae728c9e2567..a18f4d0e6d18f 100644 --- a/tests/baselines/reference/reexportClassDefinition.js +++ b/tests/baselines/reference/reexportClassDefinition.js @@ -43,7 +43,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo2 = require("./foo2"); var x = (function (_super) { __extends(x, _super); diff --git a/tests/baselines/reference/relativeNamesInClassicResolution.js b/tests/baselines/reference/relativeNamesInClassicResolution.js index cb7616243ef4e..f04989770a492 100644 --- a/tests/baselines/reference/relativeNamesInClassicResolution.js +++ b/tests/baselines/reference/relativeNamesInClassicResolution.js @@ -9,11 +9,11 @@ export let x = 1; //// [a.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [b.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; }); diff --git a/tests/baselines/reference/relativePathMustResolve.js b/tests/baselines/reference/relativePathMustResolve.js index 52e760a0240ea..4cc34627008a0 100644 --- a/tests/baselines/reference/relativePathMustResolve.js +++ b/tests/baselines/reference/relativePathMustResolve.js @@ -10,6 +10,6 @@ var z = foo.x + 10; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./test/foo"); var z = foo.x + 10; diff --git a/tests/baselines/reference/relativePathToDeclarationFile.js b/tests/baselines/reference/relativePathToDeclarationFile.js index 58cf090ad86d4..ddc7a2710c8d5 100644 --- a/tests/baselines/reference/relativePathToDeclarationFile.js +++ b/tests/baselines/reference/relativePathToDeclarationFile.js @@ -28,7 +28,7 @@ if(foo.M2.x){ //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("foo"); var other = require("./other"); var relMod = require("./sub/relMod"); diff --git a/tests/baselines/reference/requireAsFunctionInExternalModule.js b/tests/baselines/reference/requireAsFunctionInExternalModule.js index f4eac77052a0b..ee2bffbd1ee0d 100644 --- a/tests/baselines/reference/requireAsFunctionInExternalModule.js +++ b/tests/baselines/reference/requireAsFunctionInExternalModule.js @@ -18,22 +18,22 @@ hello(); //// [c.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function require(a) { } -exports["default"] = require; +exports.default = require; function has(a) { return true; } exports.has = has; //// [m.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var c_1 = require("./c"); function hello() { } exports.hello = hello; if (c_1.has('ember-debug')) { - c_1["default"]('ember-debug'); + c_1.default('ember-debug'); } //// [m2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m_1 = require("./m"); m_1.hello(); diff --git a/tests/baselines/reference/requireEmitSemicolon.js b/tests/baselines/reference/requireEmitSemicolon.js index 667002efeaa67..d46317953c339 100644 --- a/tests/baselines/reference/requireEmitSemicolon.js +++ b/tests/baselines/reference/requireEmitSemicolon.js @@ -22,7 +22,7 @@ export module Database { //// [requireEmitSemicolon_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Models; (function (Models) { var Person = (function () { @@ -36,7 +36,7 @@ define(["require", "exports"], function (require, exports) { //// [requireEmitSemicolon_1.js] define(["require", "exports", "requireEmitSemicolon_0"], function (require, exports, P) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Database; (function (Database) { var DB = (function () { diff --git a/tests/baselines/reference/requireOfAnEmptyFile1.js b/tests/baselines/reference/requireOfAnEmptyFile1.js index e792d9fa763f5..6eaad4712d1df 100644 --- a/tests/baselines/reference/requireOfAnEmptyFile1.js +++ b/tests/baselines/reference/requireOfAnEmptyFile1.js @@ -12,4 +12,4 @@ import fs = require('./requireOfAnEmptyFile1_b'); //// [requireOfAnEmptyFile1_a.js] "use strict"; //requireOfAnEmptyFile1 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/reservedWords.js b/tests/baselines/reference/reservedWords.js index 3424c05418175..12fbcae0c651e 100644 --- a/tests/baselines/reference/reservedWords.js +++ b/tests/baselines/reference/reservedWords.js @@ -19,16 +19,16 @@ var obj2 = { //// [reservedWords.js] var obj = { - "if": 0, - "debugger": 2, - "break": 3, - "function": 4 + if: 0, + debugger: 2, + break: 3, + function: 4 }; //This compiles. var obj2 = { - "if": 0, - "while": 1, - "debugger": 2, - "break": 3, - "function": 4 + if: 0, + while: 1, + debugger: 2, + break: 3, + function: 4 }; diff --git a/tests/baselines/reference/reservedWords2.js b/tests/baselines/reference/reservedWords2.js index f172f37d05396..91c740591fd05 100644 --- a/tests/baselines/reference/reservedWords2.js +++ b/tests/baselines/reference/reservedWords2.js @@ -15,7 +15,7 @@ enum void {} //// [reservedWords2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); require(); while ( = require("dfdf")) ; @@ -28,8 +28,8 @@ function () { } throw function () { }; module; void {}; -var _a = { "while": 1, "return": 2 }, = _a["while"], = _a["return"]; -var _b = { "this": 1, "switch": { "continue": 2 } }, = _b["this"], = _b["switch"]["continue"]; +var _a = { while: 1, return: 2 }, = _a.while, = _a.return; +var _b = { this: 1, switch: { continue: 2 } }, = _b.this, = _b.switch.continue; var _c = void 0; debugger; if () diff --git a/tests/baselines/reference/returnValueInSetter.errors.txt b/tests/baselines/reference/returnValueInSetter.errors.txt index 4d7b0d185f904..c91e6f489ed85 100644 --- a/tests/baselines/reference/returnValueInSetter.errors.txt +++ b/tests/baselines/reference/returnValueInSetter.errors.txt @@ -1,12 +1,9 @@ -tests/cases/compiler/returnValueInSetter.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/returnValueInSetter.ts(3,9): error TS2408: Setters cannot return a value. -==== tests/cases/compiler/returnValueInSetter.ts (2 errors) ==== +==== tests/cases/compiler/returnValueInSetter.ts (1 errors) ==== class f { set x(value) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return null; // Should be an error ~~~~~~~~~~~~ !!! error TS2408: Setters cannot return a value. diff --git a/tests/baselines/reference/reuseInnerModuleMember.js b/tests/baselines/reference/reuseInnerModuleMember.js index d432daed2a721..bafa91b6a943d 100644 --- a/tests/baselines/reference/reuseInnerModuleMember.js +++ b/tests/baselines/reference/reuseInnerModuleMember.js @@ -17,10 +17,10 @@ module bar { //// [reuseInnerModuleMember_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [reuseInnerModuleMember_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var bar; (function (bar) { diff --git a/tests/baselines/reference/scannerClass2.js b/tests/baselines/reference/scannerClass2.js index 339098b481a19..664b50b082cf2 100644 --- a/tests/baselines/reference/scannerClass2.js +++ b/tests/baselines/reference/scannerClass2.js @@ -7,7 +7,7 @@ //// [scannerClass2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var LoggerAdapter = (function () { function LoggerAdapter(logger) { this.logger = logger; diff --git a/tests/baselines/reference/scannerES3NumericLiteral2.errors.txt b/tests/baselines/reference/scannerES3NumericLiteral2.errors.txt new file mode 100644 index 0000000000000..4c7345ba8566d --- /dev/null +++ b/tests/baselines/reference/scannerES3NumericLiteral2.errors.txt @@ -0,0 +1,7 @@ +tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral2.ts(1,1): error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. + + +==== tests/cases/conformance/scanner/ecmascript3/scannerES3NumericLiteral2.ts (1 errors) ==== + 01 + ~~ +!!! error TS1085: Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o1'. \ No newline at end of file diff --git a/tests/baselines/reference/scannerEnum1.js b/tests/baselines/reference/scannerEnum1.js index 75c182206b942..4f06d59757776 100644 --- a/tests/baselines/reference/scannerEnum1.js +++ b/tests/baselines/reference/scannerEnum1.js @@ -6,7 +6,7 @@ //// [scannerEnum1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var CodeGenTarget; (function (CodeGenTarget) { CodeGenTarget[CodeGenTarget["ES3"] = 0] = "ES3"; diff --git a/tests/baselines/reference/scopedPackages.js b/tests/baselines/reference/scopedPackages.js index 75606d2e1b9e7..c0be6730648c5 100644 --- a/tests/baselines/reference/scopedPackages.js +++ b/tests/baselines/reference/scopedPackages.js @@ -17,4 +17,4 @@ import { z } from "@be/bop/e/z"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/scopedPackagesClassic.js b/tests/baselines/reference/scopedPackagesClassic.js index f42acde230623..9257fc8c7aa30 100644 --- a/tests/baselines/reference/scopedPackagesClassic.js +++ b/tests/baselines/reference/scopedPackagesClassic.js @@ -9,4 +9,4 @@ import { x } from "@see/saw"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/setterBeforeGetter.errors.txt b/tests/baselines/reference/setterBeforeGetter.errors.txt deleted file mode 100644 index 2dbef84d3dd7a..0000000000000 --- a/tests/baselines/reference/setterBeforeGetter.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -tests/cases/compiler/setterBeforeGetter.ts(5,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/setterBeforeGetter.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/setterBeforeGetter.ts (2 errors) ==== - class Foo { - - private _bar: { a: string; }; - // should not be an error to order them this way - set bar(thing: { a: string; }) { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - this._bar = thing; - } - get bar(): { a: string; } { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return this._bar; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/setterBeforeGetter.symbols b/tests/baselines/reference/setterBeforeGetter.symbols new file mode 100644 index 0000000000000..d6a227b6f5423 --- /dev/null +++ b/tests/baselines/reference/setterBeforeGetter.symbols @@ -0,0 +1,31 @@ +=== tests/cases/compiler/setterBeforeGetter.ts === +class Foo { +>Foo : Symbol(Foo, Decl(setterBeforeGetter.ts, 0, 0)) + + private _bar: { a: string; }; +>_bar : Symbol(Foo._bar, Decl(setterBeforeGetter.ts, 0, 11)) +>a : Symbol(a, Decl(setterBeforeGetter.ts, 2, 19)) + + // should not be an error to order them this way + set bar(thing: { a: string; }) { +>bar : Symbol(Foo.bar, Decl(setterBeforeGetter.ts, 2, 33), Decl(setterBeforeGetter.ts, 6, 5)) +>thing : Symbol(thing, Decl(setterBeforeGetter.ts, 4, 12)) +>a : Symbol(a, Decl(setterBeforeGetter.ts, 4, 20)) + + this._bar = thing; +>this._bar : Symbol(Foo._bar, Decl(setterBeforeGetter.ts, 0, 11)) +>this : Symbol(Foo, Decl(setterBeforeGetter.ts, 0, 0)) +>_bar : Symbol(Foo._bar, Decl(setterBeforeGetter.ts, 0, 11)) +>thing : Symbol(thing, Decl(setterBeforeGetter.ts, 4, 12)) + } + get bar(): { a: string; } { +>bar : Symbol(Foo.bar, Decl(setterBeforeGetter.ts, 2, 33), Decl(setterBeforeGetter.ts, 6, 5)) +>a : Symbol(a, Decl(setterBeforeGetter.ts, 7, 16)) + + return this._bar; +>this._bar : Symbol(Foo._bar, Decl(setterBeforeGetter.ts, 0, 11)) +>this : Symbol(Foo, Decl(setterBeforeGetter.ts, 0, 0)) +>_bar : Symbol(Foo._bar, Decl(setterBeforeGetter.ts, 0, 11)) + } +} + diff --git a/tests/baselines/reference/setterBeforeGetter.types b/tests/baselines/reference/setterBeforeGetter.types new file mode 100644 index 0000000000000..9b3dd39f1cc91 --- /dev/null +++ b/tests/baselines/reference/setterBeforeGetter.types @@ -0,0 +1,32 @@ +=== tests/cases/compiler/setterBeforeGetter.ts === +class Foo { +>Foo : Foo + + private _bar: { a: string; }; +>_bar : { a: string; } +>a : string + + // should not be an error to order them this way + set bar(thing: { a: string; }) { +>bar : { a: string; } +>thing : { a: string; } +>a : string + + this._bar = thing; +>this._bar = thing : { a: string; } +>this._bar : { a: string; } +>this : this +>_bar : { a: string; } +>thing : { a: string; } + } + get bar(): { a: string; } { +>bar : { a: string; } +>a : string + + return this._bar; +>this._bar : { a: string; } +>this : this +>_bar : { a: string; } + } +} + diff --git a/tests/baselines/reference/setterWithReturn.errors.txt b/tests/baselines/reference/setterWithReturn.errors.txt index a0f04506a710b..d8a9e79320f1d 100644 --- a/tests/baselines/reference/setterWithReturn.errors.txt +++ b/tests/baselines/reference/setterWithReturn.errors.txt @@ -1,14 +1,11 @@ -tests/cases/compiler/setterWithReturn.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/setterWithReturn.ts(4,13): error TS2408: Setters cannot return a value. tests/cases/compiler/setterWithReturn.ts(7,13): error TS7027: Unreachable code detected. tests/cases/compiler/setterWithReturn.ts(7,13): error TS2408: Setters cannot return a value. -==== tests/cases/compiler/setterWithReturn.ts (4 errors) ==== +==== tests/cases/compiler/setterWithReturn.ts (3 errors) ==== class C234 { public set p1(arg1) { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. if (true) { return arg1; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/shebangBeforeReferences.js b/tests/baselines/reference/shebangBeforeReferences.js index 4ebf692e1d513..641338edcc5d1 100644 --- a/tests/baselines/reference/shebangBeforeReferences.js +++ b/tests/baselines/reference/shebangBeforeReferences.js @@ -17,6 +17,6 @@ use(x); //// [f.js] #!/usr/bin/env node "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var test_1 = require("test"); use(test_1.x); diff --git a/tests/baselines/reference/sourceMapValidationImport.js b/tests/baselines/reference/sourceMapValidationImport.js index 537c3c071350c..593d8ddb43dfe 100644 --- a/tests/baselines/reference/sourceMapValidationImport.js +++ b/tests/baselines/reference/sourceMapValidationImport.js @@ -10,7 +10,7 @@ var y = new b(); //// [sourceMapValidationImport.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var m; (function (m) { var c = (function () { diff --git a/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt b/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt index d1fc9b1b72060..e61e7bb887b5f 100644 --- a/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationImport.sourcemap.txt @@ -9,7 +9,7 @@ emittedFile:tests/cases/compiler/sourceMapValidationImport.js sourceFile:sourceMapValidationImport.ts ------------------------------------------------------------------- >>>"use strict"; ->>>exports.__esModule = true; +>>>Object.defineProperty(exports, "__esModule", { value: true }); >>>var m; 1 > 2 >^^^^ diff --git a/tests/baselines/reference/staticGetter1.errors.txt b/tests/baselines/reference/staticGetter1.errors.txt deleted file mode 100644 index 62b5d9d2fe672..0000000000000 --- a/tests/baselines/reference/staticGetter1.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/compiler/staticGetter1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/staticGetter1.ts (1 errors) ==== - // once caused stack overflow - class C { - static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return this; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/staticGetter1.symbols b/tests/baselines/reference/staticGetter1.symbols new file mode 100644 index 0000000000000..c749a5fe1a9fc --- /dev/null +++ b/tests/baselines/reference/staticGetter1.symbols @@ -0,0 +1,13 @@ +=== tests/cases/compiler/staticGetter1.ts === +// once caused stack overflow +class C { +>C : Symbol(C, Decl(staticGetter1.ts, 0, 0)) + + static get x() { +>x : Symbol(C.x, Decl(staticGetter1.ts, 1, 9)) + + return this; +>this : Symbol(C, Decl(staticGetter1.ts, 0, 0)) + } +} + diff --git a/tests/baselines/reference/staticGetter1.types b/tests/baselines/reference/staticGetter1.types new file mode 100644 index 0000000000000..e12e54d5942d8 --- /dev/null +++ b/tests/baselines/reference/staticGetter1.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/staticGetter1.ts === +// once caused stack overflow +class C { +>C : C + + static get x() { +>x : typeof C + + return this; +>this : typeof C + } +} + diff --git a/tests/baselines/reference/staticGetterAndSetter.errors.txt b/tests/baselines/reference/staticGetterAndSetter.errors.txt deleted file mode 100644 index e155d179c3fdf..0000000000000 --- a/tests/baselines/reference/staticGetterAndSetter.errors.txt +++ /dev/null @@ -1,14 +0,0 @@ -tests/cases/compiler/staticGetterAndSetter.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/staticGetterAndSetter.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/staticGetterAndSetter.ts (2 errors) ==== - class Foo { - static get Foo():number { return 0; } - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - static set Foo(n: number) {} - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - \ No newline at end of file diff --git a/tests/baselines/reference/staticGetterAndSetter.symbols b/tests/baselines/reference/staticGetterAndSetter.symbols new file mode 100644 index 0000000000000..eb5101fd54cff --- /dev/null +++ b/tests/baselines/reference/staticGetterAndSetter.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/staticGetterAndSetter.ts === +class Foo { +>Foo : Symbol(Foo, Decl(staticGetterAndSetter.ts, 0, 0)) + + static get Foo():number { return 0; } +>Foo : Symbol(Foo.Foo, Decl(staticGetterAndSetter.ts, 0, 11), Decl(staticGetterAndSetter.ts, 1, 41)) + + static set Foo(n: number) {} +>Foo : Symbol(Foo.Foo, Decl(staticGetterAndSetter.ts, 0, 11), Decl(staticGetterAndSetter.ts, 1, 41)) +>n : Symbol(n, Decl(staticGetterAndSetter.ts, 2, 19)) +} + diff --git a/tests/baselines/reference/staticGetterAndSetter.types b/tests/baselines/reference/staticGetterAndSetter.types new file mode 100644 index 0000000000000..d9b19bf1a5c27 --- /dev/null +++ b/tests/baselines/reference/staticGetterAndSetter.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/staticGetterAndSetter.ts === +class Foo { +>Foo : Foo + + static get Foo():number { return 0; } +>Foo : number +>0 : 0 + + static set Foo(n: number) {} +>Foo : number +>n : number +} + diff --git a/tests/baselines/reference/staticInstanceResolution3.js b/tests/baselines/reference/staticInstanceResolution3.js index 747aa93e63183..6f328d51fc4c1 100644 --- a/tests/baselines/reference/staticInstanceResolution3.js +++ b/tests/baselines/reference/staticInstanceResolution3.js @@ -14,7 +14,7 @@ WinJS.Promise.timeout(10); //// [staticInstanceResolution3_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Promise = (function () { function Promise() { } @@ -26,7 +26,7 @@ var Promise = (function () { exports.Promise = Promise; //// [staticInstanceResolution3_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var WinJS = require("./staticInstanceResolution3_0"); WinJS.Promise.timeout(10); diff --git a/tests/baselines/reference/staticInstanceResolution5.js b/tests/baselines/reference/staticInstanceResolution5.js index 0bbd1cf412f07..670aee6e5c301 100644 --- a/tests/baselines/reference/staticInstanceResolution5.js +++ b/tests/baselines/reference/staticInstanceResolution5.js @@ -19,7 +19,7 @@ function z(w3: WinJS) { } //// [staticInstanceResolution5_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Promise = (function () { function Promise() { } @@ -33,7 +33,7 @@ define(["require", "exports"], function (require, exports) { //// [staticInstanceResolution5_1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // these 3 should be errors var x = function (w1) { }; var y = function (w2) { }; diff --git a/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js b/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js index b8b5b030bcd87..f8a780b672a48 100644 --- a/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js +++ b/tests/baselines/reference/staticMethodWithTypeParameterExtendsClauseDeclFile.js @@ -23,7 +23,7 @@ export class publicClassWithWithPrivateTypeParameters { //// [staticMethodWithTypeParameterExtendsClauseDeclFile.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var privateClass = (function () { function privateClass() { } diff --git a/tests/baselines/reference/staticPropertyNotInClassType.errors.txt b/tests/baselines/reference/staticPropertyNotInClassType.errors.txt index 62f04b5c5fb14..69f839de11e44 100644 --- a/tests/baselines/reference/staticPropertyNotInClassType.errors.txt +++ b/tests/baselines/reference/staticPropertyNotInClassType.errors.txt @@ -1,26 +1,18 @@ -tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(4,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(5,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(16,16): error TS2339: Property 'foo' does not exist on type 'C'. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(17,16): error TS2339: Property 'bar' does not exist on type 'C'. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(18,16): error TS2339: Property 'x' does not exist on type 'C'. -tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(24,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(25,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(27,21): error TS2302: Static members cannot reference class type parameters. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(36,16): error TS2339: Property 'foo' does not exist on type 'C'. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(37,16): error TS2339: Property 'bar' does not exist on type 'C'. tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts(38,16): error TS2339: Property 'x' does not exist on type 'C'. -==== tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts (11 errors) ==== +==== tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts (7 errors) ==== module NonGeneric { class C { fn() { return this; } static get x() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set x(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. constructor(public a: number, private b: number) { } static foo: string; // not reflected in class type } @@ -46,11 +38,7 @@ tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType. class C { fn() { return this; } static get x() { return 1; } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set x(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. constructor(public a: T, private b: U) { } static foo: T; // not reflected in class type ~ diff --git a/tests/baselines/reference/staticVisibility.errors.txt b/tests/baselines/reference/staticVisibility.errors.txt index 43691d2744f0e..c3bb70872d9c6 100644 --- a/tests/baselines/reference/staticVisibility.errors.txt +++ b/tests/baselines/reference/staticVisibility.errors.txt @@ -2,12 +2,10 @@ tests/cases/compiler/staticVisibility.ts(9,9): error TS2662: Cannot find name 's tests/cases/compiler/staticVisibility.ts(12,9): error TS2662: Cannot find name 'b'. Did you mean the static member 'C1.b'? tests/cases/compiler/staticVisibility.ts(17,9): error TS2304: Cannot find name 'v'. tests/cases/compiler/staticVisibility.ts(18,14): error TS2339: Property 'p' does not exist on type 'typeof C1'. -tests/cases/compiler/staticVisibility.ts(30,12): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/staticVisibility.ts(32,12): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/staticVisibility.ts(32,29): error TS2304: Cannot find name 'barback'. -==== tests/cases/compiler/staticVisibility.ts (7 errors) ==== +==== tests/cases/compiler/staticVisibility.ts (5 errors) ==== class C1 { p: any; @@ -46,12 +44,8 @@ tests/cases/compiler/staticVisibility.ts(32,29): error TS2304: Cannot find name static get Bar() {return "bar";} // ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. static set Bar(bar:string) {barback = bar;} // not ok - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~~~~~~~ !!! error TS2304: Cannot find name 'barback'. diff --git a/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.js b/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.js index 16e8580e727cb..c7676b1de6f57 100644 --- a/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.js +++ b/tests/baselines/reference/strictModeReservedWordInImportEqualDeclaration.js @@ -4,4 +4,4 @@ import public = require("1"); //// [strictModeReservedWordInImportEqualDeclaration.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt index 606cc39afef98..ee6e3fb52c4db 100644 --- a/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt +++ b/tests/baselines/reference/stringIndexerConstrainsPropertyDeclarations.errors.txt @@ -4,10 +4,7 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(18,5): error TS2411: Property '2.0' of type 'number' is not assignable to string index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(20,5): error TS2411: Property '"4.0"' of type 'number' is not assignable to string index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(21,5): error TS2411: Property 'f' of type 'MyString' is not assignable to string index type 'string'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(28,5): error TS2411: Property 'foo' of type '() => string' is not assignable to string index type 'string'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(36,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(45,5): error TS2411: Property 'b' of type 'number' is not assignable to string index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(46,5): error TS2411: Property 'c' of type '() => {}' is not assignable to string index type 'string'. tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(48,5): error TS2411: Property '"e"' of type 'number' is not assignable to string index type 'string'. @@ -25,11 +22,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(78,5): error TS2322: Type '{ a: string; b: number; c: () => void; "d": string; "e": number; 1.0: string; 2.0: number; "3.0": string; "4.0": number; f: MyString; X: string; foo(): string; }' is not assignable to type '{ [x: string]: string; }'. Property 'b' is incompatible with index signature. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(90,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts(93,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts (27 errors) ==== +==== tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerConstrainsPropertyDeclarations.ts (22 errors) ==== // String indexer types constrain the types of named properties in their containing type interface MyString extends String { @@ -65,13 +60,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon !!! error TS2411: Property 'f' of type 'MyString' is not assignable to string index type 'string'. get X() { // ok - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; } set X(v) { } // ok - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { // error ~~~ @@ -84,8 +75,6 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon static foo() { } // ok static get X() { // ok - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } } @@ -172,13 +161,9 @@ tests/cases/conformance/types/objectTypeLiteral/indexSignatures/stringIndexerCon f: null, get X() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return ''; }, set X(v) { }, - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. foo() { return ''; } diff --git a/tests/baselines/reference/super1.js b/tests/baselines/reference/super1.js index 1ed0edbe0512d..a41ab9e5bcfa4 100644 --- a/tests/baselines/reference/super1.js +++ b/tests/baselines/reference/super1.js @@ -102,7 +102,7 @@ var SubSub1 = (function (_super) { return _super !== null && _super.apply(this, arguments) || this; } SubSub1.prototype.bar = function () { - return _super.prototype["super"].foo; + return _super.prototype.super.foo; }; return SubSub1; }(Sub1)); diff --git a/tests/baselines/reference/superCallInNonStaticMethod.errors.txt b/tests/baselines/reference/superCallInNonStaticMethod.errors.txt deleted file mode 100644 index d92cd22f57ef4..0000000000000 --- a/tests/baselines/reference/superCallInNonStaticMethod.errors.txt +++ /dev/null @@ -1,59 +0,0 @@ -tests/cases/compiler/superCallInNonStaticMethod.ts(30,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/superCallInNonStaticMethod.ts(37,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/superCallInNonStaticMethod.ts (2 errors) ==== - class Doing { - public instanceMethod() { - } - } - - class Other extends Doing { - // in instance method - public instanceMethod() { - super.instanceMethod(); - } - - // in a lambda inside a instance method - public lambdaInsideAnInstanceMethod() { - () => { - super.instanceMethod(); - } - } - - // in an object literal inside a instance method - public objectLiteralInsideAnInstanceMethod() { - return { - a: () => { - super.instanceMethod(); - }, - b: super.instanceMethod() - }; - } - - // in a getter - public get accessor() { - ~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - super.instanceMethod(); - - return 0; - } - - // in a setter - public set accessor(value: number) { - ~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - super.instanceMethod(); - } - - constructor() { - super(); - super.instanceMethod(); - } - - public propertyInitializer = super.instanceMethod(); - - public functionProperty = () => {super.instanceMethod(); }; - } - \ No newline at end of file diff --git a/tests/baselines/reference/superCallInNonStaticMethod.symbols b/tests/baselines/reference/superCallInNonStaticMethod.symbols new file mode 100644 index 0000000000000..0d322ec632170 --- /dev/null +++ b/tests/baselines/reference/superCallInNonStaticMethod.symbols @@ -0,0 +1,104 @@ +=== tests/cases/compiler/superCallInNonStaticMethod.ts === +class Doing { +>Doing : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) + + public instanceMethod() { +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + } +} + +class Other extends Doing { +>Other : Symbol(Other, Decl(superCallInNonStaticMethod.ts, 3, 1)) +>Doing : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) + + // in instance method + public instanceMethod() { +>instanceMethod : Symbol(Other.instanceMethod, Decl(superCallInNonStaticMethod.ts, 5, 27)) + + super.instanceMethod(); +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + } + + // in a lambda inside a instance method + public lambdaInsideAnInstanceMethod() { +>lambdaInsideAnInstanceMethod : Symbol(Other.lambdaInsideAnInstanceMethod, Decl(superCallInNonStaticMethod.ts, 9, 5)) + + () => { + super.instanceMethod(); +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + } + } + + // in an object literal inside a instance method + public objectLiteralInsideAnInstanceMethod() { +>objectLiteralInsideAnInstanceMethod : Symbol(Other.objectLiteralInsideAnInstanceMethod, Decl(superCallInNonStaticMethod.ts, 16, 5)) + + return { + a: () => { +>a : Symbol(a, Decl(superCallInNonStaticMethod.ts, 20, 16)) + + super.instanceMethod(); +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + + }, + b: super.instanceMethod() +>b : Symbol(b, Decl(superCallInNonStaticMethod.ts, 23, 14)) +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + + }; + } + + // in a getter + public get accessor() { +>accessor : Symbol(Other.accessor, Decl(superCallInNonStaticMethod.ts, 26, 5), Decl(superCallInNonStaticMethod.ts, 33, 5)) + + super.instanceMethod(); +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + + return 0; + } + + // in a setter + public set accessor(value: number) { +>accessor : Symbol(Other.accessor, Decl(superCallInNonStaticMethod.ts, 26, 5), Decl(superCallInNonStaticMethod.ts, 33, 5)) +>value : Symbol(value, Decl(superCallInNonStaticMethod.ts, 36, 24)) + + super.instanceMethod(); +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + } + + constructor() { + super(); +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) + + super.instanceMethod(); +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + } + + public propertyInitializer = super.instanceMethod(); +>propertyInitializer : Symbol(Other.propertyInitializer, Decl(superCallInNonStaticMethod.ts, 43, 5)) +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) + + public functionProperty = () => {super.instanceMethod(); }; +>functionProperty : Symbol(Other.functionProperty, Decl(superCallInNonStaticMethod.ts, 45, 56)) +>super.instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInNonStaticMethod.ts, 0, 0)) +>instanceMethod : Symbol(Doing.instanceMethod, Decl(superCallInNonStaticMethod.ts, 0, 13)) +} + diff --git a/tests/baselines/reference/superCallInNonStaticMethod.types b/tests/baselines/reference/superCallInNonStaticMethod.types new file mode 100644 index 0000000000000..9200140ec3ace --- /dev/null +++ b/tests/baselines/reference/superCallInNonStaticMethod.types @@ -0,0 +1,121 @@ +=== tests/cases/compiler/superCallInNonStaticMethod.ts === +class Doing { +>Doing : Doing + + public instanceMethod() { +>instanceMethod : () => void + } +} + +class Other extends Doing { +>Other : Other +>Doing : Doing + + // in instance method + public instanceMethod() { +>instanceMethod : () => void + + super.instanceMethod(); +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + } + + // in a lambda inside a instance method + public lambdaInsideAnInstanceMethod() { +>lambdaInsideAnInstanceMethod : () => void + + () => { +>() => { super.instanceMethod(); } : () => void + + super.instanceMethod(); +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + } + } + + // in an object literal inside a instance method + public objectLiteralInsideAnInstanceMethod() { +>objectLiteralInsideAnInstanceMethod : () => { a: () => void; b: void; } + + return { +>{ a: () => { super.instanceMethod(); }, b: super.instanceMethod() } : { a: () => void; b: void; } + + a: () => { +>a : () => void +>() => { super.instanceMethod(); } : () => void + + super.instanceMethod(); +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + + }, + b: super.instanceMethod() +>b : void +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + + }; + } + + // in a getter + public get accessor() { +>accessor : number + + super.instanceMethod(); +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + + return 0; +>0 : 0 + } + + // in a setter + public set accessor(value: number) { +>accessor : number +>value : number + + super.instanceMethod(); +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + } + + constructor() { + super(); +>super() : void +>super : typeof Doing + + super.instanceMethod(); +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + } + + public propertyInitializer = super.instanceMethod(); +>propertyInitializer : void +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void + + public functionProperty = () => {super.instanceMethod(); }; +>functionProperty : () => void +>() => {super.instanceMethod(); } : () => void +>super.instanceMethod() : void +>super.instanceMethod : () => void +>super : Doing +>instanceMethod : () => void +} + diff --git a/tests/baselines/reference/superCallInStaticMethod.errors.txt b/tests/baselines/reference/superCallInStaticMethod.errors.txt deleted file mode 100644 index 21198aa480dcb..0000000000000 --- a/tests/baselines/reference/superCallInStaticMethod.errors.txt +++ /dev/null @@ -1,55 +0,0 @@ -tests/cases/compiler/superCallInStaticMethod.ts(30,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/superCallInStaticMethod.ts(37,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/superCallInStaticMethod.ts (2 errors) ==== - class Doing { - public static staticMethod() { - } - } - - class Other extends Doing { - // in static method - public static staticMethod() { - super.staticMethod(); - } - - // in a lambda inside a static method - public static lambdaInsideAStaticMethod() { - () => { - super.staticMethod(); - } - } - - // in an object literal inside a static method - public static objectLiteralInsideAStaticMethod() { - return { - a: () => { - super.staticMethod(); - }, - b: super.staticMethod() - }; - } - - // in a getter - public static get staticGetter() { - ~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - super.staticMethod(); - - return 0; - } - - // in a setter - public static set staticGetter(value: number) { - ~~~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - super.staticMethod(); - } - - // in static method - public static initializerInAStaticMethod(a = super.staticMethod()) { - super.staticMethod(); - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/superCallInStaticMethod.symbols b/tests/baselines/reference/superCallInStaticMethod.symbols new file mode 100644 index 0000000000000..4cbb2e2187731 --- /dev/null +++ b/tests/baselines/reference/superCallInStaticMethod.symbols @@ -0,0 +1,96 @@ +=== tests/cases/compiler/superCallInStaticMethod.ts === +class Doing { +>Doing : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) + + public static staticMethod() { +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + } +} + +class Other extends Doing { +>Other : Symbol(Other, Decl(superCallInStaticMethod.ts, 3, 1)) +>Doing : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) + + // in static method + public static staticMethod() { +>staticMethod : Symbol(Other.staticMethod, Decl(superCallInStaticMethod.ts, 5, 27)) + + super.staticMethod(); +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + } + + // in a lambda inside a static method + public static lambdaInsideAStaticMethod() { +>lambdaInsideAStaticMethod : Symbol(Other.lambdaInsideAStaticMethod, Decl(superCallInStaticMethod.ts, 9, 5)) + + () => { + super.staticMethod(); +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + } + } + + // in an object literal inside a static method + public static objectLiteralInsideAStaticMethod() { +>objectLiteralInsideAStaticMethod : Symbol(Other.objectLiteralInsideAStaticMethod, Decl(superCallInStaticMethod.ts, 16, 5)) + + return { + a: () => { +>a : Symbol(a, Decl(superCallInStaticMethod.ts, 20, 16)) + + super.staticMethod(); +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + + }, + b: super.staticMethod() +>b : Symbol(b, Decl(superCallInStaticMethod.ts, 23, 14)) +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + + }; + } + + // in a getter + public static get staticGetter() { +>staticGetter : Symbol(Other.staticGetter, Decl(superCallInStaticMethod.ts, 26, 5), Decl(superCallInStaticMethod.ts, 33, 5)) + + super.staticMethod(); +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + + return 0; + } + + // in a setter + public static set staticGetter(value: number) { +>staticGetter : Symbol(Other.staticGetter, Decl(superCallInStaticMethod.ts, 26, 5), Decl(superCallInStaticMethod.ts, 33, 5)) +>value : Symbol(value, Decl(superCallInStaticMethod.ts, 36, 35)) + + super.staticMethod(); +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + } + + // in static method + public static initializerInAStaticMethod(a = super.staticMethod()) { +>initializerInAStaticMethod : Symbol(Other.initializerInAStaticMethod, Decl(superCallInStaticMethod.ts, 38, 5)) +>a : Symbol(a, Decl(superCallInStaticMethod.ts, 41, 45)) +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + + super.staticMethod(); +>super.staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) +>super : Symbol(Doing, Decl(superCallInStaticMethod.ts, 0, 0)) +>staticMethod : Symbol(Doing.staticMethod, Decl(superCallInStaticMethod.ts, 0, 13)) + } +} + diff --git a/tests/baselines/reference/superCallInStaticMethod.types b/tests/baselines/reference/superCallInStaticMethod.types new file mode 100644 index 0000000000000..fe14b8c8d91e8 --- /dev/null +++ b/tests/baselines/reference/superCallInStaticMethod.types @@ -0,0 +1,110 @@ +=== tests/cases/compiler/superCallInStaticMethod.ts === +class Doing { +>Doing : Doing + + public static staticMethod() { +>staticMethod : () => void + } +} + +class Other extends Doing { +>Other : Other +>Doing : Doing + + // in static method + public static staticMethod() { +>staticMethod : () => void + + super.staticMethod(); +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + } + + // in a lambda inside a static method + public static lambdaInsideAStaticMethod() { +>lambdaInsideAStaticMethod : () => void + + () => { +>() => { super.staticMethod(); } : () => void + + super.staticMethod(); +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + } + } + + // in an object literal inside a static method + public static objectLiteralInsideAStaticMethod() { +>objectLiteralInsideAStaticMethod : () => { a: () => void; b: void; } + + return { +>{ a: () => { super.staticMethod(); }, b: super.staticMethod() } : { a: () => void; b: void; } + + a: () => { +>a : () => void +>() => { super.staticMethod(); } : () => void + + super.staticMethod(); +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + + }, + b: super.staticMethod() +>b : void +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + + }; + } + + // in a getter + public static get staticGetter() { +>staticGetter : number + + super.staticMethod(); +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + + return 0; +>0 : 0 + } + + // in a setter + public static set staticGetter(value: number) { +>staticGetter : number +>value : number + + super.staticMethod(); +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + } + + // in static method + public static initializerInAStaticMethod(a = super.staticMethod()) { +>initializerInAStaticMethod : (a?: void) => void +>a : void +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + + super.staticMethod(); +>super.staticMethod() : void +>super.staticMethod : () => void +>super : typeof Doing +>staticMethod : () => void + } +} + diff --git a/tests/baselines/reference/superPropertyAccess.errors.txt b/tests/baselines/reference/superPropertyAccess.errors.txt index e1b813453900c..6f1de686726eb 100644 --- a/tests/baselines/reference/superPropertyAccess.errors.txt +++ b/tests/baselines/reference/superPropertyAccess.errors.txt @@ -1,5 +1,3 @@ -tests/cases/compiler/superPropertyAccess.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/superPropertyAccess.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/superPropertyAccess.ts(21,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/compiler/superPropertyAccess.ts(23,15): error TS2341: Property 'p1' is private and only accessible within class 'MyBase'. tests/cases/compiler/superPropertyAccess.ts(25,24): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. @@ -8,7 +6,7 @@ tests/cases/compiler/superPropertyAccess.ts(31,15): error TS2340: Only public an tests/cases/compiler/superPropertyAccess.ts(33,23): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -==== tests/cases/compiler/superPropertyAccess.ts (8 errors) ==== +==== tests/cases/compiler/superPropertyAccess.ts (6 errors) ==== class MyBase { m1(a: string) { return a; } private p1() { } @@ -16,11 +14,7 @@ tests/cases/compiler/superPropertyAccess.ts(33,23): error TS2340: Only public an d1: number = 42; private d2: number = 42; get value() {return 0 } - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. set value(v: number) { } - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } diff --git a/tests/baselines/reference/superPropertyAccess1.errors.txt b/tests/baselines/reference/superPropertyAccess1.errors.txt index aed25fd6a92c8..79e7405aaaae7 100644 --- a/tests/baselines/reference/superPropertyAccess1.errors.txt +++ b/tests/baselines/reference/superPropertyAccess1.errors.txt @@ -1,16 +1,12 @@ -tests/cases/compiler/superPropertyAccess1.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/superPropertyAccess1.ts(13,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. tests/cases/compiler/superPropertyAccess1.ts(19,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -tests/cases/compiler/superPropertyAccess1.ts(22,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/superPropertyAccess1.ts(24,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -==== tests/cases/compiler/superPropertyAccess1.ts (5 errors) ==== +==== tests/cases/compiler/superPropertyAccess1.ts (3 errors) ==== class C { public foo() { } public get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } @@ -34,8 +30,6 @@ tests/cases/compiler/superPropertyAccess1.ts(24,15): error TS2340: Only public a } public get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.bar(); super.x; // error ~ diff --git a/tests/baselines/reference/superPropertyAccess2.errors.txt b/tests/baselines/reference/superPropertyAccess2.errors.txt index 2512ad91faec1..54ef546a2efdc 100644 --- a/tests/baselines/reference/superPropertyAccess2.errors.txt +++ b/tests/baselines/reference/superPropertyAccess2.errors.txt @@ -1,17 +1,13 @@ -tests/cases/compiler/superPropertyAccess2.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/superPropertyAccess2.ts(13,15): error TS2339: Property 'x' does not exist on type 'typeof C'. tests/cases/compiler/superPropertyAccess2.ts(18,15): error TS2339: Property 'bar' does not exist on type 'C'. tests/cases/compiler/superPropertyAccess2.ts(19,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword. -tests/cases/compiler/superPropertyAccess2.ts(22,23): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/superPropertyAccess2.ts(24,15): error TS2339: Property 'x' does not exist on type 'typeof C'. -==== tests/cases/compiler/superPropertyAccess2.ts (6 errors) ==== +==== tests/cases/compiler/superPropertyAccess2.ts (4 errors) ==== class C { public static foo() { } public get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } @@ -37,8 +33,6 @@ tests/cases/compiler/superPropertyAccess2.ts(24,15): error TS2339: Property 'x' } public static get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super.bar(); // OK super.x; // error ~ diff --git a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.errors.txt b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.errors.txt index 5fe7fa59ff6a9..91b67ce23b2d8 100644 --- a/tests/baselines/reference/super_inside-object-literal-getters-and-setters.errors.txt +++ b/tests/baselines/reference/super_inside-object-literal-getters-and-setters.errors.txt @@ -1,26 +1,19 @@ -tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(5,20): error TS2659: 'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher. -tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(8,13): error TS2659: 'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher. tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(11,20): error TS2660: 'super' can only be referenced in members of derived classes or object literal expressions. -tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(20,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(21,24): error TS2659: 'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher. -==== tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts (7 errors) ==== +==== tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts (4 errors) ==== module ObjectLiteral { var ThisInObjectLiteral = { _foo: '1', get foo(): string { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return super._foo; ~~~~~ !!! error TS2659: 'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher. }, set foo(value: string) { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. super._foo = value; ~~~~~ !!! error TS2659: 'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher. @@ -38,8 +31,6 @@ tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts(21,24): public testing() { var test = { get F() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return super.test(); ~~~~~ !!! error TS2659: 'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher. diff --git a/tests/baselines/reference/systemModule10.js b/tests/baselines/reference/systemModule10.js index 303e986dcc7e8..c4e343d41d83b 100644 --- a/tests/baselines/reference/systemModule10.js +++ b/tests/baselines/reference/systemModule10.js @@ -23,8 +23,8 @@ System.register(["file1", "file2"], function (exports_1, context_1) { } ], execute: function () { - exports_1("n", file1_1["default"]); - exports_1("n1", file1_1["default"]); + exports_1("n", file1_1.default); + exports_1("n1", file1_1.default); exports_1("x", file1_1.x); exports_1("y", file1_1.x); exports_1("n2", n2); diff --git a/tests/baselines/reference/systemModule15.js b/tests/baselines/reference/systemModule15.js index 0db82701a0174..66f6200d1527e 100644 --- a/tests/baselines/reference/systemModule15.js +++ b/tests/baselines/reference/systemModule15.js @@ -68,7 +68,7 @@ System.register(["./file3"], function (exports_1, context_1) { ], execute: function () { exports_1("moduleCStar", moduleCStar); - exports_1("moduleC", file3_1["default"]); + exports_1("moduleC", file3_1.default); exports_1("value", file3_2.value); } }; diff --git a/tests/baselines/reference/systemModule9.js b/tests/baselines/reference/systemModule9.js index b83d62f9cf808..abc81ae5ad159 100644 --- a/tests/baselines/reference/systemModule9.js +++ b/tests/baselines/reference/systemModule9.js @@ -63,8 +63,8 @@ System.register(["file1", "file2", "file3", "file4", "file5", "file6", "file7"], ns.f(); file2_1.a(); file2_1.b(); - file3_1["default"](); - file5_1["default"](); + file3_1.default(); + file5_1.default(); ns2.f(); ns3.f(); y = true; diff --git a/tests/baselines/reference/thisInAccessors.errors.txt b/tests/baselines/reference/thisInAccessors.errors.txt deleted file mode 100644 index de47da8243416..0000000000000 --- a/tests/baselines/reference/thisInAccessors.errors.txt +++ /dev/null @@ -1,51 +0,0 @@ -tests/cases/compiler/thisInAccessors.ts(3,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/thisInAccessors.ts(7,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/thisInAccessors.ts(13,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/thisInAccessors.ts(16,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/thisInAccessors.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/thisInAccessors.ts(27,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/thisInAccessors.ts (6 errors) ==== - // this capture only in getter - class GetterOnly { - get Value() { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var fn = () => this; - return ''; - } - set Value(val) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - } - - // this capture only in setter - class SetterOnly { - get Value() { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return ''; - } - set Value(val) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var fn = () => this; - } - } - - // this capture only in both setter and getter - class GetterAndSetter { - get Value() { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var fn = () => this; - return ''; - } - set Value(val) { - ~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var fn = () => this; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/thisInAccessors.symbols b/tests/baselines/reference/thisInAccessors.symbols new file mode 100644 index 0000000000000..685a5f695e7ae --- /dev/null +++ b/tests/baselines/reference/thisInAccessors.symbols @@ -0,0 +1,61 @@ +=== tests/cases/compiler/thisInAccessors.ts === +// this capture only in getter +class GetterOnly { +>GetterOnly : Symbol(GetterOnly, Decl(thisInAccessors.ts, 0, 0)) + + get Value() { +>Value : Symbol(GetterOnly.Value, Decl(thisInAccessors.ts, 1, 18), Decl(thisInAccessors.ts, 5, 5)) + + var fn = () => this; +>fn : Symbol(fn, Decl(thisInAccessors.ts, 3, 11)) +>this : Symbol(GetterOnly, Decl(thisInAccessors.ts, 0, 0)) + + return ''; + } + set Value(val) { +>Value : Symbol(GetterOnly.Value, Decl(thisInAccessors.ts, 1, 18), Decl(thisInAccessors.ts, 5, 5)) +>val : Symbol(val, Decl(thisInAccessors.ts, 6, 14)) + } +} + +// this capture only in setter +class SetterOnly { +>SetterOnly : Symbol(SetterOnly, Decl(thisInAccessors.ts, 8, 1)) + + get Value() { +>Value : Symbol(SetterOnly.Value, Decl(thisInAccessors.ts, 11, 18), Decl(thisInAccessors.ts, 14, 5)) + + return ''; + } + set Value(val) { +>Value : Symbol(SetterOnly.Value, Decl(thisInAccessors.ts, 11, 18), Decl(thisInAccessors.ts, 14, 5)) +>val : Symbol(val, Decl(thisInAccessors.ts, 15, 14)) + + var fn = () => this; +>fn : Symbol(fn, Decl(thisInAccessors.ts, 16, 11)) +>this : Symbol(SetterOnly, Decl(thisInAccessors.ts, 8, 1)) + } +} + +// this capture only in both setter and getter +class GetterAndSetter { +>GetterAndSetter : Symbol(GetterAndSetter, Decl(thisInAccessors.ts, 18, 1)) + + get Value() { +>Value : Symbol(GetterAndSetter.Value, Decl(thisInAccessors.ts, 21, 23), Decl(thisInAccessors.ts, 25, 5)) + + var fn = () => this; +>fn : Symbol(fn, Decl(thisInAccessors.ts, 23, 11)) +>this : Symbol(GetterAndSetter, Decl(thisInAccessors.ts, 18, 1)) + + return ''; + } + set Value(val) { +>Value : Symbol(GetterAndSetter.Value, Decl(thisInAccessors.ts, 21, 23), Decl(thisInAccessors.ts, 25, 5)) +>val : Symbol(val, Decl(thisInAccessors.ts, 26, 14)) + + var fn = () => this; +>fn : Symbol(fn, Decl(thisInAccessors.ts, 27, 11)) +>this : Symbol(GetterAndSetter, Decl(thisInAccessors.ts, 18, 1)) + } +} diff --git a/tests/baselines/reference/thisInAccessors.types b/tests/baselines/reference/thisInAccessors.types new file mode 100644 index 0000000000000..79f8a5c985c0d --- /dev/null +++ b/tests/baselines/reference/thisInAccessors.types @@ -0,0 +1,68 @@ +=== tests/cases/compiler/thisInAccessors.ts === +// this capture only in getter +class GetterOnly { +>GetterOnly : GetterOnly + + get Value() { +>Value : string + + var fn = () => this; +>fn : () => this +>() => this : () => this +>this : this + + return ''; +>'' : "" + } + set Value(val) { +>Value : string +>val : string + } +} + +// this capture only in setter +class SetterOnly { +>SetterOnly : SetterOnly + + get Value() { +>Value : string + + return ''; +>'' : "" + } + set Value(val) { +>Value : string +>val : string + + var fn = () => this; +>fn : () => this +>() => this : () => this +>this : this + } +} + +// this capture only in both setter and getter +class GetterAndSetter { +>GetterAndSetter : GetterAndSetter + + get Value() { +>Value : string + + var fn = () => this; +>fn : () => this +>() => this : () => this +>this : this + + return ''; +>'' : "" + } + set Value(val) { +>Value : string +>val : string + + var fn = () => this; +>fn : () => this +>() => this : () => this +>this : this + } +} diff --git a/tests/baselines/reference/thisInStatics.errors.txt b/tests/baselines/reference/thisInStatics.errors.txt deleted file mode 100644 index a8e8edbb76907..0000000000000 --- a/tests/baselines/reference/thisInStatics.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -tests/cases/compiler/thisInStatics.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/thisInStatics.ts (1 errors) ==== - class C { - static f() { - var y/*1*/ = this; - } - - static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var y/*2*/ = this; - return y; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/thisInStatics.symbols b/tests/baselines/reference/thisInStatics.symbols new file mode 100644 index 0000000000000..8cdbc159487dd --- /dev/null +++ b/tests/baselines/reference/thisInStatics.symbols @@ -0,0 +1,23 @@ +=== tests/cases/compiler/thisInStatics.ts === +class C { +>C : Symbol(C, Decl(thisInStatics.ts, 0, 0)) + + static f() { +>f : Symbol(C.f, Decl(thisInStatics.ts, 0, 9)) + + var y/*1*/ = this; +>y : Symbol(y, Decl(thisInStatics.ts, 2, 11)) +>this : Symbol(C, Decl(thisInStatics.ts, 0, 0)) + } + + static get x() { +>x : Symbol(C.x, Decl(thisInStatics.ts, 3, 5)) + + var y/*2*/ = this; +>y : Symbol(y, Decl(thisInStatics.ts, 6, 11)) +>this : Symbol(C, Decl(thisInStatics.ts, 0, 0)) + + return y; +>y : Symbol(y, Decl(thisInStatics.ts, 6, 11)) + } +} diff --git a/tests/baselines/reference/thisInStatics.types b/tests/baselines/reference/thisInStatics.types new file mode 100644 index 0000000000000..2c059c9af23da --- /dev/null +++ b/tests/baselines/reference/thisInStatics.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/thisInStatics.ts === +class C { +>C : C + + static f() { +>f : () => void + + var y/*1*/ = this; +>y : typeof C +>this : typeof C + } + + static get x() { +>x : typeof C + + var y/*2*/ = this; +>y : typeof C +>this : typeof C + + return y; +>y : typeof C + } +} diff --git a/tests/baselines/reference/this_inside-object-literal-getters-and-setters.errors.txt b/tests/baselines/reference/this_inside-object-literal-getters-and-setters.errors.txt deleted file mode 100644 index 456d264a12f9d..0000000000000 --- a/tests/baselines/reference/this_inside-object-literal-getters-and-setters.errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts (2 errors) ==== - module ObjectLiteral { - var ThisInObjectLiteral = { - _foo: '1', - get foo(): string { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return this._foo; - }, - set foo(value: string) { - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - this._foo = value; - }, - test: function () { - return this._foo; - } - } - } - - \ No newline at end of file diff --git a/tests/baselines/reference/this_inside-object-literal-getters-and-setters.symbols b/tests/baselines/reference/this_inside-object-literal-getters-and-setters.symbols new file mode 100644 index 0000000000000..aa05f59389afb --- /dev/null +++ b/tests/baselines/reference/this_inside-object-literal-getters-and-setters.symbols @@ -0,0 +1,32 @@ +=== tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts === +module ObjectLiteral { +>ObjectLiteral : Symbol(ObjectLiteral, Decl(this_inside-object-literal-getters-and-setters.ts, 0, 0)) + + var ThisInObjectLiteral = { +>ThisInObjectLiteral : Symbol(ThisInObjectLiteral, Decl(this_inside-object-literal-getters-and-setters.ts, 1, 7)) + + _foo: '1', +>_foo : Symbol(_foo, Decl(this_inside-object-literal-getters-and-setters.ts, 1, 31)) + + get foo(): string { +>foo : Symbol(foo, Decl(this_inside-object-literal-getters-and-setters.ts, 2, 18), Decl(this_inside-object-literal-getters-and-setters.ts, 5, 10)) + + return this._foo; + }, + set foo(value: string) { +>foo : Symbol(foo, Decl(this_inside-object-literal-getters-and-setters.ts, 2, 18), Decl(this_inside-object-literal-getters-and-setters.ts, 5, 10)) +>value : Symbol(value, Decl(this_inside-object-literal-getters-and-setters.ts, 6, 16)) + + this._foo = value; +>value : Symbol(value, Decl(this_inside-object-literal-getters-and-setters.ts, 6, 16)) + + }, + test: function () { +>test : Symbol(test, Decl(this_inside-object-literal-getters-and-setters.ts, 8, 10)) + + return this._foo; + } + } +} + + diff --git a/tests/baselines/reference/this_inside-object-literal-getters-and-setters.types b/tests/baselines/reference/this_inside-object-literal-getters-and-setters.types new file mode 100644 index 0000000000000..1c1238d770ff0 --- /dev/null +++ b/tests/baselines/reference/this_inside-object-literal-getters-and-setters.types @@ -0,0 +1,46 @@ +=== tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts === +module ObjectLiteral { +>ObjectLiteral : typeof ObjectLiteral + + var ThisInObjectLiteral = { +>ThisInObjectLiteral : { _foo: string; foo: string; test: () => any; } +>{ _foo: '1', get foo(): string { return this._foo; }, set foo(value: string) { this._foo = value; }, test: function () { return this._foo; } } : { _foo: string; foo: string; test: () => any; } + + _foo: '1', +>_foo : string +>'1' : "1" + + get foo(): string { +>foo : string + + return this._foo; +>this._foo : any +>this : any +>_foo : any + + }, + set foo(value: string) { +>foo : string +>value : string + + this._foo = value; +>this._foo = value : string +>this._foo : any +>this : any +>_foo : any +>value : string + + }, + test: function () { +>test : () => any +>function () { return this._foo; } : () => any + + return this._foo; +>this._foo : any +>this : any +>_foo : any + } + } +} + + diff --git a/tests/baselines/reference/topLevelAmbientModule.js b/tests/baselines/reference/topLevelAmbientModule.js index 3e162170c87a1..bbe5ad74aae27 100644 --- a/tests/baselines/reference/topLevelAmbientModule.js +++ b/tests/baselines/reference/topLevelAmbientModule.js @@ -14,7 +14,7 @@ var z = foo.x + 10; //// [foo_0.js] //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foo = require("foo"); var z = foo.x + 10; diff --git a/tests/baselines/reference/topLevelExports.js b/tests/baselines/reference/topLevelExports.js index 5f58c44d2f262..c293bcf64c854 100644 --- a/tests/baselines/reference/topLevelExports.js +++ b/tests/baselines/reference/topLevelExports.js @@ -8,7 +8,7 @@ void log(foo).toString(); //// [topLevelExports.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = 3; function log(n) { return n; } void log(exports.foo).toString(); diff --git a/tests/baselines/reference/topLevelFileModule.js b/tests/baselines/reference/topLevelFileModule.js index 8ff74cc89f48e..278624ed22ac2 100644 --- a/tests/baselines/reference/topLevelFileModule.js +++ b/tests/baselines/reference/topLevelFileModule.js @@ -14,10 +14,10 @@ var z = foo.x + fum.y; //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("./vs/foo_0"); var fum = require("./vs/fum"); var z = foo.x + fum.y; diff --git a/tests/baselines/reference/topLevelFileModuleMissing.js b/tests/baselines/reference/topLevelFileModuleMissing.js index 37d9ac5b1506a..0378ec6cdc4ef 100644 --- a/tests/baselines/reference/topLevelFileModuleMissing.js +++ b/tests/baselines/reference/topLevelFileModuleMissing.js @@ -10,6 +10,6 @@ var z = foo.x + 10; //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("vs/foo"); var z = foo.x + 10; diff --git a/tests/baselines/reference/topLevelLambda4.js b/tests/baselines/reference/topLevelLambda4.js index 5ccfb91bec7ae..67c15dbb9b4fd 100644 --- a/tests/baselines/reference/topLevelLambda4.js +++ b/tests/baselines/reference/topLevelLambda4.js @@ -5,6 +5,6 @@ export var x = () => this.window; define(["require", "exports"], function (require, exports) { "use strict"; var _this = this; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = function () { return _this.window; }; }); diff --git a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js index 8f4ecb37d3112..0d221cb723adb 100644 --- a/tests/baselines/reference/topLevelModuleDeclarationAndFile.js +++ b/tests/baselines/reference/topLevelModuleDeclarationAndFile.js @@ -19,7 +19,7 @@ var z2 = foo.y() + 10; // Should resolve //// [foo_1.js] //// [foo_2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foo = require("vs/foo_0"); var z1 = foo.x + 10; // Should error, as declaration should win diff --git a/tests/baselines/reference/transpile/Generates no diagnostics for missing module imports.js b/tests/baselines/reference/transpile/Generates no diagnostics for missing module imports.js index e9493d9d5917d..61215bc876f57 100644 --- a/tests/baselines/reference/transpile/Generates no diagnostics for missing module imports.js +++ b/tests/baselines/reference/transpile/Generates no diagnostics for missing module imports.js @@ -1,3 +1,3 @@ "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=file.js.map \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Rename dependencies - AMD.js b/tests/baselines/reference/transpile/Rename dependencies - AMD.js index c5ffb86a1aa34..5874219d5bdda 100644 --- a/tests/baselines/reference/transpile/Rename dependencies - AMD.js +++ b/tests/baselines/reference/transpile/Rename dependencies - AMD.js @@ -1,6 +1,6 @@ define(["require", "exports", "SomeOtherName"], function (require, exports, SomeName_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); use(SomeName_1.foo); }); //# sourceMappingURL=file.js.map \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Rename dependencies - UMD.js b/tests/baselines/reference/transpile/Rename dependencies - UMD.js index 0ecfbce239727..d8b8cf43986f2 100644 --- a/tests/baselines/reference/transpile/Rename dependencies - UMD.js +++ b/tests/baselines/reference/transpile/Rename dependencies - UMD.js @@ -8,7 +8,7 @@ } })(function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var SomeName_1 = require("SomeOtherName"); use(SomeName_1.foo); }); diff --git a/tests/baselines/reference/tsxAttributeResolution10.js b/tests/baselines/reference/tsxAttributeResolution10.js index 141743c17bc20..1fc424cce149c 100644 --- a/tests/baselines/reference/tsxAttributeResolution10.js +++ b/tests/baselines/reference/tsxAttributeResolution10.js @@ -33,7 +33,7 @@ export class MyComponent { //// [file.jsx] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var MyComponent = (function () { function MyComponent() { } diff --git a/tests/baselines/reference/tsxAttributeResolution15.js b/tests/baselines/reference/tsxAttributeResolution15.js index 0fbc01e6e0fce..e587f4c79dcff 100644 --- a/tests/baselines/reference/tsxAttributeResolution15.js +++ b/tests/baselines/reference/tsxAttributeResolution15.js @@ -28,7 +28,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); var _this = this; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var BigGreeter = (function (_super) { __extends(BigGreeter, _super); diff --git a/tests/baselines/reference/tsxAttributeResolution16.js b/tests/baselines/reference/tsxAttributeResolution16.js index 1c05446b4938e..57e92d8378436 100644 --- a/tests/baselines/reference/tsxAttributeResolution16.js +++ b/tests/baselines/reference/tsxAttributeResolution16.js @@ -36,7 +36,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var AddressComp = (function (_super) { __extends(AddressComp, _super); diff --git a/tests/baselines/reference/tsxAttributeResolution9.js b/tests/baselines/reference/tsxAttributeResolution9.js index a982fea412b1e..04735e4c581a2 100644 --- a/tests/baselines/reference/tsxAttributeResolution9.js +++ b/tests/baselines/reference/tsxAttributeResolution9.js @@ -29,7 +29,7 @@ export class MyComponent { //// [file.jsx] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var MyComponent = (function () { function MyComponent() { } diff --git a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js index f6403804fae29..807c45a1b95dd 100644 --- a/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js +++ b/tests/baselines/reference/tsxCorrectlyParseLessThanComparison1.js @@ -31,7 +31,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ShortDetails = (function (_super) { __extends(ShortDetails, _super); function ShortDetails() { diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution1.js b/tests/baselines/reference/tsxDefaultAttributesResolution1.js index 8d22db3b69f13..29cf189cd0e3a 100644 --- a/tests/baselines/reference/tsxDefaultAttributesResolution1.js +++ b/tests/baselines/reference/tsxDefaultAttributesResolution1.js @@ -25,7 +25,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution2.js b/tests/baselines/reference/tsxDefaultAttributesResolution2.js index 38735169f10a3..74e6660b3f278 100644 --- a/tests/baselines/reference/tsxDefaultAttributesResolution2.js +++ b/tests/baselines/reference/tsxDefaultAttributesResolution2.js @@ -25,7 +25,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxDefaultAttributesResolution3.js b/tests/baselines/reference/tsxDefaultAttributesResolution3.js index 14da51516b578..483fbfda921bb 100644 --- a/tests/baselines/reference/tsxDefaultAttributesResolution3.js +++ b/tests/baselines/reference/tsxDefaultAttributesResolution3.js @@ -25,7 +25,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxDefaultImports.js b/tests/baselines/reference/tsxDefaultImports.js index a6c1a4217a3ac..8e457196a3662 100644 --- a/tests/baselines/reference/tsxDefaultImports.js +++ b/tests/baselines/reference/tsxDefaultImports.js @@ -15,7 +15,7 @@ let a = Def.E.one; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var SomeEnum; (function (SomeEnum) { SomeEnum[SomeEnum["one"] = 0] = "one"; @@ -26,9 +26,9 @@ var SomeClass = (function () { return SomeClass; }()); SomeClass.E = SomeEnum; -exports["default"] = SomeClass; +exports.default = SomeClass; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var a_1 = require("./a"); -var a = a_1["default"].E.one; +var a = a_1.default.E.one; diff --git a/tests/baselines/reference/tsxDynamicTagName5.js b/tests/baselines/reference/tsxDynamicTagName5.js index 1aa3650a9632d..4f9eaec472d36 100644 --- a/tests/baselines/reference/tsxDynamicTagName5.js +++ b/tests/baselines/reference/tsxDynamicTagName5.js @@ -30,7 +30,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName7.js b/tests/baselines/reference/tsxDynamicTagName7.js index 1bfade5d5da29..37b2031cb9727 100644 --- a/tests/baselines/reference/tsxDynamicTagName7.js +++ b/tests/baselines/reference/tsxDynamicTagName7.js @@ -30,7 +30,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName8.js b/tests/baselines/reference/tsxDynamicTagName8.js index 34a587c7d19b3..1569219094cdc 100644 --- a/tests/baselines/reference/tsxDynamicTagName8.js +++ b/tests/baselines/reference/tsxDynamicTagName8.js @@ -30,7 +30,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxDynamicTagName9.js b/tests/baselines/reference/tsxDynamicTagName9.js index e5229f97a39da..1228340501d83 100644 --- a/tests/baselines/reference/tsxDynamicTagName9.js +++ b/tests/baselines/reference/tsxDynamicTagName9.js @@ -30,7 +30,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Text = (function (_super) { __extends(Text, _super); diff --git a/tests/baselines/reference/tsxElementResolution17.js b/tests/baselines/reference/tsxElementResolution17.js index 1f61a441d66b9..b319f3f6f928d 100644 --- a/tests/baselines/reference/tsxElementResolution17.js +++ b/tests/baselines/reference/tsxElementResolution17.js @@ -30,6 +30,6 @@ import s2 = require('elements2'); //// [consumer.jsx] define(["require", "exports", "elements1"], function (require, exports, s1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); ; }); diff --git a/tests/baselines/reference/tsxElementResolution19.js b/tests/baselines/reference/tsxElementResolution19.js index d63ab29794d2d..eb0bab62e5a72 100644 --- a/tests/baselines/reference/tsxElementResolution19.js +++ b/tests/baselines/reference/tsxElementResolution19.js @@ -22,7 +22,7 @@ import {MyClass} from './file1'; //// [file1.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var MyClass = (function () { function MyClass() { } @@ -33,6 +33,6 @@ define(["require", "exports"], function (require, exports) { //// [file2.js] define(["require", "exports", "react", "./file1"], function (require, exports, React, file1_1) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); React.createElement(file1_1.MyClass, null); }); diff --git a/tests/baselines/reference/tsxExternalModuleEmit1.js b/tests/baselines/reference/tsxExternalModuleEmit1.js index 578d952be983d..12f6a3a01f826 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit1.js +++ b/tests/baselines/reference/tsxExternalModuleEmit1.js @@ -42,7 +42,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Button = (function (_super) { __extends(Button, _super); @@ -67,7 +67,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); // Should see var button_1 = require('./button') here var button_1 = require("./button"); diff --git a/tests/baselines/reference/tsxExternalModuleEmit2.js b/tests/baselines/reference/tsxExternalModuleEmit2.js index adf5ed2aaa633..fb7e6a6953083 100644 --- a/tests/baselines/reference/tsxExternalModuleEmit2.js +++ b/tests/baselines/reference/tsxExternalModuleEmit2.js @@ -26,9 +26,9 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { } return t; }; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var mod_1 = require("mod"); // Should see mod_1['default'] in emit here -React.createElement(Foo, { handler: mod_1["default"] }); +React.createElement(Foo, { handler: mod_1.default }); // Should see mod_1['default'] in emit here -React.createElement(Foo, __assign({}, mod_1["default"])); +React.createElement(Foo, __assign({}, mod_1.default)); diff --git a/tests/baselines/reference/tsxPreserveEmit3.js b/tests/baselines/reference/tsxPreserveEmit3.js index d886d4169b817..36d662362d99d 100644 --- a/tests/baselines/reference/tsxPreserveEmit3.js +++ b/tests/baselines/reference/tsxPreserveEmit3.js @@ -20,5 +20,5 @@ import {React} from "./test"; //// [react-consumer.jsx] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/tsxReactEmit5.js b/tests/baselines/reference/tsxReactEmit5.js index de1e2bf30e22f..e30c5ef894ca4 100644 --- a/tests/baselines/reference/tsxReactEmit5.js +++ b/tests/baselines/reference/tsxReactEmit5.js @@ -30,7 +30,7 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { } return t; }; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var test_1 = require("./test"); // Should emit test_1.React.createElement // and React.__spread diff --git a/tests/baselines/reference/tsxReactEmitNesting.js b/tests/baselines/reference/tsxReactEmitNesting.js index 5e1f7db39c355..35d678a1e4e45 100644 --- a/tests/baselines/reference/tsxReactEmitNesting.js +++ b/tests/baselines/reference/tsxReactEmitNesting.js @@ -37,21 +37,21 @@ let render = (ctrl, model) => //// [file.js] // A simple render function with nesting and control statements var render = function (ctrl, model) { - return vdom.createElement("section", { "class": "todoapp" }, - vdom.createElement("header", { "class": "header" }, + return vdom.createElement("section", { class: "todoapp" }, + vdom.createElement("header", { class: "header" }, vdom.createElement("h1", null, "todos "), - vdom.createElement("input", { "class": "new-todo", autofocus: true, autocomplete: "off", placeholder: "What needs to be done?", value: model.newTodo, onKeyup: ctrl.addTodo.bind(ctrl, model) })), - vdom.createElement("section", { "class": "main", style: { display: (model.todos && model.todos.length) ? "block" : "none" } }, - vdom.createElement("input", { "class": "toggle-all", type: "checkbox", onChange: ctrl.toggleAll.bind(ctrl) }), - vdom.createElement("ul", { "class": "todo-list" }, model.filteredTodos.map(function (todo) { - return vdom.createElement("li", { "class": { todo: true, completed: todo.completed, editing: todo == model.editedTodo } }, - vdom.createElement("div", { "class": "view" }, + vdom.createElement("input", { class: "new-todo", autofocus: true, autocomplete: "off", placeholder: "What needs to be done?", value: model.newTodo, onKeyup: ctrl.addTodo.bind(ctrl, model) })), + vdom.createElement("section", { class: "main", style: { display: (model.todos && model.todos.length) ? "block" : "none" } }, + vdom.createElement("input", { class: "toggle-all", type: "checkbox", onChange: ctrl.toggleAll.bind(ctrl) }), + vdom.createElement("ul", { class: "todo-list" }, model.filteredTodos.map(function (todo) { + return vdom.createElement("li", { class: { todo: true, completed: todo.completed, editing: todo == model.editedTodo } }, + vdom.createElement("div", { class: "view" }, (!todo.editable) ? - vdom.createElement("input", { "class": "toggle", type: "checkbox" }) + vdom.createElement("input", { class: "toggle", type: "checkbox" }) : null, vdom.createElement("label", { onDoubleClick: function () { ctrl.editTodo(todo); } }, todo.title), - vdom.createElement("button", { "class": "destroy", onClick: ctrl.removeTodo.bind(ctrl, todo) }), - vdom.createElement("div", { "class": "iconBorder" }, - vdom.createElement("div", { "class": "icon" })))); + vdom.createElement("button", { class: "destroy", onClick: ctrl.removeTodo.bind(ctrl, todo) }), + vdom.createElement("div", { class: "iconBorder" }, + vdom.createElement("div", { class: "icon" })))); })))); }; diff --git a/tests/baselines/reference/tsxSfcReturnNull.js b/tests/baselines/reference/tsxSfcReturnNull.js index 793342be96a20..653fddb95682f 100644 --- a/tests/baselines/reference/tsxSfcReturnNull.js +++ b/tests/baselines/reference/tsxSfcReturnNull.js @@ -13,7 +13,7 @@ const G = ; //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = function (props) { return null; }; function Greet(x) { return null; diff --git a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js index 793342be96a20..653fddb95682f 100644 --- a/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js +++ b/tests/baselines/reference/tsxSfcReturnNullStrictNullChecks.js @@ -13,7 +13,7 @@ const G = ; //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = function (props) { return null; }; function Greet(x) { return null; diff --git a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js index 5d3825db91c55..df858baad853c 100644 --- a/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js +++ b/tests/baselines/reference/tsxSfcReturnUndefinedStrictNullChecks.js @@ -13,7 +13,7 @@ const G = ; //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = function (props) { return undefined; }; function Greet(x) { return undefined; diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution1.js b/tests/baselines/reference/tsxSpreadAttributesResolution1.js index f8c3cfbb5946d..34e2111bfd1f9 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution1.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution1.js @@ -25,7 +25,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution10.js b/tests/baselines/reference/tsxSpreadAttributesResolution10.js index f8d56f608de9f..9ec9d6f004c97 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution10.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution10.js @@ -35,7 +35,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Opt = (function (_super) { __extends(Opt, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution11.js b/tests/baselines/reference/tsxSpreadAttributesResolution11.js index 44e2dcd529211..47b422b5b91fd 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution11.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution11.js @@ -43,7 +43,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var obj = {}; var obj1 = { diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution12.js b/tests/baselines/reference/tsxSpreadAttributesResolution12.js index 8551a3f1bac71..f54818ee10933 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution12.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution12.js @@ -42,7 +42,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var obj = {}; var obj1 = { diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution2.js b/tests/baselines/reference/tsxSpreadAttributesResolution2.js index 75da8fc229118..4c55675fd1214 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution2.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution2.js @@ -31,7 +31,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution3.js b/tests/baselines/reference/tsxSpreadAttributesResolution3.js index e2e0f38da0d51..7bb44d6f4cc93 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution3.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution3.js @@ -33,7 +33,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution4.js b/tests/baselines/reference/tsxSpreadAttributesResolution4.js index 3ac18a7c21931..adf957b190f51 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution4.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution4.js @@ -47,7 +47,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); var _this = this; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution5.js b/tests/baselines/reference/tsxSpreadAttributesResolution5.js index a40139b316e86..0a28168f2037f 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution5.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution5.js @@ -45,7 +45,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Poisoned = (function (_super) { __extends(Poisoned, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.js b/tests/baselines/reference/tsxSpreadAttributesResolution6.js index e6d714a670507..5c1a0739782ee 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution6.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.js @@ -29,7 +29,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var TextComponent = (function (_super) { __extends(TextComponent, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.js b/tests/baselines/reference/tsxSpreadAttributesResolution7.js index d93e2e80a9242..2492e5125c455 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution7.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.js @@ -36,7 +36,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var TextComponent = (function (_super) { __extends(TextComponent, _super); diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution8.js b/tests/baselines/reference/tsxSpreadAttributesResolution8.js index 9b07fa5e903bc..9aa149d38ba85 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution8.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution8.js @@ -38,7 +38,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var obj = {}; var obj1 = { diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution9.js b/tests/baselines/reference/tsxSpreadAttributesResolution9.js index c7379ab2db1d9..9f9d0c7079665 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution9.js +++ b/tests/baselines/reference/tsxSpreadAttributesResolution9.js @@ -36,7 +36,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var Opt = (function (_super) { __extends(Opt, _super); diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js index 09eb20c755fd0..37efe9c67c229 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload1.js @@ -45,7 +45,7 @@ const e6 = //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // OK var c1 = ; var c2 = ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js index 2c940ebc820c3..5bb8b7a1e46b1 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload2.js @@ -35,7 +35,7 @@ const c10 = ; //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var obj = { yy: 10, yy1: "hello" diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js index 8da2bee37ea5c..1d14e21c9dfdb 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.js @@ -40,7 +40,7 @@ const e4 = Hi //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var obj = { yy: 10, yy1: "hello" diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js index 1f13591dd5fc8..c64e0fc9a3867 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.js @@ -59,7 +59,7 @@ const b8 = ; // incorrect type for specified hyphanat //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var obj0 = { to: "world" }; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js index c1ec4ccd0bf7a..d675a03037b77 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload6.js @@ -60,7 +60,7 @@ const b12 = //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var obj = { children: "hi", to: "boo" diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents2.js b/tests/baselines/reference/tsxStatelessFunctionComponents2.js index 90112ef1f139a..ac7eb68a16d33 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents2.js @@ -49,7 +49,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function Greet(x) { return
Hello, {x}
; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponents3.js b/tests/baselines/reference/tsxStatelessFunctionComponents3.js index e7bfc98022939..862d630a125ea 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponents3.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponents3.js @@ -20,7 +20,7 @@ var App: React.StatelessComponent<{ children }> = ({children}) => ( //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var Foo = function (props) { return
; }; // Should be OK var foo = ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js index 98fc80bfefea6..ba0cf8a24c68a 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments1.js @@ -33,7 +33,7 @@ let i = { }} //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // OK function Baz(key1, value) { var a0 = ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js index a357c808c026b..b6209a572510b 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments2.js @@ -35,7 +35,7 @@ let i = ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js index 7f3a8e38e8d7e..d9934ae8261b6 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments3.js @@ -26,7 +26,7 @@ function createLink(func: (a: number)=>void) { //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // OK function Baz(arg1, arg2) { var a0 = ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js index c6692edf2f25f..7b9910223af80 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.js @@ -14,7 +14,7 @@ function Baz(arg1: T, a //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); // Error function Baz(arg1, arg2) { var a0 = ; diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.js b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.js index b5e215dada308..2bfd72336ea85 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.js +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments5.js @@ -22,7 +22,7 @@ function Bar(arg: T) { //// [file.jsx] define(["require", "exports", "react"], function (require, exports, React) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function createComponent(arg) { var a1 = ; var a2 = ; diff --git a/tests/baselines/reference/tsxUnionElementType1.js b/tests/baselines/reference/tsxUnionElementType1.js index b377bcb5670c4..da51151cb3307 100644 --- a/tests/baselines/reference/tsxUnionElementType1.js +++ b/tests/baselines/reference/tsxUnionElementType1.js @@ -14,7 +14,7 @@ var SFCComp = SFC1 || SFC2; //// [file.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function SFC1(prop) { return React.createElement("div", null, "hello"); diff --git a/tests/baselines/reference/tsxUnionElementType2.js b/tests/baselines/reference/tsxUnionElementType2.js index c33c24f0d739a..3839b8d377968 100644 --- a/tests/baselines/reference/tsxUnionElementType2.js +++ b/tests/baselines/reference/tsxUnionElementType2.js @@ -14,7 +14,7 @@ var SFCComp = SFC1 || SFC2; //// [file.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function SFC1(prop) { return React.createElement("div", null, "hello"); diff --git a/tests/baselines/reference/tsxUnionElementType3.js b/tests/baselines/reference/tsxUnionElementType3.js index 7724c9aebae00..6a12ba0e21878 100644 --- a/tests/baselines/reference/tsxUnionElementType3.js +++ b/tests/baselines/reference/tsxUnionElementType3.js @@ -48,7 +48,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var RC1 = (function (_super) { __extends(RC1, _super); diff --git a/tests/baselines/reference/tsxUnionElementType4.js b/tests/baselines/reference/tsxUnionElementType4.js index c09dcb522002d..cce79854a2d34 100644 --- a/tests/baselines/reference/tsxUnionElementType4.js +++ b/tests/baselines/reference/tsxUnionElementType4.js @@ -47,7 +47,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var RC1 = (function (_super) { __extends(RC1, _super); diff --git a/tests/baselines/reference/tsxUnionElementType5.js b/tests/baselines/reference/tsxUnionElementType5.js index 7f6bf32a89cd1..5e7fec4c37a7c 100644 --- a/tests/baselines/reference/tsxUnionElementType5.js +++ b/tests/baselines/reference/tsxUnionElementType5.js @@ -22,7 +22,7 @@ let b = //// [file.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function EmptySFC1() { return React.createElement("div", null, "hello"); diff --git a/tests/baselines/reference/tsxUnionElementType6.js b/tests/baselines/reference/tsxUnionElementType6.js index 016df27ee9b23..5375c07c3939e 100644 --- a/tests/baselines/reference/tsxUnionElementType6.js +++ b/tests/baselines/reference/tsxUnionElementType6.js @@ -25,7 +25,7 @@ let d = ; //// [file.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); function EmptySFC1() { return React.createElement("div", null, "Hi"); diff --git a/tests/baselines/reference/tsxUnionTypeComponent1.js b/tests/baselines/reference/tsxUnionTypeComponent1.js index 7c5349cdc5f85..20f48e7af6292 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent1.js +++ b/tests/baselines/reference/tsxUnionTypeComponent1.js @@ -35,7 +35,7 @@ var __extends = (this && this.__extends) || (function () { d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var MyComponent = (function (_super) { __extends(MyComponent, _super); diff --git a/tests/baselines/reference/tsxUnionTypeComponent2.js b/tests/baselines/reference/tsxUnionTypeComponent2.js index 7d7026fc499b8..be60f4602a171 100644 --- a/tests/baselines/reference/tsxUnionTypeComponent2.js +++ b/tests/baselines/reference/tsxUnionTypeComponent2.js @@ -12,7 +12,7 @@ const X: Invalid1 = 1; //// [file.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var X = 1; React.createElement(X, null); diff --git a/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt b/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt index 59c15d73d5e2c..f378739bd55a3 100644 --- a/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt +++ b/tests/baselines/reference/twoAccessorsWithSameName2.errors.txt @@ -1,49 +1,31 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(2,16): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(3,16): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(7,16): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(8,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(8,16): error TS2300: Duplicate identifier 'x'. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(12,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts (10 errors) ==== +==== tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName2.ts (4 errors) ==== class C { static get x() { return 1; } ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. static get x() { return 1; } // error ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. } class D { static set x(v) { } ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. static set x(v) { } // error ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - ~ !!! error TS2300: Duplicate identifier 'x'. } class E { static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return 1; } static set x(v) { } - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. } \ No newline at end of file diff --git a/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js b/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js index df12050eaf613..51706b6c91de0 100644 --- a/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js +++ b/tests/baselines/reference/typeCheckObjectCreationExpressionWithUndefinedCallResolutionData.js @@ -13,7 +13,7 @@ f.foo(); //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { var classes = undefined; return new classes(null); @@ -21,7 +21,7 @@ function foo() { exports.foo = foo; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var f = require("./file1"); f.foo(); diff --git a/tests/baselines/reference/typeGuardsAsAssertions.js b/tests/baselines/reference/typeGuardsAsAssertions.js index 8c9b2048514aa..7256e9cce7c0a 100644 --- a/tests/baselines/reference/typeGuardsAsAssertions.js +++ b/tests/baselines/reference/typeGuardsAsAssertions.js @@ -124,7 +124,7 @@ function f6() { //// [typeGuardsAsAssertions.js] "use strict"; // Repro from #8513 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var cond; exports.none = { none: '' }; function isSome(value) { diff --git a/tests/baselines/reference/typeGuardsInExternalModule.js b/tests/baselines/reference/typeGuardsInExternalModule.js index 03f2d2cee8d51..e3ecd059646ba 100644 --- a/tests/baselines/reference/typeGuardsInExternalModule.js +++ b/tests/baselines/reference/typeGuardsInExternalModule.js @@ -27,7 +27,7 @@ else { "use strict"; // Note that type guards affect types of variables and parameters only and // have no effect on members of objects such as properties. -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // local variable in external module var num; var var1; diff --git a/tests/baselines/reference/typeInferenceLiteralUnion.js b/tests/baselines/reference/typeInferenceLiteralUnion.js index 289dd4130460b..26e3fa4e2b4a7 100644 --- a/tests/baselines/reference/typeInferenceLiteralUnion.js +++ b/tests/baselines/reference/typeInferenceLiteralUnion.js @@ -38,7 +38,7 @@ extentMixed = extent([new NumCoercible(10), 13, '12', true]); //// [typeInferenceLiteralUnion.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // Not very useful, but meets Numeric var NumCoercible = (function () { function NumCoercible(a) { diff --git a/tests/baselines/reference/typeOfThis.errors.txt b/tests/baselines/reference/typeOfThis.errors.txt index 83d450570fce9..6e35e25784a8d 100644 --- a/tests/baselines/reference/typeOfThis.errors.txt +++ b/tests/baselines/reference/typeOfThis.errors.txt @@ -1,24 +1,16 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(14,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyTestClass'. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(18,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(22,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(24,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(27,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(29,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyTestClass'. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(37,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(53,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(61,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(83,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyGenericTestClass'. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(87,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(91,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(93,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(96,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(98,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'this', but here has type 'MyGenericTestClass'. tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(106,13): error TS2403: Subsequent variable declarations must have the same type. Variable 't' must be of type 'this', but here has type 'MyGenericTestClass'. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(122,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts (18 errors) ==== +==== tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts (10 errors) ==== class MyTestClass { private canary: number; static staticCanary: number; @@ -45,8 +37,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 //type of 'this' in member accessor(get and set) body is the class instance type get prop() { - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p = this; var p: MyTestClass; ~ @@ -54,8 +44,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 return this; } set prop(v) { - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p = this; var p: MyTestClass; ~ @@ -86,8 +74,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 } static get staticProp() { - ~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. //type of 'this' in static accessor body is constructor function type var p = this; var p: typeof MyTestClass; @@ -96,8 +82,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 return this; } static set staticProp(v: typeof MyTestClass) { - ~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. //type of 'this' in static accessor body is constructor function type var p = this; var p: typeof MyTestClass; @@ -132,8 +116,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 //type of 'this' in member accessor(get and set) body is the class instance type get prop() { - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p = this; var p: MyGenericTestClass; ~ @@ -141,8 +123,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 return this; } set prop(v) { - ~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. var p = this; var p: MyGenericTestClass; ~ @@ -173,8 +153,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 } static get staticProp() { - ~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. //type of 'this' in static accessor body is constructor function type var p = this; var p: typeof MyGenericTestClass; @@ -183,8 +161,6 @@ tests/cases/conformance/expressions/thisKeyword/typeOfThis.ts(130,16): error TS1 return this; } static set staticProp(v: typeof MyGenericTestClass) { - ~~~~~~~~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. //type of 'this' in static accessor body is constructor function type var p = this; var p: typeof MyGenericTestClass; diff --git a/tests/baselines/reference/typeOfThisInAccessor.errors.txt b/tests/baselines/reference/typeOfThisInAccessor.errors.txt deleted file mode 100644 index aecc5cdeef57a..0000000000000 --- a/tests/baselines/reference/typeOfThisInAccessor.errors.txt +++ /dev/null @@ -1,49 +0,0 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(20,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(27,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts (5 errors) ==== - class C { - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var r = this; // C - return 1; - } - - static get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var r2 = this; // typeof C - return 1; - } - } - - class D { - a: T; - get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var r = this; // D - return 1; - } - - static get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var r2 = this; // typeof D - return 1; - } - } - - var x = { - get a() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var r3 = this; // any - return 1; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/typeOfThisInAccessor.symbols b/tests/baselines/reference/typeOfThisInAccessor.symbols new file mode 100644 index 0000000000000..5981cc6d13e70 --- /dev/null +++ b/tests/baselines/reference/typeOfThisInAccessor.symbols @@ -0,0 +1,66 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts === +class C { +>C : Symbol(C, Decl(typeOfThisInAccessor.ts, 0, 0)) + + get x() { +>x : Symbol(C.x, Decl(typeOfThisInAccessor.ts, 0, 9)) + + var r = this; // C +>r : Symbol(r, Decl(typeOfThisInAccessor.ts, 2, 11)) +>this : Symbol(C, Decl(typeOfThisInAccessor.ts, 0, 0)) + + return 1; + } + + static get y() { +>y : Symbol(C.y, Decl(typeOfThisInAccessor.ts, 4, 5)) + + var r2 = this; // typeof C +>r2 : Symbol(r2, Decl(typeOfThisInAccessor.ts, 7, 11)) +>this : Symbol(C, Decl(typeOfThisInAccessor.ts, 0, 0)) + + return 1; + } +} + +class D { +>D : Symbol(D, Decl(typeOfThisInAccessor.ts, 10, 1)) +>T : Symbol(T, Decl(typeOfThisInAccessor.ts, 12, 8)) + + a: T; +>a : Symbol(D.a, Decl(typeOfThisInAccessor.ts, 12, 12)) +>T : Symbol(T, Decl(typeOfThisInAccessor.ts, 12, 8)) + + get x() { +>x : Symbol(D.x, Decl(typeOfThisInAccessor.ts, 13, 9)) + + var r = this; // D +>r : Symbol(r, Decl(typeOfThisInAccessor.ts, 15, 11)) +>this : Symbol(D, Decl(typeOfThisInAccessor.ts, 10, 1)) + + return 1; + } + + static get y() { +>y : Symbol(D.y, Decl(typeOfThisInAccessor.ts, 17, 5)) + + var r2 = this; // typeof D +>r2 : Symbol(r2, Decl(typeOfThisInAccessor.ts, 20, 11)) +>this : Symbol(D, Decl(typeOfThisInAccessor.ts, 10, 1)) + + return 1; + } +} + +var x = { +>x : Symbol(x, Decl(typeOfThisInAccessor.ts, 25, 3)) + + get a() { +>a : Symbol(a, Decl(typeOfThisInAccessor.ts, 25, 9)) + + var r3 = this; // any +>r3 : Symbol(r3, Decl(typeOfThisInAccessor.ts, 27, 11)) + + return 1; + } +} diff --git a/tests/baselines/reference/typeOfThisInAccessor.types b/tests/baselines/reference/typeOfThisInAccessor.types new file mode 100644 index 0000000000000..7367ff2ad01b3 --- /dev/null +++ b/tests/baselines/reference/typeOfThisInAccessor.types @@ -0,0 +1,73 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts === +class C { +>C : C + + get x() { +>x : number + + var r = this; // C +>r : this +>this : this + + return 1; +>1 : 1 + } + + static get y() { +>y : number + + var r2 = this; // typeof C +>r2 : typeof C +>this : typeof C + + return 1; +>1 : 1 + } +} + +class D { +>D : D +>T : T + + a: T; +>a : T +>T : T + + get x() { +>x : number + + var r = this; // D +>r : this +>this : this + + return 1; +>1 : 1 + } + + static get y() { +>y : number + + var r2 = this; // typeof D +>r2 : typeof D +>this : typeof D + + return 1; +>1 : 1 + } +} + +var x = { +>x : { readonly a: number; } +>{ get a() { var r3 = this; // any return 1; }} : { readonly a: number; } + + get a() { +>a : number + + var r3 = this; // any +>r3 : any +>this : any + + return 1; +>1 : 1 + } +} diff --git a/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt b/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt index 2685d2b34b8ae..8e690be1a4f80 100644 --- a/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt +++ b/tests/baselines/reference/typeOfThisInInstanceMember.errors.txt @@ -1,8 +1,7 @@ tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember.ts(10,11): error TS2339: Property 'z' does not exist on type 'C'. -tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -==== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember.ts (2 errors) ==== +==== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember.ts (1 errors) ==== class C { x = this; foo() { @@ -19,8 +18,6 @@ tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInIns } get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. return this; } } diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt b/tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt deleted file mode 100644 index 5544a80ee7dee..0000000000000 --- a/tests/baselines/reference/typeOfThisInInstanceMember2.errors.txt +++ /dev/null @@ -1,41 +0,0 @@ -tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts(14,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts (1 errors) ==== - class C { - x = this; - foo() { - return this; - } - constructor(x: T) { - var t = this; - t.x; - t.y; - t.z; - var r = t.foo(); - } - - get y() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return this; - } - - z: T; - } - - var c: C; - // all ok - var r = c.x; - var ra = c.x.x.x; - var r2 = c.y; - var r3 = c.foo(); - var r4 = c.z; - var rs = [r, r2, r3]; - - rs.forEach(x => { - x.foo; - x.x; - x.y; - x.z; - }); \ No newline at end of file diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.symbols b/tests/baselines/reference/typeOfThisInInstanceMember2.symbols new file mode 100644 index 0000000000000..113431b14f6a8 --- /dev/null +++ b/tests/baselines/reference/typeOfThisInInstanceMember2.symbols @@ -0,0 +1,129 @@ +=== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts === +class C { +>C : Symbol(C, Decl(typeOfThisInInstanceMember2.ts, 0, 0)) +>T : Symbol(T, Decl(typeOfThisInInstanceMember2.ts, 0, 8)) + + x = this; +>x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>this : Symbol(C, Decl(typeOfThisInInstanceMember2.ts, 0, 0)) + + foo() { +>foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember2.ts, 1, 13)) + + return this; +>this : Symbol(C, Decl(typeOfThisInInstanceMember2.ts, 0, 0)) + } + constructor(x: T) { +>x : Symbol(x, Decl(typeOfThisInInstanceMember2.ts, 5, 16)) +>T : Symbol(T, Decl(typeOfThisInInstanceMember2.ts, 0, 8)) + + var t = this; +>t : Symbol(t, Decl(typeOfThisInInstanceMember2.ts, 6, 11)) +>this : Symbol(C, Decl(typeOfThisInInstanceMember2.ts, 0, 0)) + + t.x; +>t.x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>t : Symbol(t, Decl(typeOfThisInInstanceMember2.ts, 6, 11)) +>x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) + + t.y; +>t.y : Symbol(C.y, Decl(typeOfThisInInstanceMember2.ts, 11, 5)) +>t : Symbol(t, Decl(typeOfThisInInstanceMember2.ts, 6, 11)) +>y : Symbol(C.y, Decl(typeOfThisInInstanceMember2.ts, 11, 5)) + + t.z; +>t.z : Symbol(C.z, Decl(typeOfThisInInstanceMember2.ts, 15, 5)) +>t : Symbol(t, Decl(typeOfThisInInstanceMember2.ts, 6, 11)) +>z : Symbol(C.z, Decl(typeOfThisInInstanceMember2.ts, 15, 5)) + + var r = t.foo(); +>r : Symbol(r, Decl(typeOfThisInInstanceMember2.ts, 10, 11)) +>t.foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember2.ts, 1, 13)) +>t : Symbol(t, Decl(typeOfThisInInstanceMember2.ts, 6, 11)) +>foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember2.ts, 1, 13)) + } + + get y() { +>y : Symbol(C.y, Decl(typeOfThisInInstanceMember2.ts, 11, 5)) + + return this; +>this : Symbol(C, Decl(typeOfThisInInstanceMember2.ts, 0, 0)) + } + + z: T; +>z : Symbol(C.z, Decl(typeOfThisInInstanceMember2.ts, 15, 5)) +>T : Symbol(T, Decl(typeOfThisInInstanceMember2.ts, 0, 8)) +} + +var c: C; +>c : Symbol(c, Decl(typeOfThisInInstanceMember2.ts, 20, 3)) +>C : Symbol(C, Decl(typeOfThisInInstanceMember2.ts, 0, 0)) + +// all ok +var r = c.x; +>r : Symbol(r, Decl(typeOfThisInInstanceMember2.ts, 22, 3)) +>c.x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember2.ts, 20, 3)) +>x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) + +var ra = c.x.x.x; +>ra : Symbol(ra, Decl(typeOfThisInInstanceMember2.ts, 23, 3)) +>c.x.x.x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>c.x.x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>c.x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember2.ts, 20, 3)) +>x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) + +var r2 = c.y; +>r2 : Symbol(r2, Decl(typeOfThisInInstanceMember2.ts, 24, 3)) +>c.y : Symbol(C.y, Decl(typeOfThisInInstanceMember2.ts, 11, 5)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember2.ts, 20, 3)) +>y : Symbol(C.y, Decl(typeOfThisInInstanceMember2.ts, 11, 5)) + +var r3 = c.foo(); +>r3 : Symbol(r3, Decl(typeOfThisInInstanceMember2.ts, 25, 3)) +>c.foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember2.ts, 1, 13)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember2.ts, 20, 3)) +>foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember2.ts, 1, 13)) + +var r4 = c.z; +>r4 : Symbol(r4, Decl(typeOfThisInInstanceMember2.ts, 26, 3)) +>c.z : Symbol(C.z, Decl(typeOfThisInInstanceMember2.ts, 15, 5)) +>c : Symbol(c, Decl(typeOfThisInInstanceMember2.ts, 20, 3)) +>z : Symbol(C.z, Decl(typeOfThisInInstanceMember2.ts, 15, 5)) + +var rs = [r, r2, r3]; +>rs : Symbol(rs, Decl(typeOfThisInInstanceMember2.ts, 27, 3)) +>r : Symbol(r, Decl(typeOfThisInInstanceMember2.ts, 22, 3)) +>r2 : Symbol(r2, Decl(typeOfThisInInstanceMember2.ts, 24, 3)) +>r3 : Symbol(r3, Decl(typeOfThisInInstanceMember2.ts, 25, 3)) + +rs.forEach(x => { +>rs.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>rs : Symbol(rs, Decl(typeOfThisInInstanceMember2.ts, 27, 3)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>x : Symbol(x, Decl(typeOfThisInInstanceMember2.ts, 29, 11)) + + x.foo; +>x.foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember2.ts, 1, 13)) +>x : Symbol(x, Decl(typeOfThisInInstanceMember2.ts, 29, 11)) +>foo : Symbol(C.foo, Decl(typeOfThisInInstanceMember2.ts, 1, 13)) + + x.x; +>x.x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) +>x : Symbol(x, Decl(typeOfThisInInstanceMember2.ts, 29, 11)) +>x : Symbol(C.x, Decl(typeOfThisInInstanceMember2.ts, 0, 12)) + + x.y; +>x.y : Symbol(C.y, Decl(typeOfThisInInstanceMember2.ts, 11, 5)) +>x : Symbol(x, Decl(typeOfThisInInstanceMember2.ts, 29, 11)) +>y : Symbol(C.y, Decl(typeOfThisInInstanceMember2.ts, 11, 5)) + + x.z; +>x.z : Symbol(C.z, Decl(typeOfThisInInstanceMember2.ts, 15, 5)) +>x : Symbol(x, Decl(typeOfThisInInstanceMember2.ts, 29, 11)) +>z : Symbol(C.z, Decl(typeOfThisInInstanceMember2.ts, 15, 5)) + +}); diff --git a/tests/baselines/reference/typeOfThisInInstanceMember2.types b/tests/baselines/reference/typeOfThisInInstanceMember2.types new file mode 100644 index 0000000000000..f3a38dccfa180 --- /dev/null +++ b/tests/baselines/reference/typeOfThisInInstanceMember2.types @@ -0,0 +1,134 @@ +=== tests/cases/conformance/classes/members/instanceAndStaticMembers/typeOfThisInInstanceMember2.ts === +class C { +>C : C +>T : T + + x = this; +>x : this +>this : this + + foo() { +>foo : () => this + + return this; +>this : this + } + constructor(x: T) { +>x : T +>T : T + + var t = this; +>t : this +>this : this + + t.x; +>t.x : this +>t : this +>x : this + + t.y; +>t.y : this +>t : this +>y : this + + t.z; +>t.z : T +>t : this +>z : T + + var r = t.foo(); +>r : this +>t.foo() : this +>t.foo : () => this +>t : this +>foo : () => this + } + + get y() { +>y : this + + return this; +>this : this + } + + z: T; +>z : T +>T : T +} + +var c: C; +>c : C +>C : C + +// all ok +var r = c.x; +>r : C +>c.x : C +>c : C +>x : C + +var ra = c.x.x.x; +>ra : C +>c.x.x.x : C +>c.x.x : C +>c.x : C +>c : C +>x : C +>x : C +>x : C + +var r2 = c.y; +>r2 : C +>c.y : C +>c : C +>y : C + +var r3 = c.foo(); +>r3 : C +>c.foo() : C +>c.foo : () => C +>c : C +>foo : () => C + +var r4 = c.z; +>r4 : string +>c.z : string +>c : C +>z : string + +var rs = [r, r2, r3]; +>rs : C[] +>[r, r2, r3] : C[] +>r : C +>r2 : C +>r3 : C + +rs.forEach(x => { +>rs.forEach(x => { x.foo; x.x; x.y; x.z;}) : void +>rs.forEach : { (callbackfn: (this: void, value: C, index: number, array: C[]) => void): void; (callbackfn: (this: void, value: C, index: number, array: C[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: C, index: number, array: C[]) => void, thisArg: Z): void; } +>rs : C[] +>forEach : { (callbackfn: (this: void, value: C, index: number, array: C[]) => void): void; (callbackfn: (this: void, value: C, index: number, array: C[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: C, index: number, array: C[]) => void, thisArg: Z): void; } +>x => { x.foo; x.x; x.y; x.z;} : (this: void, x: C) => void +>x : C + + x.foo; +>x.foo : () => C +>x : C +>foo : () => C + + x.x; +>x.x : C +>x : C +>x : C + + x.y; +>x.y : C +>x : C +>y : C + + x.z; +>x.z : string +>x : C +>z : string + +}); diff --git a/tests/baselines/reference/typeOfThisInStatics.errors.txt b/tests/baselines/reference/typeOfThisInStatics.errors.txt deleted file mode 100644 index bfdeb22d9f853..0000000000000 --- a/tests/baselines/reference/typeOfThisInStatics.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -tests/cases/compiler/typeOfThisInStatics.ts(5,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/typeOfThisInStatics.ts (1 errors) ==== - class C { - static foo() { - var r = this; - } - static get x() { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - var r = this; - return 1; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/typeOfThisInStatics.symbols b/tests/baselines/reference/typeOfThisInStatics.symbols new file mode 100644 index 0000000000000..32cd87221de73 --- /dev/null +++ b/tests/baselines/reference/typeOfThisInStatics.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/typeOfThisInStatics.ts === +class C { +>C : Symbol(C, Decl(typeOfThisInStatics.ts, 0, 0)) + + static foo() { +>foo : Symbol(C.foo, Decl(typeOfThisInStatics.ts, 0, 9)) + + var r = this; +>r : Symbol(r, Decl(typeOfThisInStatics.ts, 2, 11)) +>this : Symbol(C, Decl(typeOfThisInStatics.ts, 0, 0)) + } + static get x() { +>x : Symbol(C.x, Decl(typeOfThisInStatics.ts, 3, 5)) + + var r = this; +>r : Symbol(r, Decl(typeOfThisInStatics.ts, 5, 11)) +>this : Symbol(C, Decl(typeOfThisInStatics.ts, 0, 0)) + + return 1; + } +} + diff --git a/tests/baselines/reference/typeOfThisInStatics.types b/tests/baselines/reference/typeOfThisInStatics.types new file mode 100644 index 0000000000000..534115f142e49 --- /dev/null +++ b/tests/baselines/reference/typeOfThisInStatics.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/typeOfThisInStatics.ts === +class C { +>C : C + + static foo() { +>foo : () => void + + var r = this; +>r : typeof C +>this : typeof C + } + static get x() { +>x : number + + var r = this; +>r : typeof C +>this : typeof C + + return 1; +>1 : 1 + } +} + diff --git a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js index 9a29313941771..c0264635538bd 100644 --- a/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js +++ b/tests/baselines/reference/typeParameterCompatibilityAccrossDeclarations.js @@ -25,7 +25,7 @@ i2 = a2; // no error //// [typeParameterCompatibilityAccrossDeclarations.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var a = { x: function (y) { return null; } }; diff --git a/tests/baselines/reference/typeParametersInStaticAccessors.errors.txt b/tests/baselines/reference/typeParametersInStaticAccessors.errors.txt index 644cd703cdf81..40388d53532ea 100644 --- a/tests/baselines/reference/typeParametersInStaticAccessors.errors.txt +++ b/tests/baselines/reference/typeParametersInStaticAccessors.errors.txt @@ -1,19 +1,13 @@ -tests/cases/compiler/typeParametersInStaticAccessors.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/typeParametersInStaticAccessors.ts(2,29): error TS2302: Static members cannot reference class type parameters. -tests/cases/compiler/typeParametersInStaticAccessors.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/typeParametersInStaticAccessors.ts(3,28): error TS2302: Static members cannot reference class type parameters. -==== tests/cases/compiler/typeParametersInStaticAccessors.ts (4 errors) ==== +==== tests/cases/compiler/typeParametersInStaticAccessors.ts (2 errors) ==== class foo { static get Foo(): () => T { return null; } - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS2302: Static members cannot reference class type parameters. static set Bar(v: { v: T }) { } - ~~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS2302: Static members cannot reference class type parameters. } \ No newline at end of file diff --git a/tests/baselines/reference/typePredicateInLoop.js b/tests/baselines/reference/typePredicateInLoop.js index e3e01d13ef10d..f0b5d8421ce0d 100644 --- a/tests/baselines/reference/typePredicateInLoop.js +++ b/tests/baselines/reference/typePredicateInLoop.js @@ -24,7 +24,7 @@ export function y(arg: Type): void { //// [typePredicateInLoop.js] "use strict"; // Repro from #12101 -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var guard = function (arg) { return arg.type === 1; }; var otherFunc = function (arg1, arg2) { }; function y(arg) { diff --git a/tests/baselines/reference/typeQueryOnClass.errors.txt b/tests/baselines/reference/typeQueryOnClass.errors.txt deleted file mode 100644 index 5198067576aaf..0000000000000 --- a/tests/baselines/reference/typeQueryOnClass.errors.txt +++ /dev/null @@ -1,77 +0,0 @@ -tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts(18,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts(21,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts(33,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts(36,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts (6 errors) ==== - class C { - constructor(x: number); - constructor(x: string); - constructor(public x) { } - - static foo(x: number); - static foo(x: {}); - static foo(x) { } - - static bar(x) { } - - static sa = 1; - static sb = () => 1; - - static get sc() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 1; - } - static set sc(x) { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - static get sd() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 1; - } - - baz(x): string { return ''; } - - ia = 1; - ib = () => this.ia; - - get ic() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 1; - } - set ic(x) { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - } - - get id() { - ~~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - return 1; - } - - } - - var c: C; - - // BUG 820454 - var r1: typeof C; - var r2: typeof c; - - class D { - constructor(public y?) { } - x: T; - foo() { } - } - - var d: D; - var r3: typeof D; - var r4: typeof d; \ No newline at end of file diff --git a/tests/baselines/reference/typeQueryOnClass.symbols b/tests/baselines/reference/typeQueryOnClass.symbols new file mode 100644 index 0000000000000..bb3e372542a82 --- /dev/null +++ b/tests/baselines/reference/typeQueryOnClass.symbols @@ -0,0 +1,123 @@ +=== tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts === +class C { +>C : Symbol(C, Decl(typeQueryOnClass.ts, 0, 0)) +>T : Symbol(T, Decl(typeQueryOnClass.ts, 0, 8)) + + constructor(x: number); +>x : Symbol(x, Decl(typeQueryOnClass.ts, 1, 16)) + + constructor(x: string); +>x : Symbol(x, Decl(typeQueryOnClass.ts, 2, 16)) + + constructor(public x) { } +>x : Symbol(C.x, Decl(typeQueryOnClass.ts, 3, 16)) + + static foo(x: number); +>foo : Symbol(C.foo, Decl(typeQueryOnClass.ts, 3, 29), Decl(typeQueryOnClass.ts, 5, 26), Decl(typeQueryOnClass.ts, 6, 22)) +>x : Symbol(x, Decl(typeQueryOnClass.ts, 5, 15)) + + static foo(x: {}); +>foo : Symbol(C.foo, Decl(typeQueryOnClass.ts, 3, 29), Decl(typeQueryOnClass.ts, 5, 26), Decl(typeQueryOnClass.ts, 6, 22)) +>x : Symbol(x, Decl(typeQueryOnClass.ts, 6, 15)) + + static foo(x) { } +>foo : Symbol(C.foo, Decl(typeQueryOnClass.ts, 3, 29), Decl(typeQueryOnClass.ts, 5, 26), Decl(typeQueryOnClass.ts, 6, 22)) +>x : Symbol(x, Decl(typeQueryOnClass.ts, 7, 15)) + + static bar(x) { } +>bar : Symbol(C.bar, Decl(typeQueryOnClass.ts, 7, 21)) +>x : Symbol(x, Decl(typeQueryOnClass.ts, 9, 15)) + + static sa = 1; +>sa : Symbol(C.sa, Decl(typeQueryOnClass.ts, 9, 21)) + + static sb = () => 1; +>sb : Symbol(C.sb, Decl(typeQueryOnClass.ts, 11, 18)) + + static get sc() { +>sc : Symbol(C.sc, Decl(typeQueryOnClass.ts, 12, 24), Decl(typeQueryOnClass.ts, 16, 5)) + + return 1; + } + static set sc(x) { +>sc : Symbol(C.sc, Decl(typeQueryOnClass.ts, 12, 24), Decl(typeQueryOnClass.ts, 16, 5)) +>x : Symbol(x, Decl(typeQueryOnClass.ts, 17, 18)) + } + + static get sd() { +>sd : Symbol(C.sd, Decl(typeQueryOnClass.ts, 18, 5)) + + return 1; + } + + baz(x): string { return ''; } +>baz : Symbol(C.baz, Decl(typeQueryOnClass.ts, 22, 5)) +>x : Symbol(x, Decl(typeQueryOnClass.ts, 24, 8)) + + ia = 1; +>ia : Symbol(C.ia, Decl(typeQueryOnClass.ts, 24, 33)) + + ib = () => this.ia; +>ib : Symbol(C.ib, Decl(typeQueryOnClass.ts, 26, 11)) +>this.ia : Symbol(C.ia, Decl(typeQueryOnClass.ts, 24, 33)) +>this : Symbol(C, Decl(typeQueryOnClass.ts, 0, 0)) +>ia : Symbol(C.ia, Decl(typeQueryOnClass.ts, 24, 33)) + + get ic() { +>ic : Symbol(C.ic, Decl(typeQueryOnClass.ts, 27, 23), Decl(typeQueryOnClass.ts, 31, 5)) + + return 1; + } + set ic(x) { +>ic : Symbol(C.ic, Decl(typeQueryOnClass.ts, 27, 23), Decl(typeQueryOnClass.ts, 31, 5)) +>x : Symbol(x, Decl(typeQueryOnClass.ts, 32, 11)) + } + + get id() { +>id : Symbol(C.id, Decl(typeQueryOnClass.ts, 33, 5)) + + return 1; + } + +} + +var c: C; +>c : Symbol(c, Decl(typeQueryOnClass.ts, 41, 3)) +>C : Symbol(C, Decl(typeQueryOnClass.ts, 0, 0)) + +// BUG 820454 +var r1: typeof C; +>r1 : Symbol(r1, Decl(typeQueryOnClass.ts, 44, 3)) +>C : Symbol(C, Decl(typeQueryOnClass.ts, 0, 0)) + +var r2: typeof c; +>r2 : Symbol(r2, Decl(typeQueryOnClass.ts, 45, 3)) +>c : Symbol(c, Decl(typeQueryOnClass.ts, 41, 3)) + +class D { +>D : Symbol(D, Decl(typeQueryOnClass.ts, 45, 17)) +>T : Symbol(T, Decl(typeQueryOnClass.ts, 47, 8)) + + constructor(public y?) { } +>y : Symbol(D.y, Decl(typeQueryOnClass.ts, 48, 16)) + + x: T; +>x : Symbol(D.x, Decl(typeQueryOnClass.ts, 48, 30)) +>T : Symbol(T, Decl(typeQueryOnClass.ts, 47, 8)) + + foo() { } +>foo : Symbol(D.foo, Decl(typeQueryOnClass.ts, 49, 9)) +} + +var d: D; +>d : Symbol(d, Decl(typeQueryOnClass.ts, 53, 3)) +>D : Symbol(D, Decl(typeQueryOnClass.ts, 45, 17)) + +var r3: typeof D; +>r3 : Symbol(r3, Decl(typeQueryOnClass.ts, 54, 3)) +>D : Symbol(D, Decl(typeQueryOnClass.ts, 45, 17)) + +var r4: typeof d; +>r4 : Symbol(r4, Decl(typeQueryOnClass.ts, 55, 3)) +>d : Symbol(d, Decl(typeQueryOnClass.ts, 53, 3)) + diff --git a/tests/baselines/reference/typeQueryOnClass.types b/tests/baselines/reference/typeQueryOnClass.types new file mode 100644 index 0000000000000..ed85d6575e8fe --- /dev/null +++ b/tests/baselines/reference/typeQueryOnClass.types @@ -0,0 +1,133 @@ +=== tests/cases/conformance/types/specifyingTypes/typeQueries/typeQueryOnClass.ts === +class C { +>C : C +>T : T + + constructor(x: number); +>x : number + + constructor(x: string); +>x : string + + constructor(public x) { } +>x : any + + static foo(x: number); +>foo : { (x: number): any; (x: {}): any; } +>x : number + + static foo(x: {}); +>foo : { (x: number): any; (x: {}): any; } +>x : {} + + static foo(x) { } +>foo : { (x: number): any; (x: {}): any; } +>x : any + + static bar(x) { } +>bar : (x: any) => void +>x : any + + static sa = 1; +>sa : number +>1 : 1 + + static sb = () => 1; +>sb : () => number +>() => 1 : () => number +>1 : 1 + + static get sc() { +>sc : number + + return 1; +>1 : 1 + } + static set sc(x) { +>sc : number +>x : number + } + + static get sd() { +>sd : number + + return 1; +>1 : 1 + } + + baz(x): string { return ''; } +>baz : (x: any) => string +>x : any +>'' : "" + + ia = 1; +>ia : number +>1 : 1 + + ib = () => this.ia; +>ib : () => number +>() => this.ia : () => number +>this.ia : number +>this : this +>ia : number + + get ic() { +>ic : number + + return 1; +>1 : 1 + } + set ic(x) { +>ic : number +>x : number + } + + get id() { +>id : number + + return 1; +>1 : 1 + } + +} + +var c: C; +>c : C +>C : C + +// BUG 820454 +var r1: typeof C; +>r1 : typeof C +>C : typeof C + +var r2: typeof c; +>r2 : C +>c : C + +class D { +>D : D +>T : T + + constructor(public y?) { } +>y : any + + x: T; +>x : T +>T : T + + foo() { } +>foo : () => void +} + +var d: D; +>d : D +>D : D + +var r3: typeof D; +>r3 : typeof D +>D : typeof D + +var r4: typeof d; +>r4 : D +>d : D + diff --git a/tests/baselines/reference/typeQueryWithReservedWords.js b/tests/baselines/reference/typeQueryWithReservedWords.js index 09c3b642a36d0..7561eeddb7528 100644 --- a/tests/baselines/reference/typeQueryWithReservedWords.js +++ b/tests/baselines/reference/typeQueryWithReservedWords.js @@ -21,9 +21,9 @@ var Controller = (function () { } Controller.prototype.create = function () { }; - Controller.prototype["delete"] = function () { + Controller.prototype.delete = function () { }; - Controller.prototype["var"] = function () { + Controller.prototype.var = function () { }; return Controller; }()); diff --git a/tests/baselines/reference/typeReferenceDirectives10.js b/tests/baselines/reference/typeReferenceDirectives10.js index 569159df42171..a157fb36a8a5e 100644 --- a/tests/baselines/reference/typeReferenceDirectives10.js +++ b/tests/baselines/reference/typeReferenceDirectives10.js @@ -16,7 +16,7 @@ export interface A { //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.d.ts] diff --git a/tests/baselines/reference/typeReferenceDirectives13.js b/tests/baselines/reference/typeReferenceDirectives13.js index 03dabec933100..81ae523573947 100644 --- a/tests/baselines/reference/typeReferenceDirectives13.js +++ b/tests/baselines/reference/typeReferenceDirectives13.js @@ -16,7 +16,7 @@ export interface A { //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.d.ts] diff --git a/tests/baselines/reference/typeReferenceDirectives5.js b/tests/baselines/reference/typeReferenceDirectives5.js index aabb879c485bc..68d909695f1aa 100644 --- a/tests/baselines/reference/typeReferenceDirectives5.js +++ b/tests/baselines/reference/typeReferenceDirectives5.js @@ -15,7 +15,7 @@ export interface A { //// [app.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [app.d.ts] diff --git a/tests/baselines/reference/typeReferenceDirectives7.js b/tests/baselines/reference/typeReferenceDirectives7.js index 7be0651a58137..a9ea47765a49b 100644 --- a/tests/baselines/reference/typeReferenceDirectives7.js +++ b/tests/baselines/reference/typeReferenceDirectives7.js @@ -17,7 +17,7 @@ export let y = () => x //// [app.js] "use strict"; /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.$ = 1; exports.y = function () { return exports.x; }; diff --git a/tests/baselines/reference/typeReferenceDirectives8.js b/tests/baselines/reference/typeReferenceDirectives8.js index b843ec063076d..39be05dd08791 100644 --- a/tests/baselines/reference/typeReferenceDirectives8.js +++ b/tests/baselines/reference/typeReferenceDirectives8.js @@ -12,12 +12,12 @@ export const bar = foo(); //// [mod1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { return { x: 1 }; } exports.foo = foo; //// [mod2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var mod1_1 = require("./mod1"); exports.bar = mod1_1.foo(); diff --git a/tests/baselines/reference/typeReferenceDirectives9.js b/tests/baselines/reference/typeReferenceDirectives9.js index 54685ef7961b2..6b4e5c6c6d1f1 100644 --- a/tests/baselines/reference/typeReferenceDirectives9.js +++ b/tests/baselines/reference/typeReferenceDirectives9.js @@ -33,7 +33,7 @@ export const bar = Cls.bar(); //// [main.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Cls = (function () { function Cls() { } @@ -43,12 +43,12 @@ exports.Cls = Cls; //// [mod1.js] "use strict"; /// -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var main_1 = require("./main"); main_1.Cls.prototype.foo = function () { return undefined; }; //// [mod2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var main_1 = require("./main"); require("./mod1"); exports.cls = main_1.Cls; diff --git a/tests/baselines/reference/typeResolution.js b/tests/baselines/reference/typeResolution.js index cb8a40cf0a6e6..ddfc0583f7b8a 100644 --- a/tests/baselines/reference/typeResolution.js +++ b/tests/baselines/reference/typeResolution.js @@ -113,7 +113,7 @@ module TopLevelModule2 { //// [typeResolution.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var TopLevelModule1; (function (TopLevelModule1) { var SubModule1; diff --git a/tests/baselines/reference/typeResolution.sourcemap.txt b/tests/baselines/reference/typeResolution.sourcemap.txt index 19e8b9991d154..0bcd4faa6bdbc 100644 --- a/tests/baselines/reference/typeResolution.sourcemap.txt +++ b/tests/baselines/reference/typeResolution.sourcemap.txt @@ -10,7 +10,7 @@ sourceFile:typeResolution.ts ------------------------------------------------------------------- >>>define(["require", "exports"], function (require, exports) { >>> "use strict"; ->>> exports.__esModule = true; +>>> Object.defineProperty(exports, "__esModule", { value: true }); >>> var TopLevelModule1; 1 >^^^^ 2 > ^^^^ diff --git a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.js b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.js index 1c3663a04d7dc..964af423ec606 100644 --- a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.js +++ b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.js @@ -24,7 +24,7 @@ x + y + z; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var xyz_1 = require("xyz"); var pdq_1 = require("pdq"); var abc_1 = require("abc"); diff --git a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.js b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.js index ee18260fe8c88..4fa333d7bce9d 100644 --- a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.js +++ b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.js @@ -12,6 +12,6 @@ x; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var xyz_1 = require("xyz"); xyz_1.x; diff --git a/tests/baselines/reference/typeUsedAsValueError2.js b/tests/baselines/reference/typeUsedAsValueError2.js index 2c068d4f4d27e..d7b083e1b6c96 100644 --- a/tests/baselines/reference/typeUsedAsValueError2.js +++ b/tests/baselines/reference/typeUsedAsValueError2.js @@ -24,17 +24,17 @@ HelloNamespace.world; //// [helloInterface.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [helloNamespace.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); //// [world.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); HelloInterface.world; HelloNamespace.world; }); diff --git a/tests/baselines/reference/typeofANonExportedType.js b/tests/baselines/reference/typeofANonExportedType.js index ba4451243cafe..a9d9c64bfb8f7 100644 --- a/tests/baselines/reference/typeofANonExportedType.js +++ b/tests/baselines/reference/typeofANonExportedType.js @@ -53,7 +53,7 @@ export var r13: typeof foo; //// [typeofANonExportedType.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x = 1; var y = { foo: '' }; var C = (function () { diff --git a/tests/baselines/reference/typeofAmbientExternalModules.js b/tests/baselines/reference/typeofAmbientExternalModules.js index 2500193ebde82..2582708a829d9 100644 --- a/tests/baselines/reference/typeofAmbientExternalModules.js +++ b/tests/baselines/reference/typeofAmbientExternalModules.js @@ -20,7 +20,7 @@ y2 = ext; //// [typeofAmbientExternalModules_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } @@ -37,7 +37,7 @@ var D = (function () { module.exports = D; //// [typeofAmbientExternalModules_2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// /// var ext = require("./typeofAmbientExternalModules_0"); diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index e166f6b745b19..038de459ca974 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -53,7 +53,7 @@ export var r13: typeof foo; //// [typeofAnExportedType.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = 1; exports.y = { foo: '' }; var C = (function () { diff --git a/tests/baselines/reference/typeofExternalModules.js b/tests/baselines/reference/typeofExternalModules.js index 97c6b6d7278a1..61639c73453d1 100644 --- a/tests/baselines/reference/typeofExternalModules.js +++ b/tests/baselines/reference/typeofExternalModules.js @@ -18,7 +18,7 @@ y2 = ext; //// [typeofExternalModules_external.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var C = (function () { function C() { } @@ -35,7 +35,7 @@ var D = (function () { module.exports = D; //// [typeofExternalModules_core.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var ext = require("./typeofExternalModules_external"); var exp = require("./typeofExternalModules_exportAssign"); var y1 = ext; diff --git a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js index 4a93b9293a5c5..8be5e7caa926b 100644 --- a/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js +++ b/tests/baselines/reference/typesOnlyExternalModuleStillHasInstance.js @@ -22,10 +22,10 @@ var y: {M2: Object} = foo0; //// [foo_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [foo_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo0 = require("./foo_0"); // Per 11.2.3, foo_0 should still be "instantiated", albeit with no members var x = {}; diff --git a/tests/baselines/reference/typingsLookup4.js b/tests/baselines/reference/typingsLookup4.js index d2424644d1626..0ad348e60f9f2 100644 --- a/tests/baselines/reference/typingsLookup4.js +++ b/tests/baselines/reference/typingsLookup4.js @@ -34,15 +34,15 @@ j + k + l + m; //// [lquery.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.l = 2; //// [index.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.m = 3; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var jquery_1 = require("jquery"); var kquery_1 = require("kquery"); var lquery_1 = require("lquery"); diff --git a/tests/baselines/reference/typingsLookupAmd.js b/tests/baselines/reference/typingsLookupAmd.js index 11ccba92814a8..d2552a2de711d 100644 --- a/tests/baselines/reference/typingsLookupAmd.js +++ b/tests/baselines/reference/typingsLookupAmd.js @@ -14,5 +14,5 @@ import {B} from "b"; //// [foo.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); }); diff --git a/tests/baselines/reference/umd-augmentation-1.js b/tests/baselines/reference/umd-augmentation-1.js index e7f7ae5bad5f3..6137a45b0f418 100644 --- a/tests/baselines/reference/umd-augmentation-1.js +++ b/tests/baselines/reference/umd-augmentation-1.js @@ -40,7 +40,7 @@ var t = p.x; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var m = require("math2d"); var v = new m.Vector(3, 2); diff --git a/tests/baselines/reference/umd-augmentation-3.js b/tests/baselines/reference/umd-augmentation-3.js index f0fb1fe0f4270..9350a0c1d14cb 100644 --- a/tests/baselines/reference/umd-augmentation-3.js +++ b/tests/baselines/reference/umd-augmentation-3.js @@ -46,7 +46,7 @@ var t = p.x; //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var m = require("math2d"); var v = new m.Vector(3, 2); diff --git a/tests/baselines/reference/umd-errors.js b/tests/baselines/reference/umd-errors.js index 2c9fbd809e175..9e075884b165b 100644 --- a/tests/baselines/reference/umd-errors.js +++ b/tests/baselines/reference/umd-errors.js @@ -33,4 +33,4 @@ export as namespace C2; //// [err5.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/umd3.js b/tests/baselines/reference/umd3.js index 59b0e0ef2c29e..54aa4598b2035 100644 --- a/tests/baselines/reference/umd3.js +++ b/tests/baselines/reference/umd3.js @@ -15,7 +15,7 @@ let y: number = x.n; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Foo = require("./foo"); Foo.fn(); var x; diff --git a/tests/baselines/reference/umd4.js b/tests/baselines/reference/umd4.js index 2f17ee04858c1..00aec9578bb65 100644 --- a/tests/baselines/reference/umd4.js +++ b/tests/baselines/reference/umd4.js @@ -15,7 +15,7 @@ let y: number = x.n; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Bar = require("./foo"); Bar.fn(); var x; diff --git a/tests/baselines/reference/umd5.js b/tests/baselines/reference/umd5.js index 868243d4fd074..e31a5c9de4886 100644 --- a/tests/baselines/reference/umd5.js +++ b/tests/baselines/reference/umd5.js @@ -17,7 +17,7 @@ let z = Foo; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Bar = require("./foo"); Bar.fn(); var x; diff --git a/tests/baselines/reference/umd8.js b/tests/baselines/reference/umd8.js index 3aefdded756f3..a6a501057b99c 100644 --- a/tests/baselines/reference/umd8.js +++ b/tests/baselines/reference/umd8.js @@ -22,7 +22,7 @@ let x: any = Foo; // Not OK in value position //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var y; // OK in type position y.foo(); var z; // OK in ns position diff --git a/tests/baselines/reference/umdDependencyComment2.js b/tests/baselines/reference/umdDependencyComment2.js index 021ba5254b001..7527f897e6e99 100644 --- a/tests/baselines/reference/umdDependencyComment2.js +++ b/tests/baselines/reference/umdDependencyComment2.js @@ -17,7 +17,7 @@ m1.f(); } })(function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m2"); m1.f(); }); diff --git a/tests/baselines/reference/umdDependencyCommentName1.js b/tests/baselines/reference/umdDependencyCommentName1.js index eba6f0cc16b74..06a8e2e0e1b37 100644 --- a/tests/baselines/reference/umdDependencyCommentName1.js +++ b/tests/baselines/reference/umdDependencyCommentName1.js @@ -17,7 +17,7 @@ m1.f(); } })(function (require, exports, b) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m2"); m1.f(); }); diff --git a/tests/baselines/reference/umdDependencyCommentName2.js b/tests/baselines/reference/umdDependencyCommentName2.js index 2ca52848d1557..484df50250aa4 100644 --- a/tests/baselines/reference/umdDependencyCommentName2.js +++ b/tests/baselines/reference/umdDependencyCommentName2.js @@ -21,7 +21,7 @@ m1.f(); } })(function (require, exports, b, c) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var m1 = require("m2"); m1.f(); }); diff --git a/tests/baselines/reference/umdGlobalConflict.js b/tests/baselines/reference/umdGlobalConflict.js index 114bdd643e45c..10c87be8eaef0 100644 --- a/tests/baselines/reference/umdGlobalConflict.js +++ b/tests/baselines/reference/umdGlobalConflict.js @@ -18,7 +18,7 @@ const p: string = Alpha.x; //// [consumer.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [global.js] // Should be OK, first in wins var p = Alpha.x; diff --git a/tests/baselines/reference/unclosedExportClause01.js b/tests/baselines/reference/unclosedExportClause01.js index e391068997de1..1bb0dfa227793 100644 --- a/tests/baselines/reference/unclosedExportClause01.js +++ b/tests/baselines/reference/unclosedExportClause01.js @@ -17,28 +17,28 @@ export { x as a, from "./t1" //// [t1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = "x"; //// [t2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.x = t1_1.x; exports.from = t1_1.from; //// [t3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.from = t1_1.from; //// [t4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.a = t1_1.x; exports.from = t1_1.from; //// [t5.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var t1_1 = require("./t1"); exports.a = t1_1.x; exports.from = t1_1.from; diff --git a/tests/baselines/reference/unclosedExportClause02.js b/tests/baselines/reference/unclosedExportClause02.js index c8955b03ca292..b9ea2fb1d0eb9 100644 --- a/tests/baselines/reference/unclosedExportClause02.js +++ b/tests/baselines/reference/unclosedExportClause02.js @@ -21,21 +21,21 @@ export { x as a, from //// [t1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); exports.x = "x"; //// [t2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); "./t1"; //// [t3.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); "./t1"; //// [t4.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); "./t1"; //// [t5.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); "./t1"; diff --git a/tests/baselines/reference/undeclaredModuleError.js b/tests/baselines/reference/undeclaredModuleError.js index 927df99766eb4..a17ce090cec5b 100644 --- a/tests/baselines/reference/undeclaredModuleError.js +++ b/tests/baselines/reference/undeclaredModuleError.js @@ -18,7 +18,7 @@ function instrumentFile(covFileDir: string, covFileName: string, originalFilePat //// [undeclaredModuleError.js] define(["require", "exports", "fs"], function (require, exports, fs) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); function readdir(path, accept, callback) { } function join() { var paths = []; diff --git a/tests/baselines/reference/untypedModuleImport.js b/tests/baselines/reference/untypedModuleImport.js index 90fb9ab5f4386..15c569c05711c 100644 --- a/tests/baselines/reference/untypedModuleImport.js +++ b/tests/baselines/reference/untypedModuleImport.js @@ -23,18 +23,18 @@ foo(bar()); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("foo"); foo.bar(); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo = require("foo"); foo(); //// [c.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo_1 = require("foo"); require("./a"); require("./b"); -foo_1["default"](foo_1.bar()); +foo_1.default(foo_1.bar()); diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.js b/tests/baselines/reference/untypedModuleImport_allowJs.js index 5d60df6687c4b..fcdb3d23210be 100644 --- a/tests/baselines/reference/untypedModuleImport_allowJs.js +++ b/tests/baselines/reference/untypedModuleImport_allowJs.js @@ -12,6 +12,6 @@ foo.bar(); //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo_1 = require("foo"); -foo_1["default"].bar(); +foo_1.default.bar(); diff --git a/tests/baselines/reference/untypedModuleImport_noImplicitAny.js b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js index 86e2ae3c175e7..0d5dc388001af 100644 --- a/tests/baselines/reference/untypedModuleImport_noImplicitAny.js +++ b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js @@ -11,4 +11,4 @@ import * as foo from "foo"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/untypedModuleImport_noLocalImports.js b/tests/baselines/reference/untypedModuleImport_noLocalImports.js index 6328101a2ee00..e6819154fbb60 100644 --- a/tests/baselines/reference/untypedModuleImport_noLocalImports.js +++ b/tests/baselines/reference/untypedModuleImport_noLocalImports.js @@ -11,4 +11,4 @@ import * as foo from "./foo"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/untypedModuleImport_vsAmbient.js b/tests/baselines/reference/untypedModuleImport_vsAmbient.js index 4273033fe2264..973d37b1b5941 100644 --- a/tests/baselines/reference/untypedModuleImport_vsAmbient.js +++ b/tests/baselines/reference/untypedModuleImport_vsAmbient.js @@ -18,7 +18,7 @@ x; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var foo_1 = require("foo"); foo_1.x; diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation.js b/tests/baselines/reference/untypedModuleImport_withAugmentation.js index 9d1770f5497b7..6712464e5be3c 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation.js +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation.js @@ -15,6 +15,6 @@ x; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var foo_1 = require("foo"); foo_1.x; diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation2.js b/tests/baselines/reference/untypedModuleImport_withAugmentation2.js index 6a01db5dd251a..61f4440de324a 100644 --- a/tests/baselines/reference/untypedModuleImport_withAugmentation2.js +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation2.js @@ -17,4 +17,4 @@ import { } from "augmenter"; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/unusedImportDeclaration.js b/tests/baselines/reference/unusedImportDeclaration.js index 37f88dc65c32a..d4b2e2dc1654f 100644 --- a/tests/baselines/reference/unusedImportDeclaration.js +++ b/tests/baselines/reference/unusedImportDeclaration.js @@ -25,7 +25,7 @@ var TesterB = (function () { module.exports = TesterB; //// [unusedImportDeclaration_testerA.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var thingy = { me: "A" }; diff --git a/tests/baselines/reference/unusedImports1.js b/tests/baselines/reference/unusedImports1.js index 6e7f90b9d544e..c949e78e680cd 100644 --- a/tests/baselines/reference/unusedImports1.js +++ b/tests/baselines/reference/unusedImports1.js @@ -10,7 +10,7 @@ import {Calculator} from "./file1" //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -19,4 +19,4 @@ var Calculator = (function () { exports.Calculator = Calculator; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/unusedImports11.js b/tests/baselines/reference/unusedImports11.js index def7220e54579..222f6cc838ba9 100644 --- a/tests/baselines/reference/unusedImports11.js +++ b/tests/baselines/reference/unusedImports11.js @@ -19,23 +19,23 @@ new r.Member(); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Member = (function () { function Member() { } return Member; }()); exports.Member = Member; -exports["default"] = Member; +exports.default = Member; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var b_1 = require("./b"); var b_2 = require("./b"); var ns = require("./b"); var r = require("./b"); new b_1.Member(); -new b_2["default"](); +new b_2.default(); new b_2.Member(); new ns.Member(); new r.Member(); diff --git a/tests/baselines/reference/unusedImports12.js b/tests/baselines/reference/unusedImports12.js index 32f0c05136029..6c7b9e02c317e 100644 --- a/tests/baselines/reference/unusedImports12.js +++ b/tests/baselines/reference/unusedImports12.js @@ -14,14 +14,14 @@ import r = require("./b"); //// [b.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Member = (function () { function Member() { } return Member; }()); exports.Member = Member; -exports["default"] = Member; +exports.default = Member; //// [a.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/unusedImports13.js b/tests/baselines/reference/unusedImports13.js index de9c7f4d5ad13..46fbc0f745d0c 100644 --- a/tests/baselines/reference/unusedImports13.js +++ b/tests/baselines/reference/unusedImports13.js @@ -22,6 +22,6 @@ declare global { //// [foo.jsx] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); exports.FooComponent =
; diff --git a/tests/baselines/reference/unusedImports14.js b/tests/baselines/reference/unusedImports14.js index c67a069d815fa..757dce4f53c8c 100644 --- a/tests/baselines/reference/unusedImports14.js +++ b/tests/baselines/reference/unusedImports14.js @@ -22,6 +22,6 @@ declare global { //// [foo.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); exports.FooComponent = React.createElement("div", null); diff --git a/tests/baselines/reference/unusedImports15.js b/tests/baselines/reference/unusedImports15.js index 67c5365aad5a8..ed14cf303a620 100644 --- a/tests/baselines/reference/unusedImports15.js +++ b/tests/baselines/reference/unusedImports15.js @@ -22,6 +22,6 @@ declare global { //// [foo.jsx] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Element = require("react"); exports.FooComponent =
; diff --git a/tests/baselines/reference/unusedImports16.js b/tests/baselines/reference/unusedImports16.js index 254183fe37835..e76093f2defcd 100644 --- a/tests/baselines/reference/unusedImports16.js +++ b/tests/baselines/reference/unusedImports16.js @@ -22,6 +22,6 @@ declare global { //// [foo.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Element = require("react"); exports.FooComponent = Element.createElement("div", null); diff --git a/tests/baselines/reference/unusedImports2.js b/tests/baselines/reference/unusedImports2.js index 5f01507a44431..af9581dd7cc4f 100644 --- a/tests/baselines/reference/unusedImports2.js +++ b/tests/baselines/reference/unusedImports2.js @@ -18,7 +18,7 @@ x.handleChar(); //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -31,7 +31,7 @@ function test() { exports.test = test; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file1_1 = require("./file1"); var x = new file1_1.Calculator(); x.handleChar(); diff --git a/tests/baselines/reference/unusedImports3.js b/tests/baselines/reference/unusedImports3.js index 788cecf54703b..91a14ecb648d0 100644 --- a/tests/baselines/reference/unusedImports3.js +++ b/tests/baselines/reference/unusedImports3.js @@ -21,7 +21,7 @@ test2(); //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -37,7 +37,7 @@ function test2() { exports.test2 = test2; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file1_1 = require("./file1"); file1_1.test(); file1_1.test2(); diff --git a/tests/baselines/reference/unusedImports4.js b/tests/baselines/reference/unusedImports4.js index cfcc9eb1a61c0..06985167c3d61 100644 --- a/tests/baselines/reference/unusedImports4.js +++ b/tests/baselines/reference/unusedImports4.js @@ -22,7 +22,7 @@ test2(); //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -38,7 +38,7 @@ function test2() { exports.test2 = test2; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file1_1 = require("./file1"); var x = new file1_1.Calculator(); x.handleChar(); diff --git a/tests/baselines/reference/unusedImports5.js b/tests/baselines/reference/unusedImports5.js index 0ee931e57a59b..aee214111bc56 100644 --- a/tests/baselines/reference/unusedImports5.js +++ b/tests/baselines/reference/unusedImports5.js @@ -22,7 +22,7 @@ test(); //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -38,7 +38,7 @@ function test2() { exports.test2 = test2; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file1_1 = require("./file1"); var x = new file1_1.Calculator(); x.handleChar(); diff --git a/tests/baselines/reference/unusedImports6.js b/tests/baselines/reference/unusedImports6.js index ea7392de4e15c..b03b9cf1d875b 100644 --- a/tests/baselines/reference/unusedImports6.js +++ b/tests/baselines/reference/unusedImports6.js @@ -22,7 +22,7 @@ import d from "./file1" //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -35,7 +35,7 @@ function test() { exports.test = test; function test2() { } -exports["default"] = test2; +exports.default = test2; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/unusedImports7.js b/tests/baselines/reference/unusedImports7.js index dc4f707f62999..7716a9918edbb 100644 --- a/tests/baselines/reference/unusedImports7.js +++ b/tests/baselines/reference/unusedImports7.js @@ -20,7 +20,7 @@ import * as n from "./file1" //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -33,7 +33,7 @@ function test() { exports.test = test; function test2() { } -exports["default"] = test2; +exports.default = test2; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/unusedImports8.js b/tests/baselines/reference/unusedImports8.js index 88983976362b1..a5370e3a99da3 100644 --- a/tests/baselines/reference/unusedImports8.js +++ b/tests/baselines/reference/unusedImports8.js @@ -22,7 +22,7 @@ t1(); //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -38,7 +38,7 @@ function test2() { exports.test2 = test2; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var file1_1 = require("./file1"); var x = new file1_1.Calculator(); x.handleChar(); diff --git a/tests/baselines/reference/unusedImports9.js b/tests/baselines/reference/unusedImports9.js index e089a1445b9c3..55733fdb5a351 100644 --- a/tests/baselines/reference/unusedImports9.js +++ b/tests/baselines/reference/unusedImports9.js @@ -18,7 +18,7 @@ import c = require('./file1') //// [file1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var Calculator = (function () { function Calculator() { } @@ -34,4 +34,4 @@ function test2() { exports.test2 = test2; //// [file2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/unusedLocalsAndObjectSpread2.js b/tests/baselines/reference/unusedLocalsAndObjectSpread2.js index b7d1b8b106faa..d98dda956ebb1 100644 --- a/tests/baselines/reference/unusedLocalsAndObjectSpread2.js +++ b/tests/baselines/reference/unusedLocalsAndObjectSpread2.js @@ -27,7 +27,7 @@ var __rest = (this && this.__rest) || function (s, e) { t[p[i]] = s[p[i]]; return t; }; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var children = props.children, // here! _a = props.active, // here! rest = __rest(props, ["children", "active"]); diff --git a/tests/baselines/reference/unusedLocalsAndParameters.errors.txt b/tests/baselines/reference/unusedLocalsAndParameters.errors.txt index 2416b29c21691..0144a5f3ea1de 100644 --- a/tests/baselines/reference/unusedLocalsAndParameters.errors.txt +++ b/tests/baselines/reference/unusedLocalsAndParameters.errors.txt @@ -4,14 +4,11 @@ tests/cases/compiler/unusedLocalsAndParameters.ts(15,5): error TS6133: 'farrow' tests/cases/compiler/unusedLocalsAndParameters.ts(15,15): error TS6133: 'a' is declared but never used. tests/cases/compiler/unusedLocalsAndParameters.ts(18,7): error TS6133: 'C' is declared but never used. tests/cases/compiler/unusedLocalsAndParameters.ts(20,12): error TS6133: 'a' is declared but never used. -tests/cases/compiler/unusedLocalsAndParameters.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/unusedLocalsAndParameters.ts(23,11): error TS6133: 'v' is declared but never used. tests/cases/compiler/unusedLocalsAndParameters.ts(27,5): error TS6133: 'E' is declared but never used. tests/cases/compiler/unusedLocalsAndParameters.ts(29,12): error TS6133: 'a' is declared but never used. -tests/cases/compiler/unusedLocalsAndParameters.ts(32,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/unusedLocalsAndParameters.ts(32,11): error TS6133: 'v' is declared but never used. tests/cases/compiler/unusedLocalsAndParameters.ts(38,12): error TS6133: 'a' is declared but never used. -tests/cases/compiler/unusedLocalsAndParameters.ts(41,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. tests/cases/compiler/unusedLocalsAndParameters.ts(41,11): error TS6133: 'v' is declared but never used. tests/cases/compiler/unusedLocalsAndParameters.ts(48,10): error TS6133: 'i' is declared but never used. tests/cases/compiler/unusedLocalsAndParameters.ts(52,10): error TS6133: 'i' is declared but never used. @@ -24,7 +21,7 @@ tests/cases/compiler/unusedLocalsAndParameters.ts(79,11): error TS6133: 'N' is d tests/cases/compiler/unusedLocalsAndParameters.ts(80,9): error TS6133: 'x' is declared but never used. -==== tests/cases/compiler/unusedLocalsAndParameters.ts (24 errors) ==== +==== tests/cases/compiler/unusedLocalsAndParameters.ts (21 errors) ==== export { }; // function declaration paramter @@ -60,8 +57,6 @@ tests/cases/compiler/unusedLocalsAndParameters.ts(80,9): error TS6133: 'x' is de } // Accessor declaration paramter set x(v: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS6133: 'v' is declared but never used. } @@ -77,8 +72,6 @@ tests/cases/compiler/unusedLocalsAndParameters.ts(80,9): error TS6133: 'x' is de } // Accessor declaration paramter set x(v: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS6133: 'v' is declared but never used. } @@ -92,8 +85,6 @@ tests/cases/compiler/unusedLocalsAndParameters.ts(80,9): error TS6133: 'x' is de }, // Accessor declaration paramter set x(v: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. ~ !!! error TS6133: 'v' is declared but never used. } diff --git a/tests/baselines/reference/unusedLocalsAndParameters.js b/tests/baselines/reference/unusedLocalsAndParameters.js index eb4db589c5369..aadde3f5e52d3 100644 --- a/tests/baselines/reference/unusedLocalsAndParameters.js +++ b/tests/baselines/reference/unusedLocalsAndParameters.js @@ -85,7 +85,7 @@ namespace N { //// [unusedLocalsAndParameters.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); // function declaration paramter function f(a) { } diff --git a/tests/baselines/reference/unusedLocalsAndParametersDeferred.errors.txt b/tests/baselines/reference/unusedLocalsAndParametersDeferred.errors.txt deleted file mode 100644 index b35487af3e595..0000000000000 --- a/tests/baselines/reference/unusedLocalsAndParametersDeferred.errors.txt +++ /dev/null @@ -1,171 +0,0 @@ -tests/cases/compiler/unusedLocalsAndParametersDeferred.ts(41,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/unusedLocalsAndParametersDeferred.ts(64,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. -tests/cases/compiler/unusedLocalsAndParametersDeferred.ts(86,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - - -==== tests/cases/compiler/unusedLocalsAndParametersDeferred.ts (3 errors) ==== - export { }; - - function defered(a: () => T): T { - return a(); - } - - // function declaration paramter - function f(a) { - defered(() => { - a; - }); - } - f(0); - - // function expression paramter - var fexp = function (a) { - defered(() => { - a; - }); - }; - fexp(1); - - // arrow function paramter - var farrow = (a) => { - defered(() => { - a; - }); - }; - farrow(2); - - let prop1; - - class C { - // Method declaration paramter - method(a) { - defered(() => { - a; - }); - } - // Accessor declaration paramter - set x(v: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - defered(() => { - v; - }); - } - // in a property initalizer - p = defered(() => { - prop1; - }); - } - - new C(); - - let prop2; - - var E = class { - // Method declaration paramter - method(a) { - defered(() => { - a; - }); - } - // Accessor declaration paramter - set x(v: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - defered(() => { - v; - }); - } - // in a property initalizer - p = defered(() => { - prop2; - }); - } - - new E(); - - - var o = { - // Object literal method declaration paramter - method(a) { - defered(() => { - a; - }); - }, - // Accessor declaration paramter - set x(v: number) { - ~ -!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. - defered(() => { - v; - }); - }, - // in a property initalizer - p: defered(() => { - prop1; - }) - }; - - o; - - // in a for..in statment - for (let i in o) { - defered(() => { - i; - }); - } - - // in a for..of statment - for (let i of [1,2,3]) { - defered(() => { - i; - }); - } - - // in a for. statment - for (let i = 0; i < 10; i++) { - defered(() => { - i; - }); - } - - // in a block - - const condition = false; - if (condition) { - const c = 0; - defered(() => { - c; - }); - } - - // in try/catch/finally - try { - const a = 0; - defered(() => { - a; - }); - } - catch (e) { - const c = 1; - defered(() => { - c; - }); - } - finally { - const c = 0; - defered(() => { - c; - }); - } - - - // in a namespace - namespace N { - var x; - defered(() => { - x; - }); - } - N; - \ No newline at end of file diff --git a/tests/baselines/reference/unusedLocalsAndParametersDeferred.js b/tests/baselines/reference/unusedLocalsAndParametersDeferred.js index faa5ad2b0dfe2..ef106fb1f3384 100644 --- a/tests/baselines/reference/unusedLocalsAndParametersDeferred.js +++ b/tests/baselines/reference/unusedLocalsAndParametersDeferred.js @@ -161,7 +161,7 @@ N; //// [unusedLocalsAndParametersDeferred.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function defered(a) { return a(); } diff --git a/tests/baselines/reference/unusedLocalsAndParametersDeferred.symbols b/tests/baselines/reference/unusedLocalsAndParametersDeferred.symbols new file mode 100644 index 0000000000000..19da604a12414 --- /dev/null +++ b/tests/baselines/reference/unusedLocalsAndParametersDeferred.symbols @@ -0,0 +1,319 @@ +=== tests/cases/compiler/unusedLocalsAndParametersDeferred.ts === +export { }; + +function defered(a: () => T): T { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) +>T : Symbol(T, Decl(unusedLocalsAndParametersDeferred.ts, 2, 17)) +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 2, 20)) +>T : Symbol(T, Decl(unusedLocalsAndParametersDeferred.ts, 2, 17)) +>T : Symbol(T, Decl(unusedLocalsAndParametersDeferred.ts, 2, 17)) + + return a(); +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 2, 20)) +} + +// function declaration paramter +function f(a) { +>f : Symbol(f, Decl(unusedLocalsAndParametersDeferred.ts, 4, 1)) +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 7, 11)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + a; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 7, 11)) + + }); +} +f(0); +>f : Symbol(f, Decl(unusedLocalsAndParametersDeferred.ts, 4, 1)) + +// function expression paramter +var fexp = function (a) { +>fexp : Symbol(fexp, Decl(unusedLocalsAndParametersDeferred.ts, 15, 3)) +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 15, 21)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + a; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 15, 21)) + + }); +}; +fexp(1); +>fexp : Symbol(fexp, Decl(unusedLocalsAndParametersDeferred.ts, 15, 3)) + +// arrow function paramter +var farrow = (a) => { +>farrow : Symbol(farrow, Decl(unusedLocalsAndParametersDeferred.ts, 23, 3)) +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 23, 14)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + a; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 23, 14)) + + }); +}; +farrow(2); +>farrow : Symbol(farrow, Decl(unusedLocalsAndParametersDeferred.ts, 23, 3)) + +let prop1; +>prop1 : Symbol(prop1, Decl(unusedLocalsAndParametersDeferred.ts, 30, 3)) + +class C { +>C : Symbol(C, Decl(unusedLocalsAndParametersDeferred.ts, 30, 10)) + + // Method declaration paramter + method(a) { +>method : Symbol(C.method, Decl(unusedLocalsAndParametersDeferred.ts, 32, 9)) +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 34, 11)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + a; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 34, 11)) + + }); + } + // Accessor declaration paramter + set x(v: number) { +>x : Symbol(C.x, Decl(unusedLocalsAndParametersDeferred.ts, 38, 5)) +>v : Symbol(v, Decl(unusedLocalsAndParametersDeferred.ts, 40, 10)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + v; +>v : Symbol(v, Decl(unusedLocalsAndParametersDeferred.ts, 40, 10)) + + }); + } + // in a property initalizer + p = defered(() => { +>p : Symbol(C.p, Decl(unusedLocalsAndParametersDeferred.ts, 44, 5)) +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + prop1; +>prop1 : Symbol(prop1, Decl(unusedLocalsAndParametersDeferred.ts, 30, 3)) + + }); +} + +new C(); +>C : Symbol(C, Decl(unusedLocalsAndParametersDeferred.ts, 30, 10)) + +let prop2; +>prop2 : Symbol(prop2, Decl(unusedLocalsAndParametersDeferred.ts, 53, 3)) + +var E = class { +>E : Symbol(E, Decl(unusedLocalsAndParametersDeferred.ts, 55, 3)) + + // Method declaration paramter + method(a) { +>method : Symbol(E.method, Decl(unusedLocalsAndParametersDeferred.ts, 55, 15)) +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 57, 11)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + a; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 57, 11)) + + }); + } + // Accessor declaration paramter + set x(v: number) { +>x : Symbol(E.x, Decl(unusedLocalsAndParametersDeferred.ts, 61, 5)) +>v : Symbol(v, Decl(unusedLocalsAndParametersDeferred.ts, 63, 10)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + v; +>v : Symbol(v, Decl(unusedLocalsAndParametersDeferred.ts, 63, 10)) + + }); + } + // in a property initalizer + p = defered(() => { +>p : Symbol(E.p, Decl(unusedLocalsAndParametersDeferred.ts, 67, 5)) +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + prop2; +>prop2 : Symbol(prop2, Decl(unusedLocalsAndParametersDeferred.ts, 53, 3)) + + }); +} + +new E(); +>E : Symbol(E, Decl(unusedLocalsAndParametersDeferred.ts, 55, 3)) + + +var o = { +>o : Symbol(o, Decl(unusedLocalsAndParametersDeferred.ts, 77, 3)) + + // Object literal method declaration paramter + method(a) { +>method : Symbol(method, Decl(unusedLocalsAndParametersDeferred.ts, 77, 9)) +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 79, 11)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + a; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 79, 11)) + + }); + }, + // Accessor declaration paramter + set x(v: number) { +>x : Symbol(x, Decl(unusedLocalsAndParametersDeferred.ts, 83, 6)) +>v : Symbol(v, Decl(unusedLocalsAndParametersDeferred.ts, 85, 10)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + v; +>v : Symbol(v, Decl(unusedLocalsAndParametersDeferred.ts, 85, 10)) + + }); + }, + // in a property initalizer + p: defered(() => { +>p : Symbol(p, Decl(unusedLocalsAndParametersDeferred.ts, 89, 6)) +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + prop1; +>prop1 : Symbol(prop1, Decl(unusedLocalsAndParametersDeferred.ts, 30, 3)) + + }) +}; + +o; +>o : Symbol(o, Decl(unusedLocalsAndParametersDeferred.ts, 77, 3)) + +// in a for..in statment +for (let i in o) { +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 99, 8)) +>o : Symbol(o, Decl(unusedLocalsAndParametersDeferred.ts, 77, 3)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + i; +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 99, 8)) + + }); +} + +// in a for..of statment +for (let i of [1,2,3]) { +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 106, 8)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + i; +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 106, 8)) + + }); +} + +// in a for. statment +for (let i = 0; i < 10; i++) { +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 113, 8)) +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 113, 8)) +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 113, 8)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + i; +>i : Symbol(i, Decl(unusedLocalsAndParametersDeferred.ts, 113, 8)) + + }); +} + +// in a block + +const condition = false; +>condition : Symbol(condition, Decl(unusedLocalsAndParametersDeferred.ts, 121, 5)) + +if (condition) { +>condition : Symbol(condition, Decl(unusedLocalsAndParametersDeferred.ts, 121, 5)) + + const c = 0; +>c : Symbol(c, Decl(unusedLocalsAndParametersDeferred.ts, 123, 9)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + c; +>c : Symbol(c, Decl(unusedLocalsAndParametersDeferred.ts, 123, 9)) + + }); +} + +// in try/catch/finally +try { + const a = 0; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 131, 9)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + a; +>a : Symbol(a, Decl(unusedLocalsAndParametersDeferred.ts, 131, 9)) + + }); +} +catch (e) { +>e : Symbol(e, Decl(unusedLocalsAndParametersDeferred.ts, 136, 7)) + + const c = 1; +>c : Symbol(c, Decl(unusedLocalsAndParametersDeferred.ts, 137, 9)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + c; +>c : Symbol(c, Decl(unusedLocalsAndParametersDeferred.ts, 137, 9)) + + }); +} +finally { + const c = 0; +>c : Symbol(c, Decl(unusedLocalsAndParametersDeferred.ts, 143, 9)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + c; +>c : Symbol(c, Decl(unusedLocalsAndParametersDeferred.ts, 143, 9)) + + }); +} + + +// in a namespace +namespace N { +>N : Symbol(N, Decl(unusedLocalsAndParametersDeferred.ts, 147, 1)) + + var x; +>x : Symbol(x, Decl(unusedLocalsAndParametersDeferred.ts, 152, 7)) + + defered(() => { +>defered : Symbol(defered, Decl(unusedLocalsAndParametersDeferred.ts, 0, 11)) + + x; +>x : Symbol(x, Decl(unusedLocalsAndParametersDeferred.ts, 152, 7)) + + }); +} +N; +>N : Symbol(N, Decl(unusedLocalsAndParametersDeferred.ts, 147, 1)) + diff --git a/tests/baselines/reference/unusedLocalsAndParametersDeferred.types b/tests/baselines/reference/unusedLocalsAndParametersDeferred.types new file mode 100644 index 0000000000000..7ce35bf78a081 --- /dev/null +++ b/tests/baselines/reference/unusedLocalsAndParametersDeferred.types @@ -0,0 +1,385 @@ +=== tests/cases/compiler/unusedLocalsAndParametersDeferred.ts === +export { }; + +function defered(a: () => T): T { +>defered : (a: () => T) => T +>T : T +>a : () => T +>T : T +>T : T + + return a(); +>a() : T +>a : () => T +} + +// function declaration paramter +function f(a) { +>f : (a: any) => void +>a : any + + defered(() => { +>defered(() => { a; }) : void +>defered : (a: () => T) => T +>() => { a; } : () => void + + a; +>a : any + + }); +} +f(0); +>f(0) : void +>f : (a: any) => void +>0 : 0 + +// function expression paramter +var fexp = function (a) { +>fexp : (a: any) => void +>function (a) { defered(() => { a; });} : (a: any) => void +>a : any + + defered(() => { +>defered(() => { a; }) : void +>defered : (a: () => T) => T +>() => { a; } : () => void + + a; +>a : any + + }); +}; +fexp(1); +>fexp(1) : void +>fexp : (a: any) => void +>1 : 1 + +// arrow function paramter +var farrow = (a) => { +>farrow : (a: any) => void +>(a) => { defered(() => { a; });} : (a: any) => void +>a : any + + defered(() => { +>defered(() => { a; }) : void +>defered : (a: () => T) => T +>() => { a; } : () => void + + a; +>a : any + + }); +}; +farrow(2); +>farrow(2) : void +>farrow : (a: any) => void +>2 : 2 + +let prop1; +>prop1 : any + +class C { +>C : C + + // Method declaration paramter + method(a) { +>method : (a: any) => void +>a : any + + defered(() => { +>defered(() => { a; }) : void +>defered : (a: () => T) => T +>() => { a; } : () => void + + a; +>a : any + + }); + } + // Accessor declaration paramter + set x(v: number) { +>x : number +>v : number + + defered(() => { +>defered(() => { v; }) : void +>defered : (a: () => T) => T +>() => { v; } : () => void + + v; +>v : number + + }); + } + // in a property initalizer + p = defered(() => { +>p : void +>defered(() => { prop1; }) : void +>defered : (a: () => T) => T +>() => { prop1; } : () => void + + prop1; +>prop1 : any + + }); +} + +new C(); +>new C() : C +>C : typeof C + +let prop2; +>prop2 : any + +var E = class { +>E : typeof E +>class { // Method declaration paramter method(a) { defered(() => { a; }); } // Accessor declaration paramter set x(v: number) { defered(() => { v; }); } // in a property initalizer p = defered(() => { prop2; });} : typeof E + + // Method declaration paramter + method(a) { +>method : (a: any) => void +>a : any + + defered(() => { +>defered(() => { a; }) : void +>defered : (a: () => T) => T +>() => { a; } : () => void + + a; +>a : any + + }); + } + // Accessor declaration paramter + set x(v: number) { +>x : number +>v : number + + defered(() => { +>defered(() => { v; }) : void +>defered : (a: () => T) => T +>() => { v; } : () => void + + v; +>v : number + + }); + } + // in a property initalizer + p = defered(() => { +>p : void +>defered(() => { prop2; }) : void +>defered : (a: () => T) => T +>() => { prop2; } : () => void + + prop2; +>prop2 : any + + }); +} + +new E(); +>new E() : E +>E : typeof E + + +var o = { +>o : { method(a: any): void; x: number; p: void; } +>{ // Object literal method declaration paramter method(a) { defered(() => { a; }); }, // Accessor declaration paramter set x(v: number) { defered(() => { v; }); }, // in a property initalizer p: defered(() => { prop1; })} : { method(a: any): void; x: number; p: void; } + + // Object literal method declaration paramter + method(a) { +>method : (a: any) => void +>a : any + + defered(() => { +>defered(() => { a; }) : void +>defered : (a: () => T) => T +>() => { a; } : () => void + + a; +>a : any + + }); + }, + // Accessor declaration paramter + set x(v: number) { +>x : number +>v : number + + defered(() => { +>defered(() => { v; }) : void +>defered : (a: () => T) => T +>() => { v; } : () => void + + v; +>v : number + + }); + }, + // in a property initalizer + p: defered(() => { +>p : void +>defered(() => { prop1; }) : void +>defered : (a: () => T) => T +>() => { prop1; } : () => void + + prop1; +>prop1 : any + + }) +}; + +o; +>o : { method(a: any): void; x: number; p: void; } + +// in a for..in statment +for (let i in o) { +>i : string +>o : { method(a: any): void; x: number; p: void; } + + defered(() => { +>defered(() => { i; }) : void +>defered : (a: () => T) => T +>() => { i; } : () => void + + i; +>i : string + + }); +} + +// in a for..of statment +for (let i of [1,2,3]) { +>i : number +>[1,2,3] : number[] +>1 : 1 +>2 : 2 +>3 : 3 + + defered(() => { +>defered(() => { i; }) : void +>defered : (a: () => T) => T +>() => { i; } : () => void + + i; +>i : number + + }); +} + +// in a for. statment +for (let i = 0; i < 10; i++) { +>i : number +>0 : 0 +>i < 10 : boolean +>i : number +>10 : 10 +>i++ : number +>i : number + + defered(() => { +>defered(() => { i; }) : void +>defered : (a: () => T) => T +>() => { i; } : () => void + + i; +>i : number + + }); +} + +// in a block + +const condition = false; +>condition : false +>false : false + +if (condition) { +>condition : false + + const c = 0; +>c : 0 +>0 : 0 + + defered(() => { +>defered(() => { c; }) : void +>defered : (a: () => T) => T +>() => { c; } : () => void + + c; +>c : 0 + + }); +} + +// in try/catch/finally +try { + const a = 0; +>a : 0 +>0 : 0 + + defered(() => { +>defered(() => { a; }) : void +>defered : (a: () => T) => T +>() => { a; } : () => void + + a; +>a : 0 + + }); +} +catch (e) { +>e : any + + const c = 1; +>c : 1 +>1 : 1 + + defered(() => { +>defered(() => { c; }) : void +>defered : (a: () => T) => T +>() => { c; } : () => void + + c; +>c : 1 + + }); +} +finally { + const c = 0; +>c : 0 +>0 : 0 + + defered(() => { +>defered(() => { c; }) : void +>defered : (a: () => T) => T +>() => { c; } : () => void + + c; +>c : 0 + + }); +} + + +// in a namespace +namespace N { +>N : typeof N + + var x; +>x : any + + defered(() => { +>defered(() => { x; }) : void +>defered : (a: () => T) => T +>() => { x; } : () => void + + x; +>x : any + + }); +} +N; +>N : typeof N + diff --git a/tests/baselines/reference/unusedLocalsAndParametersOverloadSignatures.js b/tests/baselines/reference/unusedLocalsAndParametersOverloadSignatures.js index 559a2cb7761e8..2b7796cbe8e15 100644 --- a/tests/baselines/reference/unusedLocalsAndParametersOverloadSignatures.js +++ b/tests/baselines/reference/unusedLocalsAndParametersOverloadSignatures.js @@ -24,7 +24,7 @@ export function genericFunc(details: number, message: any): any { //// [unusedLocalsAndParametersOverloadSignatures.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function func(details, message) { return details + message; } diff --git a/tests/baselines/reference/unusedLocalsAndParametersTypeAliases.js b/tests/baselines/reference/unusedLocalsAndParametersTypeAliases.js index f800d30b71d6a..34b1948bea3e4 100644 --- a/tests/baselines/reference/unusedLocalsAndParametersTypeAliases.js +++ b/tests/baselines/reference/unusedLocalsAndParametersTypeAliases.js @@ -28,7 +28,7 @@ y[0](); //// [unusedLocalsAndParametersTypeAliases.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; x(); var y; diff --git a/tests/baselines/reference/unusedLocalsAndParametersTypeAliases2.js b/tests/baselines/reference/unusedLocalsAndParametersTypeAliases2.js index 59f3af5c21b33..4df643c3ea6a2 100644 --- a/tests/baselines/reference/unusedLocalsAndParametersTypeAliases2.js +++ b/tests/baselines/reference/unusedLocalsAndParametersTypeAliases2.js @@ -12,7 +12,7 @@ export {} //// [unusedLocalsAndParametersTypeAliases2.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function foo() { foo(); } diff --git a/tests/baselines/reference/unusedVariablesinModules1.js b/tests/baselines/reference/unusedVariablesinModules1.js index 474145c633600..e51f676f203f8 100644 --- a/tests/baselines/reference/unusedVariablesinModules1.js +++ b/tests/baselines/reference/unusedVariablesinModules1.js @@ -7,5 +7,5 @@ export var y: string; //// [unusedVariablesinModules1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var x; diff --git a/tests/baselines/reference/varArgsOnConstructorTypes.js b/tests/baselines/reference/varArgsOnConstructorTypes.js index 9c790e7a48bbf..179a402b3d3e5 100644 --- a/tests/baselines/reference/varArgsOnConstructorTypes.js +++ b/tests/baselines/reference/varArgsOnConstructorTypes.js @@ -37,7 +37,7 @@ var __extends = (this && this.__extends) || (function () { })(); define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A(ctor) { } diff --git a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js index 1eab90467d486..6cc4e4951198f 100644 --- a/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js +++ b/tests/baselines/reference/visibilityOfCrossModuleTypeUsage.js @@ -27,14 +27,14 @@ function run(configuration: commands.IConfiguration) { //// [visibilityOfCrossModuleTypeUsage_server.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [visibilityOfCrossModuleTypeUsage_commands.js] "use strict"; //visibilityOfCrossModuleTypeUsage -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); //// [visibilityOfCrossModuleTypeUsage_fs.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function run(configuration) { var absoluteWorkspacePath = configuration.workspace.toAbsolutePath(configuration.server); } diff --git a/tests/baselines/reference/visibilityOfTypeParameters.js b/tests/baselines/reference/visibilityOfTypeParameters.js index 3a1adf3f97d35..9a2aaf0cc8c05 100644 --- a/tests/baselines/reference/visibilityOfTypeParameters.js +++ b/tests/baselines/reference/visibilityOfTypeParameters.js @@ -7,7 +7,7 @@ export class MyClass { //// [visibilityOfTypeParameters.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); var MyClass = (function () { function MyClass() { } diff --git a/tests/baselines/reference/voidAsNonAmbiguousReturnType.js b/tests/baselines/reference/voidAsNonAmbiguousReturnType.js index 4883f840ddbae..cd7b873961d1d 100644 --- a/tests/baselines/reference/voidAsNonAmbiguousReturnType.js +++ b/tests/baselines/reference/voidAsNonAmbiguousReturnType.js @@ -15,12 +15,12 @@ function main() { //// [voidAsNonAmbiguousReturnType_0.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); function mkdirSync(path, mode) { } exports.mkdirSync = mkdirSync; //// [voidAsNonAmbiguousReturnType_1.js] "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { value: true }); /// var fs = require("./voidAsNonAmbiguousReturnType_0"); function main() { diff --git a/tests/baselines/reference/withExportDecl.js b/tests/baselines/reference/withExportDecl.js index 97d528ecd62f6..bfffe54332e3c 100644 --- a/tests/baselines/reference/withExportDecl.js +++ b/tests/baselines/reference/withExportDecl.js @@ -61,7 +61,7 @@ export var eVar3 = 10, eVar4, eVar5; //// [withExportDecl.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var simpleVar; var anotherVar; var varWithSimpleType; diff --git a/tests/baselines/reference/withImportDecl.js b/tests/baselines/reference/withImportDecl.js index f0a1a2d2f148d..c43f02ac1e112 100644 --- a/tests/baselines/reference/withImportDecl.js +++ b/tests/baselines/reference/withImportDecl.js @@ -46,7 +46,7 @@ b.foo; //// [withImportDecl_0.js] define(["require", "exports"], function (require, exports) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); var A = (function () { function A() { } @@ -57,7 +57,7 @@ define(["require", "exports"], function (require, exports) { //// [withImportDecl_1.js] define(["require", "exports", "withImportDecl_0"], function (require, exports, m3) { "use strict"; - exports.__esModule = true; + Object.defineProperty(exports, "__esModule", { value: true }); /// var simpleVar; var anotherVar;