From 0ebcdd196706e7c30ba5dab24c4d26c14a1324dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Sep 2025 15:49:39 +0000 Subject: [PATCH] Update test files to use namespace instead of module keyword Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com> --- .../reference/commentEmitAtEndOfFile1.js | 4 +- .../reference/commentEmitAtEndOfFile1.symbols | 6 +- .../reference/commentEmitAtEndOfFile1.types | 4 +- tests/cases/compiler/FunctionDeclaration7.ts | 2 +- tests/cases/compiler/acceptableAlias1.ts | 2 +- tests/cases/compiler/aliasBug.ts | 2 +- tests/cases/compiler/aliasErrors.ts | 2 +- .../cases/compiler/aliasInaccessibleModule.ts | 4 +- .../compiler/aliasInaccessibleModule2.ts | 4 +- .../cases/compiler/aliasesInSystemModule1.ts | 2 +- .../cases/compiler/aliasesInSystemModule2.ts | 2 +- tests/cases/compiler/alwaysStrictModule.ts | 2 +- tests/cases/compiler/alwaysStrictModule2.ts | 4 +- .../alwaysStrictNoImplicitUseStrict.ts | 2 +- ...rnalModuleWithInternalImportDeclaration.ts | 2 +- ...lModuleWithoutInternalImportDeclaration.ts | 2 +- tests/cases/compiler/anonterface.ts | 2 +- tests/cases/compiler/anyDeclare.ts | 2 +- tests/cases/compiler/arrayAssignmentTest5.ts | 2 +- tests/cases/compiler/arrayAssignmentTest6.ts | 2 +- tests/cases/compiler/arrayBestCommonTypes.ts | 4 +- .../arrowFunctionInExpressionStatement2.ts | 2 +- .../compiler/arrowFunctionsMissingTokens.ts | 12 +- tests/cases/compiler/assign1.ts | 2 +- tests/cases/compiler/assignToExistingClass.ts | 2 +- tests/cases/compiler/assignToFn.ts | 2 +- tests/cases/compiler/assignToModule.ts | 2 +- .../compiler/assignmentCompatability1.ts | 4 +- .../compiler/assignmentCompatability10.ts | 4 +- .../compiler/assignmentCompatability11.ts | 4 +- .../compiler/assignmentCompatability12.ts | 4 +- .../compiler/assignmentCompatability13.ts | 4 +- .../compiler/assignmentCompatability14.ts | 4 +- .../compiler/assignmentCompatability15.ts | 4 +- .../compiler/assignmentCompatability16.ts | 4 +- .../compiler/assignmentCompatability17.ts | 4 +- .../compiler/assignmentCompatability18.ts | 4 +- .../compiler/assignmentCompatability19.ts | 4 +- .../compiler/assignmentCompatability2.ts | 4 +- .../compiler/assignmentCompatability20.ts | 4 +- .../compiler/assignmentCompatability21.ts | 4 +- .../compiler/assignmentCompatability22.ts | 4 +- .../compiler/assignmentCompatability23.ts | 4 +- .../compiler/assignmentCompatability24.ts | 4 +- .../compiler/assignmentCompatability25.ts | 4 +- .../compiler/assignmentCompatability26.ts | 4 +- .../compiler/assignmentCompatability27.ts | 4 +- .../compiler/assignmentCompatability28.ts | 4 +- .../compiler/assignmentCompatability29.ts | 4 +- .../compiler/assignmentCompatability3.ts | 4 +- .../compiler/assignmentCompatability30.ts | 4 +- .../compiler/assignmentCompatability31.ts | 4 +- .../compiler/assignmentCompatability32.ts | 4 +- .../compiler/assignmentCompatability33.ts | 4 +- .../compiler/assignmentCompatability34.ts | 4 +- .../compiler/assignmentCompatability35.ts | 4 +- .../compiler/assignmentCompatability36.ts | 4 +- .../compiler/assignmentCompatability37.ts | 4 +- .../compiler/assignmentCompatability38.ts | 4 +- .../compiler/assignmentCompatability39.ts | 4 +- .../compiler/assignmentCompatability4.ts | 4 +- .../compiler/assignmentCompatability40.ts | 4 +- .../compiler/assignmentCompatability41.ts | 4 +- .../compiler/assignmentCompatability42.ts | 4 +- .../compiler/assignmentCompatability43.ts | 4 +- .../compiler/assignmentCompatability5.ts | 4 +- .../compiler/assignmentCompatability6.ts | 4 +- .../compiler/assignmentCompatability7.ts | 4 +- .../compiler/assignmentCompatability8.ts | 4 +- .../compiler/assignmentCompatability9.ts | 4 +- tests/cases/compiler/assignmentToFunction.ts | 2 +- .../compiler/assignmentToObjectAndFunction.ts | 6 +- .../compiler/assignmentToReferenceTypes.ts | 2 +- tests/cases/compiler/augmentedTypesClass3.ts | 6 +- tests/cases/compiler/augmentedTypesEnum.ts | 6 +- tests/cases/compiler/augmentedTypesEnum3.ts | 8 +- .../compiler/augmentedTypesExternalModule1.ts | 2 +- .../cases/compiler/augmentedTypesFunction.ts | 8 +- tests/cases/compiler/augmentedTypesModules.ts | 58 ++++---- .../cases/compiler/augmentedTypesModules2.ts | 18 +-- .../cases/compiler/augmentedTypesModules3.ts | 4 +- .../cases/compiler/augmentedTypesModules3b.ts | 12 +- .../cases/compiler/augmentedTypesModules4.ts | 14 +- tests/cases/compiler/augmentedTypesVar.ts | 6 +- tests/cases/compiler/bind1.ts | 2 +- .../compiler/binopAssignmentShouldHaveType.ts | 2 +- .../cannotInvokeNewOnErrorExpression.ts | 2 +- .../cases/compiler/checkForObjectTooStrict.ts | 2 +- tests/cases/compiler/circularModuleImports.ts | 2 +- ...clarationMergedInModuleWithContinuation.ts | 4 +- .../compiler/classExtendingQualifiedName.ts | 2 +- .../compiler/classExtendingQualifiedName2.ts | 2 +- ...sMergedWithModuleNotReferingConstructor.ts | 4 +- ...tendsClauseClassNotReferringConstructor.ts | 2 +- .../compiler/classExtendsInterfaceInModule.ts | 4 +- .../classImplementsImportedInterface.ts | 4 +- .../compiler/classTypeParametersInStatics.ts | 2 +- tests/cases/compiler/classdecl.ts | 4 +- tests/cases/compiler/clinterfaces.ts | 2 +- .../cloduleAcrossModuleDefinitions.ts | 4 +- .../compiler/cloduleAndTypeParameters.ts | 2 +- .../cases/compiler/cloduleSplitAcrossFiles.ts | 2 +- tests/cases/compiler/cloduleStaticMembers.ts | 2 +- tests/cases/compiler/cloduleTest1.ts | 2 +- tests/cases/compiler/cloduleTest2.ts | 18 +-- .../compiler/cloduleWithDuplicateMember1.ts | 4 +- .../compiler/cloduleWithDuplicateMember2.ts | 4 +- .../cloduleWithPriorInstantiatedModule.ts | 4 +- .../cloduleWithPriorUninstantiatedModule.ts | 4 +- .../compiler/cloduleWithRecursiveReference.ts | 2 +- ...lisionCodeGenModuleWithAccessorChildren.ts | 10 +- ...ionCodeGenModuleWithConstructorChildren.ts | 6 +- ...sionCodeGenModuleWithEnumMemberConflict.ts | 2 +- ...lisionCodeGenModuleWithFunctionChildren.ts | 6 +- ...ionCodeGenModuleWithMemberClassConflict.ts | 4 +- ...odeGenModuleWithMemberInterfaceConflict.ts | 2 +- ...ollisionCodeGenModuleWithMemberVariable.ts | 2 +- ...ollisionCodeGenModuleWithMethodChildren.ts | 8 +- ...ollisionCodeGenModuleWithModuleChildren.ts | 22 +-- ...llisionCodeGenModuleWithModuleReopening.ts | 8 +- ...collisionCodeGenModuleWithPrivateMember.ts | 2 +- .../collisionExportsRequireAndAmbientClass.ts | 4 +- .../collisionExportsRequireAndAmbientEnum.ts | 4 +- ...llisionExportsRequireAndAmbientFunction.ts | 2 +- ...tsRequireAndAmbientFunctionInGlobalFile.ts | 2 +- ...collisionExportsRequireAndAmbientModule.ts | 12 +- .../collisionExportsRequireAndAmbientVar.ts | 4 +- .../collisionExportsRequireAndClass.ts | 8 +- .../collisionExportsRequireAndEnum.ts | 8 +- .../collisionExportsRequireAndFunction.ts | 4 +- ...onExportsRequireAndFunctionInGlobalFile.ts | 4 +- ...ionExportsRequireAndInternalModuleAlias.ts | 4 +- ...quireAndInternalModuleAliasInGlobalFile.ts | 6 +- .../collisionExportsRequireAndModule.ts | 20 +-- .../compiler/collisionExportsRequireAndVar.ts | 8 +- ...collisionThisExpressionAndAliasInGlobal.ts | 2 +- ...ollisionThisExpressionAndModuleInGlobal.ts | 2 +- .../cases/compiler/commentEmitAtEndOfFile1.ts | 22 +-- .../cases/compiler/commentOnElidedModule1.ts | 6 +- tests/cases/compiler/commentsFormatting.ts | 2 +- tests/cases/compiler/commentsModules.ts | 2 +- .../compiler/commentsMultiModuleSingleFile.ts | 4 +- .../compiler/commentsdoNotEmitComments.ts | 2 +- tests/cases/compiler/commentsemitComments.ts | 2 +- tests/cases/compiler/complicatedPrivacy.ts | 12 +- tests/cases/compiler/compoundVarDecl1.ts | 2 +- .../compiler/constDeclarations-access3.ts | 2 +- .../compiler/constDeclarations-scopes.ts | 2 +- .../constDeclarations-validContexts.ts | 2 +- tests/cases/compiler/constDeclarations2.ts | 2 +- tests/cases/compiler/constEnumErrors.ts | 2 +- .../compiler/constEnumMergingWithValues1.ts | 2 +- .../compiler/constEnumMergingWithValues2.ts | 2 +- .../compiler/constEnumMergingWithValues3.ts | 2 +- .../compiler/constEnumMergingWithValues4.ts | 4 +- .../compiler/constEnumMergingWithValues5.ts | 2 +- .../compiler/constEnumOnlyModuleMerging.ts | 6 +- tests/cases/compiler/constEnums.ts | 8 +- .../constructorArgWithGenericCallSignature.ts | 2 +- tests/cases/compiler/contextualTyping.ts | 4 +- tests/cases/compiler/convertKeywordsYes.ts | 2 +- tests/cases/compiler/covariance1.ts | 2 +- ...ileExportAssignmentImportInternalModule.ts | 2 +- .../compiler/declFileExportImportChain.ts | 2 +- .../compiler/declFileExportImportChain2.ts | 2 +- .../declFileImportChainInExportAssignment.ts | 2 +- ...eclFileImportModuleWithExportAssignment.ts | 2 +- .../cases/compiler/declFileInternalAliases.ts | 6 +- ...ModuleAssignmentInObjectLiteralProperty.ts | 2 +- .../declFileModuleWithPropertyOfTypeModule.ts | 2 +- .../declFileTypeAnnotationArrayType.ts | 2 +- .../declFileTypeAnnotationTupleType.ts | 2 +- .../declFileTypeAnnotationTypeAlias.ts | 4 +- .../declFileTypeAnnotationTypeLiteral.ts | 2 +- .../declFileTypeAnnotationTypeQuery.ts | 2 +- .../declFileTypeAnnotationTypeReference.ts | 2 +- .../declFileTypeAnnotationUnionType.ts | 2 +- ...eTypeAnnotationVisibilityErrorAccessors.ts | 4 +- ...ationVisibilityErrorParameterOfFunction.ts | 4 +- ...tionVisibilityErrorReturnTypeOfFunction.ts | 4 +- ...eTypeAnnotationVisibilityErrorTypeAlias.ts | 8 +- ...ypeAnnotationVisibilityErrorTypeLiteral.ts | 4 +- ...ationVisibilityErrorVariableDeclaration.ts | 4 +- .../compiler/declFileTypeofInAnonymousType.ts | 2 +- tests/cases/compiler/declFileTypeofModule.ts | 4 +- ...rnalModuleNameConflictsInExtendsClause1.ts | 2 +- ...rnalModuleNameConflictsInExtendsClause2.ts | 2 +- tests/cases/compiler/declInput-2.ts | 2 +- tests/cases/compiler/declInput4.ts | 2 +- ...clarationEmitDestructuringArrayPattern3.ts | 2 +- ...onEmitDestructuringObjectLiteralPattern.ts | 2 +- ...nEmitDestructuringObjectLiteralPattern2.ts | 2 +- ...eclarationEmitDestructuringPrivacyError.ts | 2 +- ...ationEmitImportInExportAssignmentModule.ts | 2 +- .../compiler/declarationEmitNameConflicts.ts | 2 +- .../compiler/declarationEmitNameConflicts3.ts | 2 +- tests/cases/compiler/declarationMaps.ts | 2 +- .../declarationMapsWithoutDeclaration.ts | 2 +- tests/cases/compiler/declareAlreadySeen.ts | 2 +- .../cases/compiler/declareDottedModuleName.ts | 4 +- .../compiler/declareFileExportAssignment.ts | 2 +- ...tAssignmentWithVarFromVariableStatement.ts | 2 +- .../defaultArgsInFunctionExpressions.ts | 4 +- .../compiler/differentTypesWithSameName.ts | 2 +- tests/cases/compiler/dottedModuleName.ts | 2 +- tests/cases/compiler/dottedModuleName2.ts | 4 +- tests/cases/compiler/downlevelLetConst16.ts | 8 +- .../compiler/duplicateAnonymousInners1.ts | 4 +- .../duplicateAnonymousModuleClasses.ts | 14 +- ...ateIdentifiersAcrossContainerBoundaries.ts | 24 ++-- ...uplicateIdentifiersAcrossFileBoundaries.ts | 4 +- .../duplicateSymbolsExportMatching.ts | 24 ++-- tests/cases/compiler/duplicateVarAndImport.ts | 2 +- .../cases/compiler/duplicateVarAndImport2.ts | 2 +- .../compiler/duplicateVariablesByScope.ts | 2 +- .../compiler/duplicateVariablesWithAny.ts | 2 +- .../duplicateVarsAcrossFileBoundaries.ts | 4 +- tests/cases/compiler/enumAssignmentCompat.ts | 2 +- tests/cases/compiler/enumAssignmentCompat2.ts | 2 +- tests/cases/compiler/enumBasics3.ts | 4 +- .../enumLiteralAssignableToEnumInsideUnion.ts | 8 +- .../enumsWithMultipleDeclarations3.ts | 2 +- tests/cases/compiler/es5ExportEqualsDts.ts | 2 +- tests/cases/compiler/es6ClassTest3.ts | 2 +- tests/cases/compiler/es6ClassTest5.ts | 2 +- tests/cases/compiler/es6ExportClause.ts | 4 +- tests/cases/compiler/es6ExportClauseInEs5.ts | 4 +- .../compiler/es6ModuleClassDeclaration.ts | 2 +- tests/cases/compiler/es6ModuleConst.ts | 2 +- .../compiler/es6ModuleConstEnumDeclaration.ts | 2 +- .../es6ModuleConstEnumDeclaration2.ts | 2 +- .../compiler/es6ModuleEnumDeclaration.ts | 2 +- .../compiler/es6ModuleFunctionDeclaration.ts | 2 +- .../cases/compiler/es6ModuleInternalImport.ts | 2 +- tests/cases/compiler/es6ModuleLet.ts | 2 +- .../compiler/es6ModuleModuleDeclaration.ts | 2 +- .../compiler/es6ModuleVariableStatement.ts | 2 +- tests/cases/compiler/escapedIdentifiers.ts | 2 +- tests/cases/compiler/exportAlreadySeen.ts | 2 +- .../compiler/exportAssignClassAndModule.ts | 2 +- tests/cases/compiler/exportAssignmentError.ts | 2 +- .../exportAssignmentInternalModule.ts | 2 +- ...signmentWithImportStatementPrivacyError.ts | 4 +- .../exportDeclarationInInternalModule.ts | 4 +- .../exportDefaultForNonInstantiatedModule.ts | 2 +- tests/cases/compiler/exportEqualErrorType.ts | 2 +- .../compiler/exportEqualMemberMissing.ts | 2 +- .../cases/compiler/exportImportAndClodule.ts | 4 +- .../exportImportNonInstantiatedModule.ts | 4 +- tests/cases/compiler/exportPrivateType.ts | 2 +- tests/cases/compiler/extBaseClass1.ts | 6 +- tests/cases/compiler/extBaseClass2.ts | 4 +- .../compiler/externalModuleResolution.ts | 2 +- .../compiler/externalModuleResolution2.ts | 2 +- tests/cases/compiler/fatArrowSelf.ts | 4 +- tests/cases/compiler/forInModule.ts | 2 +- tests/cases/compiler/funClodule.ts | 2 +- tests/cases/compiler/funcdecl.ts | 2 +- tests/cases/compiler/functionCall5.ts | 2 +- tests/cases/compiler/functionCall7.ts | 2 +- .../compiler/functionInIfStatementInModule.ts | 2 +- .../functionTypeArgumentArrayAssignment.ts | 2 +- ...leOfFunctionWithoutReturnTypeAnnotation.ts | 2 +- .../cases/compiler/funduleSplitAcrossFiles.ts | 2 +- tests/cases/compiler/fuzzy.ts | 2 +- .../compiler/generativeRecursionWithTypeOf.ts | 2 +- .../genericArgumentCallSigAssignmentCompat.ts | 2 +- .../genericCallbacksAndClassHierarchy.ts | 2 +- ...entingGenericInterfaceFromAnotherModule.ts | 4 +- .../compiler/genericClassWithStaticFactory.ts | 2 +- .../cases/compiler/genericClassesInModule.ts | 2 +- .../cases/compiler/genericCloduleInModule.ts | 2 +- .../cases/compiler/genericCloduleInModule2.ts | 4 +- ...enericConstraintOnExtendedBuiltinTypes2.ts | 2 +- .../cases/compiler/genericFunduleInModule.ts | 2 +- .../cases/compiler/genericFunduleInModule2.ts | 4 +- ...ericMergedDeclarationUsingTypeParameter.ts | 2 +- ...ricMergedDeclarationUsingTypeParameter2.ts | 2 +- .../cases/compiler/genericOfACloduleType1.ts | 2 +- .../cases/compiler/genericOfACloduleType2.ts | 4 +- ...ericRecursiveImplicitConstructorErrors2.ts | 2 +- ...ericRecursiveImplicitConstructorErrors3.ts | 4 +- .../compiler/genericTypeArgumentInference1.ts | 2 +- ...hImpliedReturnTypeAndFunctionClassMerge.ts | 2 +- tests/cases/compiler/giant.ts | 24 ++-- tests/cases/compiler/global.ts | 2 +- tests/cases/compiler/implicitAnyAmbients.ts | 2 +- .../implicitAnyInAmbientDeclaration.ts | 2 +- ...sAnExternalModuleInsideAnInternalModule.ts | 2 +- .../compiler/importAliasWithDottedName.ts | 4 +- tests/cases/compiler/importAnImport.ts | 2 +- .../importAndVariableDeclarationConflict1.ts | 2 +- .../importAndVariableDeclarationConflict2.ts | 2 +- .../importAndVariableDeclarationConflict3.ts | 2 +- .../importAndVariableDeclarationConflict4.ts | 2 +- .../compiler/importDeclWithClassModifiers.ts | 2 +- .../compiler/importDeclWithDeclareModifier.ts | 2 +- .../compiler/importDeclWithExportModifier.ts | 2 +- ...clWithExportModifierAndExportAssignment.ts | 2 +- .../importDeclarationInModuleDeclaration1.ts | 2 +- tests/cases/compiler/importInTypePosition.ts | 6 +- .../compiler/importOnAliasedIdentifiers.ts | 4 +- .../import_reference-exported-alias.ts | 2 +- .../compiler/importedModuleAddToGlobal.ts | 6 +- tests/cases/compiler/indexIntoEnum.ts | 2 +- .../inheritanceOfGenericConstructorMethod2.ts | 4 +- .../inheritedModuleMembersForClodule.ts | 2 +- tests/cases/compiler/innerAliases.ts | 4 +- tests/cases/compiler/innerAliases2.ts | 4 +- tests/cases/compiler/innerBoundLambdaEmit.ts | 2 +- tests/cases/compiler/innerExtern.ts | 2 +- tests/cases/compiler/innerFunc.ts | 2 +- tests/cases/compiler/innerModExport1.ts | 2 +- tests/cases/compiler/innerModExport2.ts | 2 +- .../compiler/interMixingModulesInterfaces0.ts | 2 +- .../compiler/interMixingModulesInterfaces1.ts | 2 +- .../compiler/interMixingModulesInterfaces2.ts | 4 +- .../compiler/interMixingModulesInterfaces3.ts | 4 +- .../compiler/interMixingModulesInterfaces4.ts | 2 +- .../compiler/interMixingModulesInterfaces5.ts | 2 +- .../compiler/interfaceAssignmentCompat.ts | 2 +- tests/cases/compiler/interfaceDeclaration2.ts | 2 +- tests/cases/compiler/interfaceDeclaration3.ts | 2 +- tests/cases/compiler/interfaceDeclaration4.ts | 2 +- .../compiler/interfaceInReopenedModule.ts | 4 +- .../compiler/interfaceNameAsIdentifier.ts | 2 +- tests/cases/compiler/internalAliasClass.ts | 4 +- tests/cases/compiler/internalAliasEnum.ts | 4 +- tests/cases/compiler/internalAliasFunction.ts | 4 +- .../internalAliasInitializedModule.ts | 4 +- .../cases/compiler/internalAliasInterface.ts | 4 +- .../internalAliasUninitializedModule.ts | 4 +- tests/cases/compiler/internalAliasVar.ts | 4 +- ...leMergedWithClassNotReferencingInstance.ts | 4 +- ...thClassNotReferencingInstanceNoConflict.ts | 4 +- ...nstantiatedModuleNotReferencingInstance.ts | 4 +- ...leMergedWithClassNotReferencingInstance.ts | 4 +- ...thClassNotReferencingInstanceNoConflict.ts | 4 +- ...dModuleNotReferencingInstanceNoConflict.ts | 4 +- tests/cases/compiler/intrinsics.ts | 2 +- .../compiler/isDeclarationVisibleNodeKinds.ts | 18 +-- .../compiler/jsFileCompilationModuleSyntax.ts | 2 +- tests/cases/compiler/lambdaPropSelf.ts | 2 +- .../cases/compiler/letAndVarRedeclaration.ts | 6 +- .../cases/compiler/letDeclarations-scopes.ts | 2 +- .../compiler/letDeclarations-validContexts.ts | 4 +- tests/cases/compiler/letDeclarations2.ts | 2 +- .../compiler/letKeepNamesOfTopLevelItems.ts | 2 +- tests/cases/compiler/libMembers.ts | 2 +- tests/cases/compiler/listFailure.ts | 2 +- .../compiler/localImportNameVsGlobalName.ts | 4 +- tests/cases/compiler/memberScope.ts | 2 +- tests/cases/compiler/mergedDeclarations1.ts | 2 +- tests/cases/compiler/mergedDeclarations2.ts | 2 +- tests/cases/compiler/mergedDeclarations3.ts | 16 +-- tests/cases/compiler/mergedDeclarations4.ts | 4 +- .../mergedModuleDeclarationCodeGen4.ts | 2 +- ...dModuleDeclarationWithSharedExportedVar.ts | 4 +- .../compiler/metadataOfClassFromModule.ts | 2 +- .../compiler/methodContainingLocalFunction.ts | 2 +- .../cases/compiler/missingReturnStatement.ts | 2 +- tests/cases/compiler/mixedExports.ts | 2 +- .../mixingFunctionAndAmbientModule1.ts | 10 +- tests/cases/compiler/moduleAliasInterface.ts | 12 +- .../compiler/moduleAndInterfaceSharingName.ts | 2 +- .../moduleAndInterfaceSharingName2.ts | 2 +- .../moduleAndInterfaceSharingName3.ts | 2 +- .../moduleAndInterfaceSharingName4.ts | 2 +- .../moduleAndInterfaceWithSameName.ts | 8 +- tests/cases/compiler/moduleAsBaseType.ts | 2 +- .../cases/compiler/moduleAssignmentCompat1.ts | 4 +- .../cases/compiler/moduleAssignmentCompat2.ts | 4 +- .../cases/compiler/moduleAssignmentCompat3.ts | 4 +- .../cases/compiler/moduleAssignmentCompat4.ts | 4 +- .../compiler/moduleClassArrayCodeGenTest.ts | 2 +- tests/cases/compiler/moduleCodeGenTest3.ts | 2 +- tests/cases/compiler/moduleCrashBug1.ts | 4 +- tests/cases/compiler/moduleIdentifiers.ts | 2 +- tests/cases/compiler/moduleImport.ts | 2 +- .../moduleMemberWithoutTypeAnnotation1.ts | 4 +- .../moduleMemberWithoutTypeAnnotation2.ts | 2 +- tests/cases/compiler/moduleMerge.ts | 4 +- tests/cases/compiler/moduleNewExportBug.ts | 2 +- tests/cases/compiler/moduleNoEmit.ts | 2 +- .../compiler/moduleOuterQualification.ts | 2 +- tests/cases/compiler/moduleProperty1.ts | 4 +- tests/cases/compiler/moduleProperty2.ts | 4 +- .../compiler/moduleRedifinitionErrors.ts | 2 +- .../compiler/moduleReopenedTypeOtherBlock.ts | 4 +- .../compiler/moduleReopenedTypeSameBlock.ts | 4 +- tests/cases/compiler/moduleScopingBug.ts | 4 +- ...haresNameWithImportDeclarationInsideIt3.ts | 2 +- ...haresNameWithImportDeclarationInsideIt5.ts | 2 +- tests/cases/compiler/moduleSymbolMerging.ts | 6 +- .../compiler/moduleUnassignedVariable.ts | 2 +- .../compiler/moduleVariableArrayIndexer.ts | 2 +- tests/cases/compiler/moduleVariables.ts | 6 +- tests/cases/compiler/moduleVisibilityTest1.ts | 6 +- tests/cases/compiler/moduleVisibilityTest2.ts | 8 +- tests/cases/compiler/moduleVisibilityTest3.ts | 4 +- tests/cases/compiler/moduleVisibilityTest4.ts | 2 +- .../compiler/moduleWithNoValuesAsType.ts | 8 +- .../cases/compiler/moduleWithTryStatement1.ts | 2 +- .../cases/compiler/moduleWithValuesAsType.ts | 2 +- .../module_augmentExistingAmbientVariable.ts | 2 +- .../module_augmentExistingVariable.ts | 2 +- tests/cases/compiler/multiModuleClodule1.ts | 4 +- tests/cases/compiler/multiModuleFundule1.ts | 4 +- tests/cases/compiler/multivar.ts | 2 +- .../nameCollisionWithBlockScopedVariable1.ts | 4 +- tests/cases/compiler/nameCollisions.ts | 10 +- .../namedFunctionExpressionInModule.ts | 2 +- tests/cases/compiler/namespaces1.ts | 2 +- tests/cases/compiler/namespaces2.ts | 2 +- .../cases/compiler/namespacesDeclaration1.ts | 2 +- .../cases/compiler/namespacesDeclaration2.ts | 2 +- .../compiler/nestedModulePrivateAccess.ts | 4 +- tests/cases/compiler/nestedSelf.ts | 2 +- tests/cases/compiler/newArrays.ts | 2 +- tests/cases/compiler/newOperator.ts | 2 +- .../noImplicitAnyParametersInModule.ts | 2 +- .../nonExportedElementsOfMergedModules.ts | 8 +- .../cases/compiler/objectLitArrayDeclNoNew.ts | 2 +- tests/cases/compiler/overload1.ts | 2 +- .../overloadResolutionOverNonCTLambdas.ts | 2 +- .../overloadResolutionOverNonCTObjectLit.ts | 2 +- ...sInDifferentContainersDisagreeOnAmbient.ts | 2 +- .../parameterPropertyInConstructor2.ts | 2 +- tests/cases/compiler/primaryExpressionMods.ts | 2 +- .../compiler/primitiveTypeAsmoduleName.ts | 2 +- .../cases/compiler/privacyAccessorDeclFile.ts | 6 +- .../privacyCheckAnonymousFunctionParameter.ts | 2 +- ...privacyCheckAnonymousFunctionParameter2.ts | 4 +- ...rtAssignmentOnExportedGenericInterface1.ts | 2 +- ...rtAssignmentOnExportedGenericInterface2.ts | 2 +- .../privacyCheckTypeOfInvisibleModuleError.ts | 4 +- ...rivacyCheckTypeOfInvisibleModuleNoError.ts | 4 +- tests/cases/compiler/privacyClass.ts | 2 +- .../privacyClassExtendsClauseDeclFile.ts | 4 +- .../privacyClassImplementsClauseDeclFile.ts | 4 +- tests/cases/compiler/privacyFunc.ts | 2 +- .../privacyFunctionParameterDeclFile.ts | 6 +- .../privacyFunctionReturnTypeDeclFile.ts | 6 +- tests/cases/compiler/privacyGetter.ts | 2 +- tests/cases/compiler/privacyGloClass.ts | 2 +- tests/cases/compiler/privacyGloFunc.ts | 2 +- tests/cases/compiler/privacyGloGetter.ts | 2 +- tests/cases/compiler/privacyGloInterface.ts | 4 +- tests/cases/compiler/privacyGloVar.ts | 2 +- tests/cases/compiler/privacyInterface.ts | 4 +- .../privacyInterfaceExtendsClauseDeclFile.ts | 4 +- ...yLocalInternalReferenceImportWithExport.ts | 4 +- ...calInternalReferenceImportWithoutExport.ts | 4 +- ...pLevelInternalReferenceImportWithExport.ts | 2 +- ...velInternalReferenceImportWithoutExport.ts | 2 +- .../privacyTypeParameterOfFunctionDeclFile.ts | 2 +- .../privacyTypeParametersOfClassDeclFile.ts | 2 +- ...rivacyTypeParametersOfInterfaceDeclFile.ts | 2 +- tests/cases/compiler/privacyVar.ts | 2 +- tests/cases/compiler/privacyVarDeclFile.ts | 6 +- .../compiler/privateInstanceVisibility.ts | 2 +- tests/cases/compiler/privateVisibility.ts | 2 +- .../propertyNamesWithStringLiteral.ts | 2 +- tests/cases/compiler/qualifiedModuleLocals.ts | 2 +- ...arations-entity-names-referencing-a-var.ts | 4 +- ...solution-does-not-affect-class-heritage.ts | 2 +- tests/cases/compiler/qualify.ts | 10 +- tests/cases/compiler/reachabilityChecks1.ts | 20 +-- tests/cases/compiler/reachabilityChecks2.ts | 4 +- .../cases/compiler/reboundBaseClassSymbol.ts | 2 +- .../reboundIdentifierOnImportAlias.ts | 4 +- tests/cases/compiler/rectype.ts | 2 +- ...ssInstantiationsWithDefaultConstructors.ts | 2 +- .../compiler/recursiveCloduleReference.ts | 2 +- .../recursiveIdenticalOverloadResolution.ts | 2 +- .../compiler/reservedNameOnModuleImport.ts | 2 +- ...reservedNameOnModuleImportWithInterface.ts | 2 +- tests/cases/compiler/reservedWords2.ts | 2 +- ...lassDeclarationWhenInBaseTypeResolution.ts | 132 +++++++++--------- .../returnTypeParameterWithModules.ts | 4 +- .../cases/compiler/reuseInnerModuleMember.ts | 2 +- tests/cases/compiler/selfRef.ts | 2 +- tests/cases/compiler/separate1-2.ts | 2 +- .../compiler/sourceMap-FileWithComments.ts | 2 +- .../sourceMap-StringLiteralWithNewLine.ts | 2 +- ...alModuleWithCommentPrecedingStatement01.ts | 2 +- .../compiler/sourceMapValidationModule.ts | 6 +- ...ultipleFilesWithFileEndingWithInterface.ts | 4 +- .../sourcemapValidationDuplicateNames.ts | 4 +- .../compiler/specializationOfExportedClass.ts | 2 +- .../compiler/staticMemberExportAccess.ts | 2 +- .../staticMethodReferencingTypeArgument1.ts | 2 +- tests/cases/compiler/statics.ts | 2 +- .../compiler/staticsNotInScopeInClodule.ts | 2 +- ...rictModeReservedWordInModuleDeclaration.ts | 4 +- .../stringLiteralObjectLiteralDeclaration1.ts | 2 +- tests/cases/compiler/structural1.ts | 2 +- .../structuralTypeInDeclareFileForModule.ts | 2 +- tests/cases/compiler/super1.ts | 2 +- .../cases/compiler/superAccessInFatArrow1.ts | 2 +- ...side-object-literal-getters-and-setters.ts | 2 +- .../cases/compiler/systemModuleConstEnums.ts | 2 +- ...stemModuleConstEnumsSeparateCompilation.ts | 2 +- tests/cases/compiler/testContainerList.ts | 2 +- .../thisAssignmentInNamespaceDeclaration1.ts | 2 +- tests/cases/compiler/thisBinding.ts | 2 +- tests/cases/compiler/thisInModule.ts | 2 +- tests/cases/compiler/thisInModuleFunction1.ts | 2 +- tests/cases/compiler/thisKeyword.ts | 2 +- .../this_inside-enum-should-not-be-allowed.ts | 2 +- ...side-object-literal-getters-and-setters.ts | 2 +- tests/cases/compiler/topLevel.ts | 2 +- tests/cases/compiler/topLevelLambda.ts | 2 +- tests/cases/compiler/typeResolution.ts | 4 +- tests/cases/compiler/typeValueConflict1.ts | 4 +- tests/cases/compiler/typeValueConflict2.ts | 6 +- tests/cases/compiler/typeofInternalModules.ts | 2 +- tests/cases/compiler/undeclaredBase.ts | 2 +- tests/cases/compiler/undeclaredMethod.ts | 2 +- tests/cases/compiler/underscoreTest1.ts | 2 +- .../unexportedInstanceClassVariables.ts | 4 +- tests/cases/compiler/unknownSymbols2.ts | 4 +- .../compiler/unspecializedConstraints.ts | 2 +- .../cases/compiler/unusedClassesinModule1.ts | 2 +- tests/cases/compiler/unusedImports10.ts | 4 +- tests/cases/compiler/unusedModuleInModule.ts | 4 +- .../cases/compiler/unusedNamespaceInModule.ts | 2 +- ...ngModuleWithExportImportInValuePosition.ts | 4 +- tests/cases/compiler/varBlock.ts | 4 +- ...flictsWithImportInDifferentPartOfModule.ts | 4 +- tests/cases/compiler/vararg.ts | 2 +- tests/cases/compiler/vardecl.ts | 2 +- ...eclaratorResolvedDuringContextualTyping.ts | 8 +- tests/cases/compiler/visSyntax.ts | 2 +- tests/cases/compiler/withExportDecl.ts | 2 +- tests/cases/compiler/withImportDecl.ts | 2 +- tests/cases/compiler/withStatementErrors.ts | 2 +- .../conformance/Symbols/ES5SymbolProperty2.ts | 2 +- .../conformance/ambient/ambientErrors.ts | 2 +- .../ambient/ambientInsideNonAmbient.ts | 4 +- .../asyncAwaitIsolatedModules_es2017.ts | 2 +- .../async/es2017/asyncAwait_es2017.ts | 2 +- .../es5/asyncAwaitIsolatedModules_es5.ts | 2 +- .../conformance/async/es5/asyncAwait_es5.ts | 2 +- .../es6/asyncAwaitIsolatedModules_es6.ts | 2 +- .../conformance/async/es6/asyncAwait_es6.ts | 2 +- .../classAbstractImportInstantiation.ts | 2 +- .../classAbstractInAModule.ts | 2 +- .../classAbstractMergedDeclaration.ts | 4 +- .../classAndInterfaceWithSameName.ts | 2 +- .../classAndVariableWithSameName.ts | 2 +- .../classExtendsEveryObjectType.ts | 2 +- .../classExtendsItselfIndirectly2.ts | 10 +- ...classExtendsShadowedConstructorFunction.ts | 2 +- .../mergeClassInterfaceAndModule.ts | 8 +- .../conformance/classes/classExpression.ts | 2 +- .../classConstructorAccessibility.ts | 2 +- .../privateStaticNotAccessibleInClodule.ts | 2 +- .../privateStaticNotAccessibleInClodule2.ts | 2 +- .../protectedStaticNotAccessibleInClodule.ts | 2 +- .../classTypes/genericSetterInClassType.ts | 2 +- ...nstancePropertiesInheritedIntoClassType.ts | 4 +- .../classTypes/instancePropertyInClassType.ts | 4 +- .../staticPropertyNotInClassType.ts | 8 +- .../classWithConstructors.ts | 4 +- .../constructorHasPrototypeProperty.ts | 4 +- .../staticPropertyNameConflicts.ts | 20 +-- .../classDoesNotDependOnPrivateMember.ts | 2 +- .../class/method/decoratorOnClassMethod11.ts | 2 +- .../class/method/decoratorOnClassMethod12.ts | 2 +- .../invalid/decoratorOnImportEquals1.ts | 4 +- .../invalid/decoratorOnInternalModule.ts | 2 +- tests/cases/conformance/enums/enumMerging.ts | 12 +- .../conformance/enums/enumMergingErrors.ts | 18 +-- .../es6/Symbols/symbolDeclarationEmit12.ts | 2 +- .../es6/Symbols/symbolProperty48.ts | 2 +- .../es6/Symbols/symbolProperty49.ts | 2 +- .../es6/Symbols/symbolProperty50.ts | 2 +- .../es6/Symbols/symbolProperty51.ts | 4 +- .../es6/Symbols/symbolProperty55.ts | 2 +- .../es6/Symbols/symbolProperty56.ts | 2 +- .../disallowLineTerminatorBeforeArrow.ts | 2 +- .../computedPropertyNames19_ES5.ts | 2 +- .../computedPropertyNames19_ES6.ts | 2 +- .../declarationsAndAssignments.ts | 2 +- .../es6/modules/exportsAndImports1-amd.ts | 4 +- .../es6/modules/exportsAndImports1-es6.ts | 4 +- .../es6/modules/exportsAndImports1.ts | 4 +- ...teralShorthandPropertiesErrorWithModule.ts | 4 +- ...ectLiteralShorthandPropertiesWithModule.ts | 4 +- ...LiteralShorthandPropertiesWithModuleES6.ts | 4 +- .../generatorInAmbientContext6.ts | 2 +- .../yieldExpressions/generatorOverloads1.ts | 2 +- .../yieldExpressions/generatorOverloads5.ts | 2 +- ...poundExponentiationAssignmentLHSIsValue.ts | 2 +- .../assignmentLHSIsValue.ts | 2 +- .../compoundAssignmentLHSIsValue.ts | 2 +- .../additionOperatorWithAnyAndEveryType.ts | 2 +- .../additionOperatorWithInvalidOperands.ts | 2 +- .../generatedContextualTyping.ts | 48 +++---- .../expressions/functionCalls/forgottenNew.ts | 2 +- .../functions/arrowFunctionContexts.ts | 6 +- .../typeOfThisInFunctionExpression.ts | 2 +- .../identifiers/scopeResolutionIdentifiers.ts | 8 +- .../thisKeyword/thisInInvalidContexts.ts | 2 +- .../thisInInvalidContextsExternalModule.ts | 2 +- .../typeGuardsInFunctionAndModuleBlock.ts | 6 +- .../typeGuards/typeGuardsInModule.ts | 6 +- .../bitwiseNotOperatorWithAnyOtherType.ts | 2 +- .../bitwiseNotOperatorWithBooleanType.ts | 2 +- .../bitwiseNotOperatorWithNumberType.ts | 2 +- .../bitwiseNotOperatorWithStringType.ts | 2 +- .../decrementOperatorWithAnyOtherType.ts | 2 +- ...eratorWithAnyOtherTypeInvalidOperations.ts | 2 +- .../decrementOperatorWithNumberType.ts | 2 +- ...OperatorWithNumberTypeInvalidOperations.ts | 2 +- ...ementOperatorWithUnsupportedBooleanType.ts | 2 +- ...rementOperatorWithUnsupportedStringType.ts | 2 +- .../deleteOperatorWithAnyOtherType.ts | 2 +- .../deleteOperatorWithBooleanType.ts | 2 +- .../deleteOperatorWithNumberType.ts | 2 +- .../deleteOperatorWithStringType.ts | 2 +- .../incrementOperatorWithAnyOtherType.ts | 2 +- ...eratorWithAnyOtherTypeInvalidOperations.ts | 2 +- .../incrementOperatorWithNumberType.ts | 2 +- ...OperatorWithNumberTypeInvalidOperations.ts | 2 +- ...ementOperatorWithUnsupportedBooleanType.ts | 2 +- ...rementOperatorWithUnsupportedStringType.ts | 2 +- .../logicalNotOperatorWithAnyOtherType.ts | 2 +- .../logicalNotOperatorWithBooleanType.ts | 2 +- .../logicalNotOperatorWithNumberType.ts | 2 +- .../logicalNotOperatorWithStringType.ts | 2 +- .../negateOperatorWithAnyOtherType.ts | 2 +- .../negateOperatorWithBooleanType.ts | 2 +- .../negateOperatorWithNumberType.ts | 2 +- .../negateOperatorWithStringType.ts | 2 +- .../plusOperatorWithAnyOtherType.ts | 2 +- .../plusOperatorWithBooleanType.ts | 2 +- .../plusOperatorWithNumberType.ts | 2 +- .../plusOperatorWithStringType.ts | 2 +- .../typeofOperatorWithAnyOtherType.ts | 2 +- .../typeofOperatorWithBooleanType.ts | 2 +- .../typeofOperatorWithNumberType.ts | 2 +- .../typeofOperatorWithStringType.ts | 2 +- .../voidOperatorWithAnyOtherType.ts | 2 +- .../voidOperatorWithBooleanType.ts | 2 +- .../voidOperatorWithNumberType.ts | 2 +- .../voidOperatorWithStringType.ts | 2 +- .../assignmentToParenthesizedIdentifiers.ts | 4 +- .../valuesAndReferences/assignments.ts | 2 +- ...reventsParsingAsAmbientExternalModule02.ts | 2 +- .../duplicateExportAssignments.ts | 2 +- .../exportAssignmentCircularModules.ts | 6 +- .../exportAssignmentMergedModule.ts | 4 +- .../exportAssignmentTopLevelClodule.ts | 2 +- .../exportAssignmentTopLevelEnumdule.ts | 2 +- .../exportAssignmentTopLevelFundule.ts | 2 +- .../exportAssignmentTopLevelIdentifier.ts | 2 +- .../exportNonInitializedVariablesAMD.ts | 2 +- .../exportNonInitializedVariablesCommonJS.ts | 2 +- .../exportNonInitializedVariablesES6.ts | 2 +- .../exportNonInitializedVariablesSystem.ts | 2 +- .../exportNonInitializedVariablesUMD.ts | 2 +- .../importNonExternalModule.ts | 2 +- .../functions/functionNameConflicts.ts | 2 +- .../functions/functionOverloadErrors.ts | 2 +- ...icAndNonGenericInterfaceWithTheSameName.ts | 10 +- ...cAndNonGenericInterfaceWithTheSameName2.ts | 10 +- .../mergeThreeInterfaces.ts | 2 +- .../mergeThreeInterfaces2.ts | 10 +- .../declarationMerging/mergeTwoInterfaces.ts | 2 +- .../declarationMerging/mergeTwoInterfaces2.ts | 8 +- ...dInterfacesWithConflictingPropertyNames.ts | 10 +- ...InterfacesWithConflictingPropertyNames2.ts | 10 +- .../mergedInterfacesWithInheritedPrivates3.ts | 2 +- .../mergedInterfacesWithMultipleBases.ts | 2 +- .../mergedInterfacesWithMultipleBases2.ts | 2 +- ...cInterfacesDifferingByTypeParameterName.ts | 10 +- ...InterfacesDifferingByTypeParameterName2.ts | 10 +- ...nericInterfacesWithDifferentConstraints.ts | 10 +- ...erfacesWithTheSameNameButDifferentArity.ts | 10 +- .../twoInterfacesDifferentRootModule.ts | 4 +- .../twoInterfacesDifferentRootModule2.ts | 4 +- ...MergedInterfacesWithDifferingOverloads2.ts | 2 +- ...terfaceThatIndirectlyInheritsFromItself.ts | 2 +- .../interfaceWithMultipleBaseTypes.ts | 2 +- .../interfaceWithPropertyOfEveryType.ts | 2 +- ...gAnInterfaceExtendingClassWithPrivates2.ts | 4 +- ...onAmbientClassWithSameNameAndCommonRoot.ts | 2 +- ...hModuleMemberThatUsesClassTypeParameter.ts | 8 +- ...GenericClassStaticFunctionOfTheSameName.ts | 2 +- ...GenericClassStaticFunctionOfTheSameName.ts | 2 +- ...dStaticFunctionUsingClassPrivateStatics.ts | 2 +- ...nctionAndExportedFunctionThatShareAName.ts | 4 +- ...ionAndNonExportedFunctionThatShareAName.ts | 4 +- ...ticVariableAndExportedVarThatShareAName.ts | 4 +- ...VariableAndNonExportedVarThatShareAName.ts | 4 +- ...ClassAndModuleWithSameNameAndCommonRoot.ts | 2 +- ...ssAndModuleWithSameNameAndCommonRootES6.ts | 2 +- .../EnumAndModuleWithSameNameAndCommonRoot.ts | 2 +- ...ctionAndModuleWithSameNameAndCommonRoot.ts | 6 +- ...oduleWithSameNameAndDifferentCommonRoot.ts | 4 +- ...ModuleAndClassWithSameNameAndCommonRoot.ts | 2 +- .../ModuleAndEnumWithSameNameAndCommonRoot.ts | 2 +- ...uleAndFunctionWithSameNameAndCommonRoot.ts | 6 +- ...ortedAndNonExportedClassesOfTheSameName.ts | 6 +- ...edAndNonExportedInterfacesOfTheSameName.ts | 6 +- ...tedAndNonExportedLocalVarsOfTheSameName.ts | 4 +- ...rgeEachWithExportedClassesOfTheSameName.ts | 6 +- ...EachWithExportedInterfacesOfTheSameName.ts | 6 +- ...rgeEachWithExportedModulesOfTheSameName.ts | 8 +- ...esWithTheSameNameAndDifferentCommonRoot.ts | 4 +- ...ModulesWithTheSameNameAndSameCommonRoot.ts | 4 +- .../codeGeneration/exportCodeGen.ts | 14 +- .../codeGeneration/importStatements.ts | 10 +- .../importStatementsInterfaces.ts | 10 +- .../codeGeneration/nameCollision.ts | 10 +- ...ichExtendsInterfaceWithInaccessibleType.ts | 2 +- ...sClassHeritageListMemberTypeAnnotations.ts | 2 +- ...naccessibleTypeInIndexerTypeAnnotations.ts | 2 +- ...accessibleTypeInTypeParameterConstraint.ts | 2 +- ...TypesInParameterAndReturnTypeAnnotation.ts | 2 +- ...ccessibleTypesInParameterTypeAnnotation.ts | 2 +- ...InaccessibleTypesInReturnTypeAnnotation.ts | 2 +- ...sClassHeritageListMemberTypeAnnotations.ts | 2 +- ...naccessibleTypeInIndexerTypeAnnotations.ts | 2 +- ...accessibleTypeInTypeParameterConstraint.ts | 2 +- ...WithAccessibleTypesOnItsExportedMembers.ts | 2 +- ...hAccessibleTypesInMemberTypeAnnotations.ts | 2 +- ...sibleTypesInNestedMemberTypeAnnotations.ts | 2 +- ...cTypeWithInaccessibleTypeAsTypeArgument.ts | 2 +- ...iableWithAccessibleTypeInTypeAnnotation.ts | 2 +- ...bleWithInaccessibleTypeInTypeAnnotation.ts | 2 +- ...ModuleWithExportedAndNonExportedClasses.ts | 2 +- .../ModuleWithExportedAndNonExportedEnums.ts | 2 +- ...duleWithExportedAndNonExportedFunctions.ts | 2 +- ...leWithExportedAndNonExportedImportAlias.ts | 6 +- ...duleWithExportedAndNonExportedVariables.ts | 2 +- .../NonInitializedExportInInternalModule.ts | 4 +- .../importDeclarations/circularImportAlias.ts | 4 +- .../importDeclarations/exportImportAlias.ts | 12 +- .../importAliasIdentifiers.ts | 6 +- .../shadowedInternalModule.ts | 20 +-- .../invalidModuleWithStatementsOfEveryKind.ts | 24 ++-- .../invalidModuleWithVarStatements.ts | 12 +- .../moduleWithStatementsOfEveryKind.ts | 6 +- .../InvalidNonInstantiatedModule.ts | 2 +- .../asiPreventsParsingAsNamespace04.ts | 2 +- .../moduleDeclarations/instantiatedModule.ts | 6 +- .../invalidInstantiatedModule.ts | 4 +- .../invalidNestedModules.ts | 4 +- .../moduleDeclarations/nestedModules.ts | 4 +- .../nonInstantiatedModule.ts | 6 +- .../parserErrorRecovery_ClassElement2.ts | 2 +- .../parserErrorRecovery_ClassElement3.ts | 2 +- ...ErrorRecovery_IncompleteMemberVariable1.ts | 2 +- ...ErrorRecovery_IncompleteMemberVariable2.ts | 2 +- ...serErrantAccessibilityModifierInModule1.ts | 2 +- .../parserUnfinishedTypeNameBeforeKeyword1.ts | 2 +- .../parserExportAssignment5.ts | 2 +- .../parserExportAssignment9.ts | 2 +- .../parserFunctionDeclaration7.ts | 2 +- .../parserModuleDeclaration2.d.ts | 2 +- .../parserModuleDeclaration4.d.ts | 2 +- .../parserModuleDeclaration4.ts | 4 +- .../parserModuleDeclaration5.ts | 2 +- .../parserModuleDeclaration6.ts | 2 +- .../ecmascript5/RealWorld/parserharness.ts | 2 +- .../ecmascript5/RealWorld/parserindenter.ts | 2 +- .../SkippedTokens/parserSkippedTokens16.ts | 2 +- .../parser/ecmascript5/parserRealSource1.ts | 2 +- .../parser/ecmascript5/parserRealSource10.ts | 2 +- .../parser/ecmascript5/parserRealSource11.ts | 2 +- .../parser/ecmascript5/parserRealSource12.ts | 4 +- .../parser/ecmascript5/parserRealSource14.ts | 2 +- .../parser/ecmascript5/parserRealSource2.ts | 2 +- .../parser/ecmascript5/parserRealSource3.ts | 2 +- .../parser/ecmascript5/parserRealSource4.ts | 2 +- .../parser/ecmascript5/parserRealSource5.ts | 2 +- .../parser/ecmascript5/parserRealSource6.ts | 2 +- .../parser/ecmascript5/parserRealSource7.ts | 2 +- .../parser/ecmascript5/parserRealSource8.ts | 2 +- .../parser/ecmascript5/parserRealSource9.ts | 2 +- .../everyTypeWithAnnotationAndInitializer.ts | 2 +- ...TypeWithAnnotationAndInvalidInitializer.ts | 4 +- .../everyTypeWithInitializer.ts | 2 +- .../invalidMultipleVariableDeclarations.ts | 2 +- .../for-inStatements/for-inStatements.ts | 2 +- .../statements/forStatements/forStatements.ts | 2 +- .../forStatementsMultipleInvalidDecl.ts | 2 +- .../ifDoWhileStatements.ts | 4 +- .../switchStatements/switchStatements.ts | 2 +- .../throwStatements/throwStatements.ts | 2 +- .../types/any/assignAnyToEveryType.ts | 2 +- .../types/members/duplicateStringIndexers.ts | 2 +- ...ureWithoutReturnTypeAnnotationInference.ts | 8 +- .../constructSignaturesWithOverloads2.ts | 4 +- .../boolean/invalidBooleanAssignments.ts | 2 +- .../primitives/null/validNullAssignments.ts | 2 +- .../number/invalidNumberAssignments.ts | 2 +- .../string/invalidStringAssignments.ts | 2 +- .../undefined/invalidUndefinedAssignments.ts | 2 +- .../undefined/invalidUndefinedValues.ts | 2 +- .../void/invalidAssignmentsToVoid.ts | 2 +- .../primitives/void/invalidVoidAssignments.ts | 2 +- .../primitives/void/invalidVoidValues.ts | 2 +- .../typeQueries/typeofANonExportedType.ts | 4 +- .../typeQueries/typeofModuleWithoutExports.ts | 2 +- .../specifyingTypes/typeQueries/typeofThis.ts | 2 +- ...genericTypeReferenceWithoutTypeArgument.ts | 2 +- ...enericTypeReferenceWithoutTypeArgument2.ts | 2 +- .../anyAssignabilityInInheritance.ts | 4 +- .../anyAssignableToEveryType2.ts | 4 +- .../assignmentCompatWithCallSignatures4.ts | 6 +- ...ssignmentCompatWithConstructSignatures4.ts | 6 +- ...ricCallSignaturesWithOptionalParameters.ts | 6 +- .../assignmentCompatWithNumericIndexer.ts | 2 +- .../assignmentCompatWithNumericIndexer2.ts | 2 +- .../assignmentCompatWithNumericIndexer3.ts | 2 +- .../assignmentCompatWithObjectMembers.ts | 4 +- .../assignmentCompatWithObjectMembers4.ts | 4 +- ...entCompatWithObjectMembersAccessibility.ts | 4 +- ...nmentCompatWithObjectMembersOptionality.ts | 4 +- ...mentCompatWithObjectMembersOptionality2.ts | 4 +- ...mpatWithObjectMembersStringNumericNames.ts | 4 +- .../assignmentCompatWithStringIndexer.ts | 2 +- .../assignmentCompatWithStringIndexer2.ts | 2 +- .../assignmentCompatWithStringIndexer3.ts | 2 +- ...callSignatureAssignabilityInInheritance.ts | 4 +- ...allSignatureAssignabilityInInheritance3.ts | 6 +- ...ructSignatureAssignabilityInInheritance.ts | 4 +- ...uctSignatureAssignabilityInInheritance3.ts | 6 +- .../enumAssignability.ts | 2 +- .../enumAssignabilityInInheritance.ts | 4 +- .../heterogeneousArrayLiterals.ts | 4 +- .../enumIsNotASubtypeOfAnythingButNumber.ts | 4 +- .../nullIsSubtypeOfEverythingButUndefined.ts | 4 +- .../subtypesAndSuperTypes/subtypesOfAny.ts | 4 +- .../subtypesOfTypeParameter.ts | 4 +- ...subtypesOfTypeParameterWithConstraints2.ts | 4 +- ...OfTypeParameterWithRecursiveConstraints.ts | 4 +- .../subtypesAndSuperTypes/subtypesOfUnion.ts | 4 +- .../subtypingWithCallSignatures.ts | 2 +- .../subtypingWithCallSignatures3.ts | 4 +- ...CallSignaturesWithSpecializedSignatures.ts | 4 +- .../subtypingWithConstructSignatures.ts | 2 +- .../subtypingWithConstructSignatures3.ts | 4 +- ...ructSignaturesWithSpecializedSignatures.ts | 4 +- ...ricCallSignaturesWithOptionalParameters.ts | 6 +- ...nstructSignaturesWithOptionalParameters.ts | 6 +- .../subtypingWithNumericIndexer.ts | 2 +- .../subtypingWithNumericIndexer2.ts | 2 +- .../subtypingWithNumericIndexer3.ts | 2 +- .../subtypingWithNumericIndexer4.ts | 2 +- .../subtypingWithNumericIndexer5.ts | 2 +- .../subtypingWithObjectMembers.ts | 2 +- .../subtypingWithObjectMembers2.ts | 4 +- .../subtypingWithObjectMembers3.ts | 4 +- .../subtypingWithObjectMembers5.ts | 4 +- ...ubtypingWithObjectMembersAccessibility2.ts | 4 +- .../subtypingWithObjectMembersOptionality.ts | 2 +- .../subtypingWithStringIndexer.ts | 2 +- .../subtypingWithStringIndexer2.ts | 2 +- .../subtypingWithStringIndexer3.ts | 2 +- .../subtypingWithStringIndexer4.ts | 2 +- .../undefinedIsSubtypeOfEverything.ts | 4 +- ...nSubtypeIfEveryConstituentTypeIsSubtype.ts | 4 +- ...OverloadedMethodWithOverloadedArguments.ts | 12 +- ...nericCallWithGenericSignatureArguments2.ts | 4 +- ...WithOverloadedConstructorTypedArguments.ts | 4 +- ...ithOverloadedConstructorTypedArguments2.ts | 4 +- ...allWithOverloadedFunctionTypedArguments.ts | 4 +- ...llWithOverloadedFunctionTypedArguments2.ts | 4 +- ...icClassWithFunctionTypedMemberArguments.ts | 4 +- ...icClassWithObjectTypeArgsAndConstraints.ts | 4 +- .../conformance/types/witness/witness.ts | 2 +- tests/cases/fourslash/formatWithBaseIndent.ts | 10 +- .../test1.ts | 2 +- .../cases/projects/PrologueEmit/__extends.ts | 2 +- .../projects/Quote'InName/li'b/class'A.ts | 2 +- .../declarations_ExportNamespace/useModule.ts | 2 +- tests/cases/projects/ext-int-ext/internal.ts | 2 +- tests/cases/projects/ext-int-ext/internal2.ts | 2 +- tests/cases/projects/moduleMergeOrder/a.ts | 2 +- tests/cases/projects/moduleMergeOrder/b.ts | 2 +- .../privacyCheck-ImportInParent/test.ts | 4 +- .../privacyCheck-InsideModule/test.ts | 2 +- .../privacyCheck-InsideModule/testGlo.ts | 2 +- .../cases/projects/reference-1/lib/classA.ts | 2 +- .../cases/projects/reference-1/lib/classB.ts | 2 +- .../projects/reference-path-static/lib.ts | 2 +- 891 files changed, 1682 insertions(+), 1682 deletions(-) diff --git a/tests/baselines/reference/commentEmitAtEndOfFile1.js b/tests/baselines/reference/commentEmitAtEndOfFile1.js index 4dc51aac2b0..b5886883da8 100644 --- a/tests/baselines/reference/commentEmitAtEndOfFile1.js +++ b/tests/baselines/reference/commentEmitAtEndOfFile1.js @@ -4,11 +4,11 @@ // test var f = '' // test #2 -module foo { +namespace foo { function bar() { } } // test #3 -module empty { +namespace empty { } // test #4 diff --git a/tests/baselines/reference/commentEmitAtEndOfFile1.symbols b/tests/baselines/reference/commentEmitAtEndOfFile1.symbols index 39f497c42fc..e5e7cb33706 100644 --- a/tests/baselines/reference/commentEmitAtEndOfFile1.symbols +++ b/tests/baselines/reference/commentEmitAtEndOfFile1.symbols @@ -6,14 +6,14 @@ var f = '' >f : Symbol(f, Decl(commentEmitAtEndOfFile1.ts, 1, 3)) // test #2 -module foo { +namespace foo { >foo : Symbol(foo, Decl(commentEmitAtEndOfFile1.ts, 1, 10)) function bar() { } ->bar : Symbol(bar, Decl(commentEmitAtEndOfFile1.ts, 3, 12)) +>bar : Symbol(bar, Decl(commentEmitAtEndOfFile1.ts, 3, 15)) } // test #3 -module empty { +namespace empty { >empty : Symbol(empty, Decl(commentEmitAtEndOfFile1.ts, 5, 1)) } // test #4 diff --git a/tests/baselines/reference/commentEmitAtEndOfFile1.types b/tests/baselines/reference/commentEmitAtEndOfFile1.types index 8c8daa19594..baffb18fd0c 100644 --- a/tests/baselines/reference/commentEmitAtEndOfFile1.types +++ b/tests/baselines/reference/commentEmitAtEndOfFile1.types @@ -9,7 +9,7 @@ var f = '' > : ^^ // test #2 -module foo { +namespace foo { >foo : typeof foo > : ^^^^^^^^^^ @@ -18,6 +18,6 @@ module foo { > : ^^^^^^^^^^ } // test #3 -module empty { +namespace empty { } // test #4 diff --git a/tests/cases/compiler/FunctionDeclaration7.ts b/tests/cases/compiler/FunctionDeclaration7.ts index 4a47c5e6736..3684110c82c 100644 --- a/tests/cases/compiler/FunctionDeclaration7.ts +++ b/tests/cases/compiler/FunctionDeclaration7.ts @@ -1,3 +1,3 @@ -module M { +namespace M { function foo(); } \ No newline at end of file diff --git a/tests/cases/compiler/acceptableAlias1.ts b/tests/cases/compiler/acceptableAlias1.ts index e954fd8d4fe..585194297ba 100644 --- a/tests/cases/compiler/acceptableAlias1.ts +++ b/tests/cases/compiler/acceptableAlias1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export module N { } export import X = N; diff --git a/tests/cases/compiler/aliasBug.ts b/tests/cases/compiler/aliasBug.ts index 44de6c796c2..08505b6ac4e 100644 --- a/tests/cases/compiler/aliasBug.ts +++ b/tests/cases/compiler/aliasBug.ts @@ -1,6 +1,6 @@ // @module: commonjs -module foo { +namespace foo { export class Provide { } diff --git a/tests/cases/compiler/aliasErrors.ts b/tests/cases/compiler/aliasErrors.ts index f9259c32ca5..df39970b84c 100644 --- a/tests/cases/compiler/aliasErrors.ts +++ b/tests/cases/compiler/aliasErrors.ts @@ -1,4 +1,4 @@ -module foo { +namespace foo { export class Provide { } export module bar { export module baz {export class boo {}}} diff --git a/tests/cases/compiler/aliasInaccessibleModule.ts b/tests/cases/compiler/aliasInaccessibleModule.ts index 91f36d9d118..4093bafadd7 100644 --- a/tests/cases/compiler/aliasInaccessibleModule.ts +++ b/tests/cases/compiler/aliasInaccessibleModule.ts @@ -1,6 +1,6 @@ // @declaration: true -module M { - module N { +namespace M { + namespace N { } export import X = N; } \ No newline at end of file diff --git a/tests/cases/compiler/aliasInaccessibleModule2.ts b/tests/cases/compiler/aliasInaccessibleModule2.ts index d970db79538..d6dcd2056e0 100644 --- a/tests/cases/compiler/aliasInaccessibleModule2.ts +++ b/tests/cases/compiler/aliasInaccessibleModule2.ts @@ -1,6 +1,6 @@ // @declaration: true -module M { - module N { +namespace M { + namespace N { class C { } diff --git a/tests/cases/compiler/aliasesInSystemModule1.ts b/tests/cases/compiler/aliasesInSystemModule1.ts index 33d205e5a07..b6cffde0480 100644 --- a/tests/cases/compiler/aliasesInSystemModule1.ts +++ b/tests/cases/compiler/aliasesInSystemModule1.ts @@ -9,7 +9,7 @@ let x = new alias.Class(); let y = new cls(); let z = new cls2(); -module M { +namespace M { export import cls = alias.Class; let x = new alias.Class(); let y = new cls(); diff --git a/tests/cases/compiler/aliasesInSystemModule2.ts b/tests/cases/compiler/aliasesInSystemModule2.ts index 3daa7e5a7bd..a5791451be2 100644 --- a/tests/cases/compiler/aliasesInSystemModule2.ts +++ b/tests/cases/compiler/aliasesInSystemModule2.ts @@ -9,7 +9,7 @@ let x = new alias.Class(); let y = new cls(); let z = new cls2(); -module M { +namespace M { export import cls = alias.Class; let x = new alias.Class(); let y = new cls(); diff --git a/tests/cases/compiler/alwaysStrictModule.ts b/tests/cases/compiler/alwaysStrictModule.ts index b706f5869a6..7843c5e1e05 100644 --- a/tests/cases/compiler/alwaysStrictModule.ts +++ b/tests/cases/compiler/alwaysStrictModule.ts @@ -1,7 +1,7 @@ // @module: commonjs // @alwaysStrict: true -module M { +namespace M { export function f() { var arguments = []; } diff --git a/tests/cases/compiler/alwaysStrictModule2.ts b/tests/cases/compiler/alwaysStrictModule2.ts index 6afecb0e770..86eb81b990e 100644 --- a/tests/cases/compiler/alwaysStrictModule2.ts +++ b/tests/cases/compiler/alwaysStrictModule2.ts @@ -2,14 +2,14 @@ // @outFile: out.js // @fileName: a.ts -module M { +namespace M { export function f() { var arguments = []; } } // @fileName: b.ts -module M { +namespace M { export function f2() { var arguments = []; } diff --git a/tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts b/tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts index d3173df8ab5..8d8696b5d29 100644 --- a/tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts +++ b/tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts @@ -2,7 +2,7 @@ // @alwaysStrict: true // @noImplicitUseStrict: true -module M { +namespace M { export function f() { var arguments = []; } diff --git a/tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts b/tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts index 39a0cb96977..a9278c3b813 100644 --- a/tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts +++ b/tests/cases/compiler/ambientExternalModuleWithInternalImportDeclaration.ts @@ -1,7 +1,7 @@ //@module: amd // @Filename: ambientExternalModuleWithInternalImportDeclaration_0.ts declare module 'M' { - module C { + namespace C { export var f: number; } class C { diff --git a/tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts b/tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts index 2738eea536e..c4b764a411b 100644 --- a/tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts +++ b/tests/cases/compiler/ambientExternalModuleWithoutInternalImportDeclaration.ts @@ -1,7 +1,7 @@ //@module: amd // @Filename: ambientExternalModuleWithoutInternalImportDeclaration_0.ts declare module 'M' { - module C { + namespace C { export var f: number; } class C { diff --git a/tests/cases/compiler/anonterface.ts b/tests/cases/compiler/anonterface.ts index f8c0727d813..175b5624210 100644 --- a/tests/cases/compiler/anonterface.ts +++ b/tests/cases/compiler/anonterface.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C { m(fn:{ (n:number):string; },n2:number):string { return fn(n2); diff --git a/tests/cases/compiler/anyDeclare.ts b/tests/cases/compiler/anyDeclare.ts index 5c3146ac798..bf125cec290 100644 --- a/tests/cases/compiler/anyDeclare.ts +++ b/tests/cases/compiler/anyDeclare.ts @@ -1,5 +1,5 @@ declare var x: any; -module myMod { +namespace myMod { var myFn; function myFn() { } } diff --git a/tests/cases/compiler/arrayAssignmentTest5.ts b/tests/cases/compiler/arrayAssignmentTest5.ts index 4309839875f..1310c20f16f 100644 --- a/tests/cases/compiler/arrayAssignmentTest5.ts +++ b/tests/cases/compiler/arrayAssignmentTest5.ts @@ -1,4 +1,4 @@ -module Test { +namespace Test { interface IState { } interface IToken { diff --git a/tests/cases/compiler/arrayAssignmentTest6.ts b/tests/cases/compiler/arrayAssignmentTest6.ts index c459faa1cf8..8d2edd17583 100644 --- a/tests/cases/compiler/arrayAssignmentTest6.ts +++ b/tests/cases/compiler/arrayAssignmentTest6.ts @@ -1,4 +1,4 @@ -module Test { +namespace Test { interface IState { } interface IToken { diff --git a/tests/cases/compiler/arrayBestCommonTypes.ts b/tests/cases/compiler/arrayBestCommonTypes.ts index c7466b5181e..f94d4f0c484 100644 --- a/tests/cases/compiler/arrayBestCommonTypes.ts +++ b/tests/cases/compiler/arrayBestCommonTypes.ts @@ -1,4 +1,4 @@ -module EmptyTypes { +namespace EmptyTypes { interface iface { } class base implements iface { } class base2 implements iface { } @@ -51,7 +51,7 @@ } } -module NonEmptyTypes { +namespace NonEmptyTypes { interface iface { x: string; } class base implements iface { x: string; y: string; } class base2 implements iface { x: string; z: string; } diff --git a/tests/cases/compiler/arrowFunctionInExpressionStatement2.ts b/tests/cases/compiler/arrowFunctionInExpressionStatement2.ts index 997fcaa9578..5cf8dfb3c09 100644 --- a/tests/cases/compiler/arrowFunctionInExpressionStatement2.ts +++ b/tests/cases/compiler/arrowFunctionInExpressionStatement2.ts @@ -1,3 +1,3 @@ -module M { +namespace M { () => 0; } \ No newline at end of file diff --git a/tests/cases/compiler/arrowFunctionsMissingTokens.ts b/tests/cases/compiler/arrowFunctionsMissingTokens.ts index bd3e25d56b4..13b17343c67 100644 --- a/tests/cases/compiler/arrowFunctionsMissingTokens.ts +++ b/tests/cases/compiler/arrowFunctionsMissingTokens.ts @@ -1,5 +1,5 @@ -module missingArrowsWithCurly { +namespace missingArrowsWithCurly { var a = () { }; var b = (): void { } @@ -11,8 +11,8 @@ module missingArrowsWithCurly { var e = (x: number, y: string): void { }; } -module missingCurliesWithArrow { - module withStatement { +namespace missingCurliesWithArrow { + namespace withStatement { var a = () => var k = 10;}; var b = (): void => var k = 10;} @@ -26,7 +26,7 @@ module missingCurliesWithArrow { var f = () => var k = 10;} } - module withoutStatement { + namespace withoutStatement { var a = () => }; var b = (): void => } @@ -41,7 +41,7 @@ module missingCurliesWithArrow { } } -module ce_nEst_pas_une_arrow_function { +namespace ce_nEst_pas_une_arrow_function { var a = (); var b = (): void; @@ -53,7 +53,7 @@ module ce_nEst_pas_une_arrow_function { var e = (x: number, y: string): void; } -module okay { +namespace okay { var a = () => { }; var b = (): void => { } diff --git a/tests/cases/compiler/assign1.ts b/tests/cases/compiler/assign1.ts index 78f03f25aa2..fd7171bbf4f 100644 --- a/tests/cases/compiler/assign1.ts +++ b/tests/cases/compiler/assign1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { interface I { salt:number; pepper:number; diff --git a/tests/cases/compiler/assignToExistingClass.ts b/tests/cases/compiler/assignToExistingClass.ts index fb155261349..737ea21fb40 100644 --- a/tests/cases/compiler/assignToExistingClass.ts +++ b/tests/cases/compiler/assignToExistingClass.ts @@ -1,4 +1,4 @@ -module Test { +namespace Test { class Mocked { myProp: string; } diff --git a/tests/cases/compiler/assignToFn.ts b/tests/cases/compiler/assignToFn.ts index 5163fc1360d..fca62272854 100644 --- a/tests/cases/compiler/assignToFn.ts +++ b/tests/cases/compiler/assignToFn.ts @@ -1,4 +1,4 @@ -module M { +namespace M { interface I { f(n:number):boolean; } diff --git a/tests/cases/compiler/assignToModule.ts b/tests/cases/compiler/assignToModule.ts index cf42d5627e8..67f6733105e 100644 --- a/tests/cases/compiler/assignToModule.ts +++ b/tests/cases/compiler/assignToModule.ts @@ -1,2 +1,2 @@ -module A {} +namespace A {} A = undefined; // invalid LHS \ No newline at end of file diff --git a/tests/cases/compiler/assignmentCompatability1.ts b/tests/cases/compiler/assignmentCompatability1.ts index 829b560f881..0529c35757d 100644 --- a/tests/cases/compiler/assignmentCompatability1.ts +++ b/tests/cases/compiler/assignmentCompatability1.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa = {};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability10.ts b/tests/cases/compiler/assignmentCompatability10.ts index 1e69e5459ed..ecef1f982e9 100644 --- a/tests/cases/compiler/assignmentCompatability10.ts +++ b/tests/cases/compiler/assignmentCompatability10.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPublicAndOptional { constructor(public one: T, public two?: U) {} } var x4 = new classWithPublicAndOptional(1);; export var __val__x4 = x4; } diff --git a/tests/cases/compiler/assignmentCompatability11.ts b/tests/cases/compiler/assignmentCompatability11.ts index ca40ca24cdb..472798ec94d 100644 --- a/tests/cases/compiler/assignmentCompatability11.ts +++ b/tests/cases/compiler/assignmentCompatability11.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: 1}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability12.ts b/tests/cases/compiler/assignmentCompatability12.ts index 66621b3a620..2ba2dbb3a90 100644 --- a/tests/cases/compiler/assignmentCompatability12.ts +++ b/tests/cases/compiler/assignmentCompatability12.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: "1"}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability13.ts b/tests/cases/compiler/assignmentCompatability13.ts index 510bd1a1c65..679a881c906 100644 --- a/tests/cases/compiler/assignmentCompatability13.ts +++ b/tests/cases/compiler/assignmentCompatability13.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: "1"}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability14.ts b/tests/cases/compiler/assignmentCompatability14.ts index 0aabd9c28fe..b2f31e1afaa 100644 --- a/tests/cases/compiler/assignmentCompatability14.ts +++ b/tests/cases/compiler/assignmentCompatability14.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: true}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability15.ts b/tests/cases/compiler/assignmentCompatability15.ts index a11f3cce7d6..61e53a4f6ee 100644 --- a/tests/cases/compiler/assignmentCompatability15.ts +++ b/tests/cases/compiler/assignmentCompatability15.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: true}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability16.ts b/tests/cases/compiler/assignmentCompatability16.ts index a780447fc35..c963489ab69 100644 --- a/tests/cases/compiler/assignmentCompatability16.ts +++ b/tests/cases/compiler/assignmentCompatability16.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: [1]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability17.ts b/tests/cases/compiler/assignmentCompatability17.ts index 4c3606c6635..554dbe3a56c 100644 --- a/tests/cases/compiler/assignmentCompatability17.ts +++ b/tests/cases/compiler/assignmentCompatability17.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: [1]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability18.ts b/tests/cases/compiler/assignmentCompatability18.ts index c4e9f1b05eb..c4bc8260dc6 100644 --- a/tests/cases/compiler/assignmentCompatability18.ts +++ b/tests/cases/compiler/assignmentCompatability18.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: [1]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability19.ts b/tests/cases/compiler/assignmentCompatability19.ts index a120eb1ea90..57fe1e2b5e0 100644 --- a/tests/cases/compiler/assignmentCompatability19.ts +++ b/tests/cases/compiler/assignmentCompatability19.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: [1]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability2.ts b/tests/cases/compiler/assignmentCompatability2.ts index 0ea518687c8..fad21a4c4ce 100644 --- a/tests/cases/compiler/assignmentCompatability2.ts +++ b/tests/cases/compiler/assignmentCompatability2.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability20.ts b/tests/cases/compiler/assignmentCompatability20.ts index d5f4ac433eb..855b1a44428 100644 --- a/tests/cases/compiler/assignmentCompatability20.ts +++ b/tests/cases/compiler/assignmentCompatability20.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: ["1"]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability21.ts b/tests/cases/compiler/assignmentCompatability21.ts index feb77e65431..90dc7dabbf5 100644 --- a/tests/cases/compiler/assignmentCompatability21.ts +++ b/tests/cases/compiler/assignmentCompatability21.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: ["1"]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability22.ts b/tests/cases/compiler/assignmentCompatability22.ts index 2aa8c0fb7fc..e263e0ca235 100644 --- a/tests/cases/compiler/assignmentCompatability22.ts +++ b/tests/cases/compiler/assignmentCompatability22.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: [true]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability23.ts b/tests/cases/compiler/assignmentCompatability23.ts index 97409978032..2be1ccd2d7d 100644 --- a/tests/cases/compiler/assignmentCompatability23.ts +++ b/tests/cases/compiler/assignmentCompatability23.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: [true]}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability24.ts b/tests/cases/compiler/assignmentCompatability24.ts index 75d977b4081..3232516c78a 100644 --- a/tests/cases/compiler/assignmentCompatability24.ts +++ b/tests/cases/compiler/assignmentCompatability24.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = function f(a: Tstring) { return a; };; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability25.ts b/tests/cases/compiler/assignmentCompatability25.ts index 9e853351146..d805e631561 100644 --- a/tests/cases/compiler/assignmentCompatability25.ts +++ b/tests/cases/compiler/assignmentCompatability25.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{two:number;};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability26.ts b/tests/cases/compiler/assignmentCompatability26.ts index 78eb6c0d5f8..e137f5d1ac6 100644 --- a/tests/cases/compiler/assignmentCompatability26.ts +++ b/tests/cases/compiler/assignmentCompatability26.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:string;};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability27.ts b/tests/cases/compiler/assignmentCompatability27.ts index d0cef613ac5..857cf5f0882 100644 --- a/tests/cases/compiler/assignmentCompatability27.ts +++ b/tests/cases/compiler/assignmentCompatability27.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{two:string;};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability28.ts b/tests/cases/compiler/assignmentCompatability28.ts index 73a6b784e59..86c932399ff 100644 --- a/tests/cases/compiler/assignmentCompatability28.ts +++ b/tests/cases/compiler/assignmentCompatability28.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:boolean;};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability29.ts b/tests/cases/compiler/assignmentCompatability29.ts index 2c8fb3e25f3..ecc9d4e0e63 100644 --- a/tests/cases/compiler/assignmentCompatability29.ts +++ b/tests/cases/compiler/assignmentCompatability29.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:any[];};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability3.ts b/tests/cases/compiler/assignmentCompatability3.ts index 0b9c3838dc5..540095f7078 100644 --- a/tests/cases/compiler/assignmentCompatability3.ts +++ b/tests/cases/compiler/assignmentCompatability3.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: 1}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability30.ts b/tests/cases/compiler/assignmentCompatability30.ts index 13a25b7141c..9268ae7a55c 100644 --- a/tests/cases/compiler/assignmentCompatability30.ts +++ b/tests/cases/compiler/assignmentCompatability30.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:number[];};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability31.ts b/tests/cases/compiler/assignmentCompatability31.ts index 36cf4e53a6d..90323e6e925 100644 --- a/tests/cases/compiler/assignmentCompatability31.ts +++ b/tests/cases/compiler/assignmentCompatability31.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:string[];};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability32.ts b/tests/cases/compiler/assignmentCompatability32.ts index 9d024217e4f..9de6cc70112 100644 --- a/tests/cases/compiler/assignmentCompatability32.ts +++ b/tests/cases/compiler/assignmentCompatability32.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:boolean[];};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability33.ts b/tests/cases/compiler/assignmentCompatability33.ts index 12f28fbed60..6688ba7ace6 100644 --- a/tests/cases/compiler/assignmentCompatability33.ts +++ b/tests/cases/compiler/assignmentCompatability33.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj: { (a: Tstring): Tstring; }; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability34.ts b/tests/cases/compiler/assignmentCompatability34.ts index 32aa07e9949..34481a64e81 100644 --- a/tests/cases/compiler/assignmentCompatability34.ts +++ b/tests/cases/compiler/assignmentCompatability34.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj: { (a:Tnumber):Tnumber;}; export var __val__obj = obj; } diff --git a/tests/cases/compiler/assignmentCompatability35.ts b/tests/cases/compiler/assignmentCompatability35.ts index b3eeebc85cd..384fefe3832 100644 --- a/tests/cases/compiler/assignmentCompatability35.ts +++ b/tests/cases/compiler/assignmentCompatability35.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{[index:number]:number;};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability36.ts b/tests/cases/compiler/assignmentCompatability36.ts index 66bfbe1fe96..b534cef694c 100644 --- a/tests/cases/compiler/assignmentCompatability36.ts +++ b/tests/cases/compiler/assignmentCompatability36.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{[index:string]:any;};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability37.ts b/tests/cases/compiler/assignmentCompatability37.ts index 23cfabb1d03..8e15f53297f 100644 --- a/tests/cases/compiler/assignmentCompatability37.ts +++ b/tests/cases/compiler/assignmentCompatability37.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{ new (param: Tnumber); };; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability38.ts b/tests/cases/compiler/assignmentCompatability38.ts index c7fc9970e0d..8a95ffebde0 100644 --- a/tests/cases/compiler/assignmentCompatability38.ts +++ b/tests/cases/compiler/assignmentCompatability38.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{ new (param: Tstring); };; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability39.ts b/tests/cases/compiler/assignmentCompatability39.ts index b73eeba5059..070872dfa15 100644 --- a/tests/cases/compiler/assignmentCompatability39.ts +++ b/tests/cases/compiler/assignmentCompatability39.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithTwoPublic { constructor(public one: T, public two: U) {} } var x2 = new classWithTwoPublic(1, "a");; export var __val__x2 = x2; } diff --git a/tests/cases/compiler/assignmentCompatability4.ts b/tests/cases/compiler/assignmentCompatability4.ts index 17b341be3c7..258491b79e0 100644 --- a/tests/cases/compiler/assignmentCompatability4.ts +++ b/tests/cases/compiler/assignmentCompatability4.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:number;};; export var __val__aa = aa; } diff --git a/tests/cases/compiler/assignmentCompatability40.ts b/tests/cases/compiler/assignmentCompatability40.ts index 46105c9e1f0..4d3a72e202f 100644 --- a/tests/cases/compiler/assignmentCompatability40.ts +++ b/tests/cases/compiler/assignmentCompatability40.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPrivate { constructor(private one: T) {} } var x5 = new classWithPrivate(1);; export var __val__x5 = x5; } diff --git a/tests/cases/compiler/assignmentCompatability41.ts b/tests/cases/compiler/assignmentCompatability41.ts index 3dd1d8d9d05..8fa8c52bb1d 100644 --- a/tests/cases/compiler/assignmentCompatability41.ts +++ b/tests/cases/compiler/assignmentCompatability41.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithTwoPrivate { constructor(private one: T, private two: U) {} } var x6 = new classWithTwoPrivate(1, "a");; export var __val__x6 = x6; } diff --git a/tests/cases/compiler/assignmentCompatability42.ts b/tests/cases/compiler/assignmentCompatability42.ts index b59c1983bf1..b86550c4739 100644 --- a/tests/cases/compiler/assignmentCompatability42.ts +++ b/tests/cases/compiler/assignmentCompatability42.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPublicPrivate { constructor(public one: T, private two: U) {} } var x7 = new classWithPublicPrivate(1, "a");; export var __val__x7 = x7; } diff --git a/tests/cases/compiler/assignmentCompatability43.ts b/tests/cases/compiler/assignmentCompatability43.ts index fee32f8ece5..c5208137038 100644 --- a/tests/cases/compiler/assignmentCompatability43.ts +++ b/tests/cases/compiler/assignmentCompatability43.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceTwo { one: T; two: U; }; var obj2: interfaceTwo = { one: 1, two: "a" };; export var __val__obj2 = obj2; } diff --git a/tests/cases/compiler/assignmentCompatability5.ts b/tests/cases/compiler/assignmentCompatability5.ts index 486a47bb9df..6f7ff3ff881 100644 --- a/tests/cases/compiler/assignmentCompatability5.ts +++ b/tests/cases/compiler/assignmentCompatability5.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceOne { one: T; }; var obj1: interfaceOne = { one: 1 };; export var __val__obj1 = obj1; } diff --git a/tests/cases/compiler/assignmentCompatability6.ts b/tests/cases/compiler/assignmentCompatability6.ts index ae8a67ef15d..c95cff1163a 100644 --- a/tests/cases/compiler/assignmentCompatability6.ts +++ b/tests/cases/compiler/assignmentCompatability6.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceWithOptional { one?: T; }; var obj3: interfaceWithOptional = { };; export var __val__obj3 = obj3; } diff --git a/tests/cases/compiler/assignmentCompatability7.ts b/tests/cases/compiler/assignmentCompatability7.ts index 87e56df1bf0..8d4de79461f 100644 --- a/tests/cases/compiler/assignmentCompatability7.ts +++ b/tests/cases/compiler/assignmentCompatability7.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } diff --git a/tests/cases/compiler/assignmentCompatability8.ts b/tests/cases/compiler/assignmentCompatability8.ts index 9cdb47d51c3..e74e323f8cd 100644 --- a/tests/cases/compiler/assignmentCompatability8.ts +++ b/tests/cases/compiler/assignmentCompatability8.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPublic { constructor(public one: T) {} } var x1 = new classWithPublic(1);; export var __val__x1 = x1; } diff --git a/tests/cases/compiler/assignmentCompatability9.ts b/tests/cases/compiler/assignmentCompatability9.ts index 61f3d07ae3b..f0fa2b620c8 100644 --- a/tests/cases/compiler/assignmentCompatability9.ts +++ b/tests/cases/compiler/assignmentCompatability9.ts @@ -1,8 +1,8 @@ -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithOptional { constructor(public one?: T) {} } var x3 = new classWithOptional();; export var __val__x3 = x3; } diff --git a/tests/cases/compiler/assignmentToFunction.ts b/tests/cases/compiler/assignmentToFunction.ts index 38205a1b048..dc94721be0b 100644 --- a/tests/cases/compiler/assignmentToFunction.ts +++ b/tests/cases/compiler/assignmentToFunction.ts @@ -1,7 +1,7 @@ function fn() { } fn = () => 3; -module foo { +namespace foo { function xyz() { function bar() { } diff --git a/tests/cases/compiler/assignmentToObjectAndFunction.ts b/tests/cases/compiler/assignmentToObjectAndFunction.ts index 2d4c7591353..4e53cfabc6c 100644 --- a/tests/cases/compiler/assignmentToObjectAndFunction.ts +++ b/tests/cases/compiler/assignmentToObjectAndFunction.ts @@ -8,21 +8,21 @@ var goodObj: Object = { var errFun: Function = {}; // Error for no call signature function foo() { } -module foo { +namespace foo { export var boom = 0; } var goodFundule: Function = foo; // ok function bar() { } -module bar { +namespace bar { export function apply(thisArg: string, argArray?: string) { } } var goodFundule2: Function = bar; // ok function bad() { } -module bad { +namespace bad { export var apply = 0; } diff --git a/tests/cases/compiler/assignmentToReferenceTypes.ts b/tests/cases/compiler/assignmentToReferenceTypes.ts index 97997854026..876039a28fb 100644 --- a/tests/cases/compiler/assignmentToReferenceTypes.ts +++ b/tests/cases/compiler/assignmentToReferenceTypes.ts @@ -1,6 +1,6 @@ // Should all be allowed -module M { +namespace M { } M = null; diff --git a/tests/cases/compiler/augmentedTypesClass3.ts b/tests/cases/compiler/augmentedTypesClass3.ts index 65a1cec6bdd..a575d3dca86 100644 --- a/tests/cases/compiler/augmentedTypesClass3.ts +++ b/tests/cases/compiler/augmentedTypesClass3.ts @@ -1,12 +1,12 @@ // class then module class c5 { public foo() { } } -module c5 { } // should be ok +namespace c5 { } // should be ok class c5a { public foo() { } } -module c5a { var y = 2; } // should be ok +namespace c5a { var y = 2; } // should be ok class c5b { public foo() { } } -module c5b { export var y = 2; } // should be ok +namespace c5b { export var y = 2; } // should be ok //// class then import class c5c { public foo() { } } diff --git a/tests/cases/compiler/augmentedTypesEnum.ts b/tests/cases/compiler/augmentedTypesEnum.ts index 2efcde826ce..88c72456a9f 100644 --- a/tests/cases/compiler/augmentedTypesEnum.ts +++ b/tests/cases/compiler/augmentedTypesEnum.ts @@ -22,13 +22,13 @@ enum e5a { One } // error // enum then internal module enum e6 { One } -module e6 { } // ok +namespace e6 { } // ok enum e6a { One } -module e6a { var y = 2; } // should be error +namespace e6a { var y = 2; } // should be error enum e6b { One } -module e6b { export var y = 2; } // should be error +namespace e6b { export var y = 2; } // should be error // enum then import, messes with error reporting //enum e7 { One } diff --git a/tests/cases/compiler/augmentedTypesEnum3.ts b/tests/cases/compiler/augmentedTypesEnum3.ts index 848535ef39b..7e839d5dc46 100644 --- a/tests/cases/compiler/augmentedTypesEnum3.ts +++ b/tests/cases/compiler/augmentedTypesEnum3.ts @@ -1,12 +1,12 @@ -module E { +namespace E { var t; } enum E { } enum F { } -module F { var t; } +namespace F { var t; } -module A { +namespace A { var o; } enum A { @@ -15,6 +15,6 @@ enum A { enum A { c } -module A { +namespace A { var p; } \ No newline at end of file diff --git a/tests/cases/compiler/augmentedTypesExternalModule1.ts b/tests/cases/compiler/augmentedTypesExternalModule1.ts index fc30a186f17..f7876453fa1 100644 --- a/tests/cases/compiler/augmentedTypesExternalModule1.ts +++ b/tests/cases/compiler/augmentedTypesExternalModule1.ts @@ -1,4 +1,4 @@ //@module: amd export var a = 1; class c5 { public foo() { } } -module c5 { } // should be ok everywhere \ No newline at end of file +namespace c5 { } // should be ok everywhere \ No newline at end of file diff --git a/tests/cases/compiler/augmentedTypesFunction.ts b/tests/cases/compiler/augmentedTypesFunction.ts index ab6627f9463..660572d4380 100644 --- a/tests/cases/compiler/augmentedTypesFunction.ts +++ b/tests/cases/compiler/augmentedTypesFunction.ts @@ -22,16 +22,16 @@ enum y4 { One } // error // function then internal module function y5() { } -module y5 { } // ok since module is not instantiated +namespace y5 { } // ok since module is not instantiated function y5a() { } -module y5a { var y = 2; } // should be an error +namespace y5a { var y = 2; } // should be an error function y5b() { } -module y5b { export var y = 3; } // should be an error +namespace y5b { export var y = 3; } // should be an error function y5c() { } -module y5c { export interface I { foo(): void } } // should be an error +namespace y5c { export interface I { foo(): void } } // should be an error // function then import, messes with other errors //function y6() { } diff --git a/tests/cases/compiler/augmentedTypesModules.ts b/tests/cases/compiler/augmentedTypesModules.ts index 84f03549a42..a902f32ea18 100644 --- a/tests/cases/compiler/augmentedTypesModules.ts +++ b/tests/cases/compiler/augmentedTypesModules.ts @@ -1,96 +1,96 @@ // module then var -module m1 { } +namespace m1 { } var m1 = 1; // Should be allowed -module m1a { var y = 2; } // error +namespace m1a { var y = 2; } // error var m1a = 1; // error -module m1b { export var y = 2; } // error +namespace m1b { export var y = 2; } // error var m1b = 1; // error -module m1c { +namespace m1c { export interface I { foo(): void; } } var m1c = 1; // Should be allowed -module m1d { // error +namespace m1d { // error export class I { foo() { } } } var m1d = 1; // error // module then function -module m2 { } +namespace m2 { } function m2() { }; // ok since the module is not instantiated -module m2a { var y = 2; } +namespace m2a { var y = 2; } function m2a() { }; // error since the module is instantiated -module m2b { export var y = 2; } +namespace m2b { export var y = 2; } function m2b() { }; // error since the module is instantiated // should be errors to have function first function m2c() { }; -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } -module m2d { } +namespace m2d { } declare function m2d(): void; declare function m2e(): void; -module m2e { } +namespace m2e { } function m2f() { }; -module m2f { export interface I { foo(): void } } +namespace m2f { export interface I { foo(): void } } function m2g() { }; -module m2g { export class C { foo() { } } } +namespace m2g { export class C { foo() { } } } // module then class -module m3 { } +namespace m3 { } class m3 { } // ok since the module is not instantiated -module m3a { var y = 2; } +namespace m3a { var y = 2; } class m3a { foo() { } } // error, class isn't ambient or declared before the module class m3b { foo() { } } -module m3b { var y = 2; } +namespace m3b { var y = 2; } class m3c { foo() { } } -module m3c { export var y = 2; } +namespace m3c { export var y = 2; } declare class m3d { foo(): void } -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } -module m3e { export var y = 2; } +namespace m3e { export var y = 2; } declare class m3e { foo(): void } declare class m3f { foo(): void } -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } declare class m3g { foo(): void } -module m3g { export class C { foo() { } } } +namespace m3g { export class C { foo() { } } } // module then enum // should be errors -module m4 { } +namespace m4 { } enum m4 { } -module m4a { var y = 2; } +namespace m4a { var y = 2; } enum m4a { One } -module m4b { export var y = 2; } +namespace m4b { export var y = 2; } enum m4b { One } -module m4c { interface I { foo(): void } } +namespace m4c { interface I { foo(): void } } enum m4c { One } -module m4d { class C { foo() { } } } +namespace m4d { class C { foo() { } } } enum m4d { One } //// module then module -module m5 { export var y = 2; } -module m5 { export interface I { foo(): void } } // should already be reasonably well covered +namespace m5 { export var y = 2; } +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered // module then import -module m6 { export var y = 2; } +namespace m6 { export var y = 2; } //import m6 = require(''); diff --git a/tests/cases/compiler/augmentedTypesModules2.ts b/tests/cases/compiler/augmentedTypesModules2.ts index daa4f04c167..f13bfcfec67 100644 --- a/tests/cases/compiler/augmentedTypesModules2.ts +++ b/tests/cases/compiler/augmentedTypesModules2.ts @@ -1,27 +1,27 @@ // module then function -module m2 { } +namespace m2 { } function m2() { }; // ok since the module is not instantiated -module m2a { var y = 2; } +namespace m2a { var y = 2; } function m2a() { }; // error since the module is instantiated -module m2b { export var y = 2; } +namespace m2b { export var y = 2; } function m2b() { }; // error since the module is instantiated function m2c() { }; -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } -module m2cc { export var y = 2; } +namespace m2cc { export var y = 2; } function m2cc() { }; // error to have module first -module m2d { } +namespace m2d { } declare function m2d(): void; declare function m2e(): void; -module m2e { } +namespace m2e { } function m2f() { }; -module m2f { export interface I { foo(): void } } +namespace m2f { export interface I { foo(): void } } function m2g() { }; -module m2g { export class C { foo() { } } } +namespace m2g { export class C { foo() { } } } diff --git a/tests/cases/compiler/augmentedTypesModules3.ts b/tests/cases/compiler/augmentedTypesModules3.ts index 62826d40d36..612d10551a4 100644 --- a/tests/cases/compiler/augmentedTypesModules3.ts +++ b/tests/cases/compiler/augmentedTypesModules3.ts @@ -1,6 +1,6 @@ //// module then class -module m3 { } +namespace m3 { } class m3 { } // ok since the module is not instantiated -module m3a { var y = 2; } +namespace m3a { var y = 2; } class m3a { foo() { } } // error, class isn't ambient or declared before the module \ No newline at end of file diff --git a/tests/cases/compiler/augmentedTypesModules3b.ts b/tests/cases/compiler/augmentedTypesModules3b.ts index 8761fbc30fd..382005df3cf 100644 --- a/tests/cases/compiler/augmentedTypesModules3b.ts +++ b/tests/cases/compiler/augmentedTypesModules3b.ts @@ -1,17 +1,17 @@ class m3b { foo() { } } -module m3b { var y = 2; } +namespace m3b { var y = 2; } class m3c { foo() { } } -module m3c { export var y = 2; } +namespace m3c { export var y = 2; } declare class m3d { foo(): void } -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } -module m3e { export var y = 2; } +namespace m3e { export var y = 2; } declare class m3e { foo(): void } declare class m3f { foo(): void } -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } declare class m3g { foo(): void } -module m3g { export class C { foo() { } } } +namespace m3g { export class C { foo() { } } } diff --git a/tests/cases/compiler/augmentedTypesModules4.ts b/tests/cases/compiler/augmentedTypesModules4.ts index 2ebf92bb182..4a2051fa82c 100644 --- a/tests/cases/compiler/augmentedTypesModules4.ts +++ b/tests/cases/compiler/augmentedTypesModules4.ts @@ -1,21 +1,21 @@ // module then enum // should be errors -module m4 { } +namespace m4 { } enum m4 { } -module m4a { var y = 2; } +namespace m4a { var y = 2; } enum m4a { One } -module m4b { export var y = 2; } +namespace m4b { export var y = 2; } enum m4b { One } -module m4c { interface I { foo(): void } } +namespace m4c { interface I { foo(): void } } enum m4c { One } -module m4d { class C { foo() { } } } +namespace m4d { class C { foo() { } } } enum m4d { One } //// module then module -module m5 { export var y = 2; } -module m5 { export interface I { foo(): void } } // should already be reasonably well covered +namespace m5 { export var y = 2; } +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered diff --git a/tests/cases/compiler/augmentedTypesVar.ts b/tests/cases/compiler/augmentedTypesVar.ts index c7e40c8b0e7..35a2868caad 100644 --- a/tests/cases/compiler/augmentedTypesVar.ts +++ b/tests/cases/compiler/augmentedTypesVar.ts @@ -22,13 +22,13 @@ enum x5 { One } // error // var then module var x6 = 1; -module x6 { } // ok since non-instantiated +namespace x6 { } // ok since non-instantiated var x6a = 1; // error -module x6a { var y = 2; } // error since instantiated +namespace x6a { var y = 2; } // error since instantiated var x6b = 1; // error -module x6b { export var y = 2; } // error +namespace x6b { export var y = 2; } // error // var then import, messes with other error reporting //var x7 = 1; diff --git a/tests/cases/compiler/bind1.ts b/tests/cases/compiler/bind1.ts index 9d41c56bba8..96fa1df5007 100644 --- a/tests/cases/compiler/bind1.ts +++ b/tests/cases/compiler/bind1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C implements I {} // this should be an unresolved symbol I error } diff --git a/tests/cases/compiler/binopAssignmentShouldHaveType.ts b/tests/cases/compiler/binopAssignmentShouldHaveType.ts index 07ee7b7fa6b..9c4fc068f84 100644 --- a/tests/cases/compiler/binopAssignmentShouldHaveType.ts +++ b/tests/cases/compiler/binopAssignmentShouldHaveType.ts @@ -1,7 +1,7 @@ // @lib: es5 declare var console; "use strict"; -module Test { +namespace Test { export class Bug { getName():string { return "name"; diff --git a/tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts b/tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts index fed9cc82e5e..3cb995ad8ad 100644 --- a/tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts +++ b/tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts @@ -1,4 +1,4 @@ -module M +namespace M { class ClassA {} } diff --git a/tests/cases/compiler/checkForObjectTooStrict.ts b/tests/cases/compiler/checkForObjectTooStrict.ts index 76598aa34ed..915abd27c84 100644 --- a/tests/cases/compiler/checkForObjectTooStrict.ts +++ b/tests/cases/compiler/checkForObjectTooStrict.ts @@ -1,4 +1,4 @@ -module Foo { +namespace Foo { export class Object { diff --git a/tests/cases/compiler/circularModuleImports.ts b/tests/cases/compiler/circularModuleImports.ts index b251eab3335..af948e57f36 100644 --- a/tests/cases/compiler/circularModuleImports.ts +++ b/tests/cases/compiler/circularModuleImports.ts @@ -1,4 +1,4 @@ -module M +namespace M { diff --git a/tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts b/tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts index 7b03046304c..eeebe4c5fcb 100644 --- a/tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts +++ b/tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts @@ -1,11 +1,11 @@ -module M { +namespace M { export class N { } export module N { export var v = 0; } } -module M { +namespace M { export class O extends M.N { } } \ No newline at end of file diff --git a/tests/cases/compiler/classExtendingQualifiedName.ts b/tests/cases/compiler/classExtendingQualifiedName.ts index cac6c826360..9a4ca479871 100644 --- a/tests/cases/compiler/classExtendingQualifiedName.ts +++ b/tests/cases/compiler/classExtendingQualifiedName.ts @@ -1,4 +1,4 @@ -module M { +namespace M { class C { } diff --git a/tests/cases/compiler/classExtendingQualifiedName2.ts b/tests/cases/compiler/classExtendingQualifiedName2.ts index 2413f774a94..42ee548205e 100644 --- a/tests/cases/compiler/classExtendingQualifiedName2.ts +++ b/tests/cases/compiler/classExtendingQualifiedName2.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C { } diff --git a/tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts b/tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts index 337ac5f86ad..9189203b2a9 100644 --- a/tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts +++ b/tests/cases/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts @@ -1,11 +1,11 @@ class A { a: number; } -module A { +namespace A { export var v: string; } -module Foo { +namespace Foo { var A = 1; class B extends A { b: string; diff --git a/tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts b/tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts index 4a261fd2ad0..c4d5b1e6c54 100644 --- a/tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts +++ b/tests/cases/compiler/classExtendsClauseClassNotReferringConstructor.ts @@ -1,5 +1,5 @@ class A { a: number; } -module Foo { +namespace Foo { var A = 1; class B extends A { b: string; } } diff --git a/tests/cases/compiler/classExtendsInterfaceInModule.ts b/tests/cases/compiler/classExtendsInterfaceInModule.ts index 4ea24e5dd7d..c74ca58de24 100644 --- a/tests/cases/compiler/classExtendsInterfaceInModule.ts +++ b/tests/cases/compiler/classExtendsInterfaceInModule.ts @@ -1,11 +1,11 @@ -module M { +namespace M { export interface I1 {} export interface I2 {} } class C1 extends M.I1 {} class C2 extends M.I2 {} -module Mod { +namespace Mod { export namespace Nested { export interface I {} } diff --git a/tests/cases/compiler/classImplementsImportedInterface.ts b/tests/cases/compiler/classImplementsImportedInterface.ts index ae4cbffede5..88750e1dd3c 100644 --- a/tests/cases/compiler/classImplementsImportedInterface.ts +++ b/tests/cases/compiler/classImplementsImportedInterface.ts @@ -1,10 +1,10 @@ -module M1 { +namespace M1 { export interface I { foo(); } } -module M2 { +namespace M2 { import T = M1.I; class C implements T { foo() {} diff --git a/tests/cases/compiler/classTypeParametersInStatics.ts b/tests/cases/compiler/classTypeParametersInStatics.ts index e3a9ab6f93e..7401d67dd51 100644 --- a/tests/cases/compiler/classTypeParametersInStatics.ts +++ b/tests/cases/compiler/classTypeParametersInStatics.ts @@ -1,4 +1,4 @@ -module Editor { +namespace Editor { export class List { diff --git a/tests/cases/compiler/classdecl.ts b/tests/cases/compiler/classdecl.ts index 2b9a55a1f3e..3e5e247fcd9 100644 --- a/tests/cases/compiler/classdecl.ts +++ b/tests/cases/compiler/classdecl.ts @@ -38,7 +38,7 @@ class a { class b extends a { } -module m1 { +namespace m1 { export class b { } class d { @@ -49,7 +49,7 @@ module m1 { } } -module m2 { +namespace m2 { export module m3 { export class c extends b { diff --git a/tests/cases/compiler/clinterfaces.ts b/tests/cases/compiler/clinterfaces.ts index 6565bbd05e3..0829d4a2093 100644 --- a/tests/cases/compiler/clinterfaces.ts +++ b/tests/cases/compiler/clinterfaces.ts @@ -1,5 +1,5 @@ //@module: commonjs -module M { +namespace M { class C { } interface C { } interface D { } diff --git a/tests/cases/compiler/cloduleAcrossModuleDefinitions.ts b/tests/cases/compiler/cloduleAcrossModuleDefinitions.ts index aa0801b356c..cdb9367e8f4 100644 --- a/tests/cases/compiler/cloduleAcrossModuleDefinitions.ts +++ b/tests/cases/compiler/cloduleAcrossModuleDefinitions.ts @@ -1,11 +1,11 @@ -module A { +namespace A { export class B { foo() { } static bar() { } } } -module A { +namespace A { export module B { export var x = 1; } diff --git a/tests/cases/compiler/cloduleAndTypeParameters.ts b/tests/cases/compiler/cloduleAndTypeParameters.ts index bf4ec86a358..c7dd8003e19 100644 --- a/tests/cases/compiler/cloduleAndTypeParameters.ts +++ b/tests/cases/compiler/cloduleAndTypeParameters.ts @@ -3,7 +3,7 @@ class Foo { } } -module Foo { +namespace Foo { export interface Bar { bar(): void; } diff --git a/tests/cases/compiler/cloduleSplitAcrossFiles.ts b/tests/cases/compiler/cloduleSplitAcrossFiles.ts index 239b0d2022d..661b91050c7 100644 --- a/tests/cases/compiler/cloduleSplitAcrossFiles.ts +++ b/tests/cases/compiler/cloduleSplitAcrossFiles.ts @@ -2,7 +2,7 @@ class D { } // @Filename: cloduleSplitAcrossFiles_module.ts -module D { +namespace D { export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/cases/compiler/cloduleStaticMembers.ts b/tests/cases/compiler/cloduleStaticMembers.ts index 67b15d4d416..8bb7ba7eb70 100644 --- a/tests/cases/compiler/cloduleStaticMembers.ts +++ b/tests/cases/compiler/cloduleStaticMembers.ts @@ -2,7 +2,7 @@ class Clod { private static x = 10; public static y = 10; } -module Clod { +namespace Clod { var p = Clod.x; var q = x; diff --git a/tests/cases/compiler/cloduleTest1.ts b/tests/cases/compiler/cloduleTest1.ts index d5bc88b42de..e844b5b843e 100644 --- a/tests/cases/compiler/cloduleTest1.ts +++ b/tests/cases/compiler/cloduleTest1.ts @@ -2,7 +2,7 @@ interface $ { addClass(className: string): $; } - module $ { + namespace $ { export interface AjaxSettings { } export function ajax(options: AjaxSettings) { } diff --git a/tests/cases/compiler/cloduleTest2.ts b/tests/cases/compiler/cloduleTest2.ts index 98acfe3b8a8..0a4403ec30a 100644 --- a/tests/cases/compiler/cloduleTest2.ts +++ b/tests/cases/compiler/cloduleTest2.ts @@ -1,17 +1,17 @@ -module T1 { - module m3d { export var y = 2; } +namespace T1 { + namespace m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void ; static bar(); } var r = new m3d(); // error } -module T2 { +namespace T2 { declare class m3d { constructor(foo); foo(): void; static bar(); } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } var r = new m3d(); // error } -module T3 { - module m3d { export var y = 2; } +namespace T3 { + namespace m3d { export var y = 2; } declare class m3d { foo(): void; static bar(); } var r = new m3d(); r.foo(); @@ -19,16 +19,16 @@ module T3 { r.y; // error } -module T4 { +namespace T4 { declare class m3d { foo(): void; static bar(); } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } var r = new m3d(); r.foo(); r.bar(); // error r.y; // error } -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void; static bar(); } var r = new m3d(); // error diff --git a/tests/cases/compiler/cloduleWithDuplicateMember1.ts b/tests/cases/compiler/cloduleWithDuplicateMember1.ts index 3e2ed95f7d5..c743814e143 100644 --- a/tests/cases/compiler/cloduleWithDuplicateMember1.ts +++ b/tests/cases/compiler/cloduleWithDuplicateMember1.ts @@ -6,10 +6,10 @@ class C { static foo() { } } -module C { +namespace C { export var x = 1; } -module C { +namespace C { export function foo() { } export function x() { } } \ No newline at end of file diff --git a/tests/cases/compiler/cloduleWithDuplicateMember2.ts b/tests/cases/compiler/cloduleWithDuplicateMember2.ts index 674bc5ee050..acb019f0d30 100644 --- a/tests/cases/compiler/cloduleWithDuplicateMember2.ts +++ b/tests/cases/compiler/cloduleWithDuplicateMember2.ts @@ -3,9 +3,9 @@ class C { static set y(z) { } } -module C { +namespace C { export var x = 1; } -module C { +namespace C { export function x() { } } \ No newline at end of file diff --git a/tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts b/tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts index c6423ce41a7..1eb800a74eb 100644 --- a/tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts +++ b/tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts @@ -1,5 +1,5 @@ // Non-ambient & instantiated module. -module Moclodule { +namespace Moclodule { export interface Someinterface { foo(): void; } @@ -10,7 +10,7 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { export class Manager { } } \ No newline at end of file diff --git a/tests/cases/compiler/cloduleWithPriorUninstantiatedModule.ts b/tests/cases/compiler/cloduleWithPriorUninstantiatedModule.ts index 0c603b71a4d..c009c669352 100644 --- a/tests/cases/compiler/cloduleWithPriorUninstantiatedModule.ts +++ b/tests/cases/compiler/cloduleWithPriorUninstantiatedModule.ts @@ -1,5 +1,5 @@ // Non-ambient & uninstantiated module. -module Moclodule { +namespace Moclodule { export interface Someinterface { foo(): void; } @@ -9,7 +9,7 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { export class Manager { } } \ No newline at end of file diff --git a/tests/cases/compiler/cloduleWithRecursiveReference.ts b/tests/cases/compiler/cloduleWithRecursiveReference.ts index 4dd13c23c17..c67df6c12a1 100644 --- a/tests/cases/compiler/cloduleWithRecursiveReference.ts +++ b/tests/cases/compiler/cloduleWithRecursiveReference.ts @@ -1,4 +1,4 @@ -module M +namespace M { export class C { } export module C { diff --git a/tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts b/tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts index 77483b4ab98..a16306a5a1b 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export var x = 3; class c { private y; @@ -8,7 +8,7 @@ module M { } } -module M { +namespace M { class d { private y; set Z(p) { @@ -18,7 +18,7 @@ module M { } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M class e { private y; set M(p) { @@ -27,7 +27,7 @@ module M { // Shouldnt be _M } } -module M { +namespace M { class f { get Z() { var M = 10; @@ -36,7 +36,7 @@ module M { } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M class e { get M() { return x; diff --git a/tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts b/tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts index 5a1a9e013e7..1eb8d3c79a8 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export var x = 3; class c { constructor(M, p = x) { @@ -6,14 +6,14 @@ module M { } } -module M { +namespace M { class d { constructor(private M, p = x) { } } } -module M { +namespace M { class d2 { constructor() { var M = 10; diff --git a/tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts b/tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts index 18a727847b7..7b81b77d0a6 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { enum e { m1, m2 = m1 diff --git a/tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts b/tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts index 0cdb0884a27..96f8d86be24 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts @@ -1,16 +1,16 @@ -module M { +namespace M { export var x = 3; function fn(M, p = x) { } } -module M { +namespace M { function fn2() { var M; var p = x; } } -module M { +namespace M { function fn3() { function M() { var p = x; diff --git a/tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts b/tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts index cb95e9acc9d..7f62acb361e 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts @@ -1,10 +1,10 @@ -module m1 { +namespace m1 { export class m1 { } } var foo = new m1.m1(); -module m2 { +namespace m2 { export class m2 { } diff --git a/tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts b/tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts index ecd4db562a6..f60bfe19c3f 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { export interface m1 { } export class m2 implements m1 { diff --git a/tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts b/tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts index a17891766fa..32862672a3a 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { export var m1 = 10; var b = m1; } diff --git a/tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts b/tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts index b89d3d94143..c4919a158e8 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts @@ -1,11 +1,11 @@ -module M { +namespace M { export var x = 3; class c { fn(M, p = x) { } } } -module M { +namespace M { class d { fn2() { var M; @@ -14,7 +14,7 @@ module M { } } -module M { +namespace M { class e { fn3() { function M() { @@ -24,7 +24,7 @@ module M { } } -module M { // Shouldnt bn _M +namespace M { // Shouldnt bn _M class f { M() { } diff --git a/tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts b/tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts index 66b8458ba27..f23b4572461 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts @@ -1,13 +1,13 @@ -module M { +namespace M { export var x = 3; - module m1 { + namespace m1 { var M = 10; var p = x; } } -module M { - module m2 { +namespace M { + namespace m2 { class M { } var p = x; @@ -15,8 +15,8 @@ module M { } } -module M { - module m3 { +namespace M { + namespace m3 { function M() { } var p = x; @@ -24,8 +24,8 @@ module M { } } -module M { // shouldnt be _M - module m3 { +namespace M { // shouldnt be _M + namespace m3 { interface M { } var p = x; @@ -33,9 +33,9 @@ module M { // shouldnt be _M } } -module M { - module m4 { - module M { +namespace M { + namespace m4 { + namespace M { var p = x; } } diff --git a/tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts b/tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts index 73915593fd9..7bfbd31ec25 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts @@ -1,9 +1,9 @@ -module m1 { +namespace m1 { export class m1 { } } var foo = new m1.m1(); -module m1 { +namespace m1 { export class c1 { } var b = new c1(); @@ -11,14 +11,14 @@ module m1 { } var foo2 = new m1.c1(); -module m2 { +namespace m2 { export class c1 { } export var b10 = 10; var x = new c1(); } var foo3 = new m2.c1(); -module m2 { +namespace m2 { export class m2 { } var b = new m2(); diff --git a/tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts b/tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts index 5d75be81154..35347eb8a29 100644 --- a/tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts +++ b/tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { class m1 { } var x = new m1(); diff --git a/tests/cases/compiler/collisionExportsRequireAndAmbientClass.ts b/tests/cases/compiler/collisionExportsRequireAndAmbientClass.ts index 563c834c79c..7a18f239712 100644 --- a/tests/cases/compiler/collisionExportsRequireAndAmbientClass.ts +++ b/tests/cases/compiler/collisionExportsRequireAndAmbientClass.ts @@ -10,7 +10,7 @@ declare module m1 { class exports { } } -module m2 { +namespace m2 { export declare class require { } export declare class exports { @@ -28,7 +28,7 @@ declare module m3 { class exports { } } -module m4 { +namespace m4 { export declare class require { } export declare class exports { diff --git a/tests/cases/compiler/collisionExportsRequireAndAmbientEnum.ts b/tests/cases/compiler/collisionExportsRequireAndAmbientEnum.ts index 5366d5511f9..3aa2a0ff002 100644 --- a/tests/cases/compiler/collisionExportsRequireAndAmbientEnum.ts +++ b/tests/cases/compiler/collisionExportsRequireAndAmbientEnum.ts @@ -18,7 +18,7 @@ declare module m1 { _thisVal2, } } -module m2 { +namespace m2 { export declare enum require { _thisVal1, _thisVal2, @@ -48,7 +48,7 @@ declare module m3 { _thisVal2, } } -module m4 { +namespace m4 { export declare enum require { _thisVal1, _thisVal2, diff --git a/tests/cases/compiler/collisionExportsRequireAndAmbientFunction.ts b/tests/cases/compiler/collisionExportsRequireAndAmbientFunction.ts index caabb75971a..fa2ffac8d5b 100644 --- a/tests/cases/compiler/collisionExportsRequireAndAmbientFunction.ts +++ b/tests/cases/compiler/collisionExportsRequireAndAmbientFunction.ts @@ -7,7 +7,7 @@ declare module m1 { function exports(): string; function require(): number; } -module m2 { +namespace m2 { export declare function exports(): string; export declare function require(): string[]; var a = 10; diff --git a/tests/cases/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.ts b/tests/cases/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.ts index 2b3663f4d9e..27bc3137475 100644 --- a/tests/cases/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.ts +++ b/tests/cases/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.ts @@ -4,7 +4,7 @@ declare module m3 { function exports(): string[]; function require(): number[]; } -module m4 { +namespace m4 { export declare function exports(): string; export declare function require(): string; var a = 10; diff --git a/tests/cases/compiler/collisionExportsRequireAndAmbientModule.ts b/tests/cases/compiler/collisionExportsRequireAndAmbientModule.ts index b94fcb0cc32..adbea6947fd 100644 --- a/tests/cases/compiler/collisionExportsRequireAndAmbientModule.ts +++ b/tests/cases/compiler/collisionExportsRequireAndAmbientModule.ts @@ -19,20 +19,20 @@ export function foo2(): exports.I { return null; } declare module m1 { - module require { + namespace require { export interface I { } export class C { } } - module exports { + namespace exports { export interface I { } export class C { } } } -module m2 { +namespace m2 { export declare module require { export interface I { } @@ -62,20 +62,20 @@ declare module exports { } } declare module m3 { - module require { + namespace require { export interface I { } export class C { } } - module exports { + namespace exports { export interface I { } export class C { } } } -module m4 { +namespace m4 { export declare module require { export interface I { } diff --git a/tests/cases/compiler/collisionExportsRequireAndAmbientVar.ts b/tests/cases/compiler/collisionExportsRequireAndAmbientVar.ts index 0e17603c925..3736d7eb344 100644 --- a/tests/cases/compiler/collisionExportsRequireAndAmbientVar.ts +++ b/tests/cases/compiler/collisionExportsRequireAndAmbientVar.ts @@ -6,7 +6,7 @@ declare module m1 { var exports: string; var require: number; } -module m2 { +namespace m2 { export declare var exports: number; export declare var require: string; var a = 10; @@ -19,7 +19,7 @@ declare module m3 { var exports: string; var require: number; } -module m4 { +namespace m4 { export declare var exports: string; export declare var require: number; var a = 10; diff --git a/tests/cases/compiler/collisionExportsRequireAndClass.ts b/tests/cases/compiler/collisionExportsRequireAndClass.ts index 0bc1e0e337b..995364b78f2 100644 --- a/tests/cases/compiler/collisionExportsRequireAndClass.ts +++ b/tests/cases/compiler/collisionExportsRequireAndClass.ts @@ -4,13 +4,13 @@ export class require { } export class exports { } -module m1 { +namespace m1 { class require { } class exports { } } -module m2 { +namespace m2 { export class require { } export class exports { @@ -22,13 +22,13 @@ class require { } class exports { } -module m3 { +namespace m3 { class require { } class exports { } } -module m4 { +namespace m4 { export class require { } export class exports { diff --git a/tests/cases/compiler/collisionExportsRequireAndEnum.ts b/tests/cases/compiler/collisionExportsRequireAndEnum.ts index b8bb1727480..ce7d611927e 100644 --- a/tests/cases/compiler/collisionExportsRequireAndEnum.ts +++ b/tests/cases/compiler/collisionExportsRequireAndEnum.ts @@ -8,7 +8,7 @@ export enum exports { // Error _thisVal1, _thisVal2, } -module m1 { +namespace m1 { enum require { _thisVal1, _thisVal2, @@ -18,7 +18,7 @@ module m1 { _thisVal2, } } -module m2 { +namespace m2 { export enum require { _thisVal1, _thisVal2, @@ -38,7 +38,7 @@ enum exports { _thisVal1, _thisVal2, } -module m3 { +namespace m3 { enum require { _thisVal1, _thisVal2, @@ -48,7 +48,7 @@ module m3 { _thisVal2, } } -module m4 { +namespace m4 { export enum require { _thisVal1, _thisVal2, diff --git a/tests/cases/compiler/collisionExportsRequireAndFunction.ts b/tests/cases/compiler/collisionExportsRequireAndFunction.ts index 185b0a41805..3adfa803f90 100644 --- a/tests/cases/compiler/collisionExportsRequireAndFunction.ts +++ b/tests/cases/compiler/collisionExportsRequireAndFunction.ts @@ -5,7 +5,7 @@ export function exports() { export function require() { return "require"; } -module m1 { +namespace m1 { function exports() { return 1; } @@ -13,7 +13,7 @@ module m1 { return "require"; } } -module m2 { +namespace m2 { export function exports() { return 1; } diff --git a/tests/cases/compiler/collisionExportsRequireAndFunctionInGlobalFile.ts b/tests/cases/compiler/collisionExportsRequireAndFunctionInGlobalFile.ts index 050887580f7..dd0ac35b792 100644 --- a/tests/cases/compiler/collisionExportsRequireAndFunctionInGlobalFile.ts +++ b/tests/cases/compiler/collisionExportsRequireAndFunctionInGlobalFile.ts @@ -4,7 +4,7 @@ function exports() { function require() { return "require"; } -module m3 { +namespace m3 { function exports() { return 1; } @@ -12,7 +12,7 @@ module m3 { return "require"; } } -module m4 { +namespace m4 { export function exports() { return 1; } diff --git a/tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts b/tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts index e76fc572b75..c65942da203 100644 --- a/tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts +++ b/tests/cases/compiler/collisionExportsRequireAndInternalModuleAlias.ts @@ -8,14 +8,14 @@ import require = m.c; new exports(); new require(); -module m1 { +namespace m1 { import exports = m.c; import require = m.c; new exports(); new require(); } -module m2 { +namespace m2 { export import exports = m.c; export import require = m.c; new exports(); diff --git a/tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts b/tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts index d76da86891e..4c5a6672c66 100644 --- a/tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts +++ b/tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts @@ -1,4 +1,4 @@ -module mOfGloalFile { +namespace mOfGloalFile { export class c { } } @@ -7,14 +7,14 @@ import require = mOfGloalFile.c; new exports(); new require(); -module m1 { +namespace m1 { import exports = mOfGloalFile.c; import require = mOfGloalFile.c; new exports(); new require(); } -module m2 { +namespace m2 { export import exports = mOfGloalFile.c; export import require = mOfGloalFile.c; new exports(); diff --git a/tests/cases/compiler/collisionExportsRequireAndModule.ts b/tests/cases/compiler/collisionExportsRequireAndModule.ts index dc79e15605c..2879d5d4bb1 100644 --- a/tests/cases/compiler/collisionExportsRequireAndModule.ts +++ b/tests/cases/compiler/collisionExportsRequireAndModule.ts @@ -18,21 +18,21 @@ export module exports { export function foo2(): exports.I { return null; } -module m1 { - module require { +namespace m1 { + namespace require { export interface I { } export class C { } } - module exports { + namespace exports { export interface I { } export class C { } } } -module m2 { +namespace m2 { export module require { export interface I { } @@ -48,33 +48,33 @@ module m2 { } //@filename: collisionExportsRequireAndModule_globalFile.ts -module require { +namespace require { export interface I { } export class C { } } -module exports { +namespace exports { export interface I { } export class C { } } -module m3 { - module require { +namespace m3 { + namespace require { export interface I { } export class C { } } - module exports { + namespace exports { export interface I { } export class C { } } } -module m4 { +namespace m4 { export module require { export interface I { } diff --git a/tests/cases/compiler/collisionExportsRequireAndVar.ts b/tests/cases/compiler/collisionExportsRequireAndVar.ts index af98b1a7d09..488192d4831 100644 --- a/tests/cases/compiler/collisionExportsRequireAndVar.ts +++ b/tests/cases/compiler/collisionExportsRequireAndVar.ts @@ -4,11 +4,11 @@ export function foo() { } var exports = 1; var require = "require"; -module m1 { +namespace m1 { var exports = 0; var require = "require"; } -module m2 { +namespace m2 { export var exports = 0; export var require = "require"; } @@ -16,11 +16,11 @@ module m2 { //@filename: collisionExportsRequireAndVar_globalFile.ts var exports = 0; var require = "require"; -module m3 { +namespace m3 { var exports = 0; var require = "require"; } -module m4 { +namespace m4 { export var exports = 0; export var require = "require"; } \ No newline at end of file diff --git a/tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts b/tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts index 3ab1eb6f5d5..6c4d9c768a7 100644 --- a/tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts +++ b/tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts @@ -1,4 +1,4 @@ -module a { +namespace a { export var b = 10; } var f = () => this; diff --git a/tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts b/tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts index 75d8ce21a4a..d830f14a811 100644 --- a/tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts +++ b/tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts @@ -1,4 +1,4 @@ -module _this { //Error +namespace _this { //Error class c { } } diff --git a/tests/cases/compiler/commentEmitAtEndOfFile1.ts b/tests/cases/compiler/commentEmitAtEndOfFile1.ts index 5713ef006e5..3758a95231b 100644 --- a/tests/cases/compiler/commentEmitAtEndOfFile1.ts +++ b/tests/cases/compiler/commentEmitAtEndOfFile1.ts @@ -1,12 +1,12 @@ -// @allowUnusedLabels: true - -// test -var f = '' -// test #2 -module foo { - function bar() { } -} -// test #3 -module empty { -} +// @allowUnusedLabels: true + +// test +var f = '' +// test #2 +namespace foo { + function bar() { } +} +// test #3 +namespace empty { +} // test #4 \ No newline at end of file diff --git a/tests/cases/compiler/commentOnElidedModule1.ts b/tests/cases/compiler/commentOnElidedModule1.ts index 0cdb7694273..b3edad59ba2 100644 --- a/tests/cases/compiler/commentOnElidedModule1.ts +++ b/tests/cases/compiler/commentOnElidedModule1.ts @@ -5,14 +5,14 @@ */ /*! Don't keep this pinned comment */ -module ElidedModule { +namespace ElidedModule { } // Don't keep this comment. -module ElidedModule2 { +namespace ElidedModule2 { } //@filename: b.ts /// -module ElidedModule3 { +namespace ElidedModule3 { } \ No newline at end of file diff --git a/tests/cases/compiler/commentsFormatting.ts b/tests/cases/compiler/commentsFormatting.ts index c0f2d3093f9..716c8acabca 100644 --- a/tests/cases/compiler/commentsFormatting.ts +++ b/tests/cases/compiler/commentsFormatting.ts @@ -2,7 +2,7 @@ // @declaration: true // @removeComments: false -module m { +namespace m { /** this is first line - aligned to class declaration * this is 4 spaces left aligned * this is 3 spaces left aligned diff --git a/tests/cases/compiler/commentsModules.ts b/tests/cases/compiler/commentsModules.ts index 943ef640545..6717cdd2098 100644 --- a/tests/cases/compiler/commentsModules.ts +++ b/tests/cases/compiler/commentsModules.ts @@ -2,7 +2,7 @@ // @declaration: true // @removeComments: false /** Module comment*/ -module m1 { +namespace m1 { /** b's comment*/ export var b: number; /** foo's comment*/ diff --git a/tests/cases/compiler/commentsMultiModuleSingleFile.ts b/tests/cases/compiler/commentsMultiModuleSingleFile.ts index 651a3cb07ba..3f7668d18af 100644 --- a/tests/cases/compiler/commentsMultiModuleSingleFile.ts +++ b/tests/cases/compiler/commentsMultiModuleSingleFile.ts @@ -3,7 +3,7 @@ // @removeComments: false /** this is multi declare module*/ -module multiM { +namespace multiM { /** class b*/ export class b { } @@ -14,7 +14,7 @@ module multiM { } /// this is multi module 2 -module multiM { +namespace multiM { /** class c comment*/ export class c { } diff --git a/tests/cases/compiler/commentsdoNotEmitComments.ts b/tests/cases/compiler/commentsdoNotEmitComments.ts index e2aaa269e1f..dbdd110ea8c 100644 --- a/tests/cases/compiler/commentsdoNotEmitComments.ts +++ b/tests/cases/compiler/commentsdoNotEmitComments.ts @@ -73,7 +73,7 @@ interface i1 { var i1_i: i1; /** this is module comment*/ -module m1 { +namespace m1 { /** class b */ export class b { constructor(public x: number) { diff --git a/tests/cases/compiler/commentsemitComments.ts b/tests/cases/compiler/commentsemitComments.ts index b20fbb9641a..a04a2d98bd7 100644 --- a/tests/cases/compiler/commentsemitComments.ts +++ b/tests/cases/compiler/commentsemitComments.ts @@ -73,7 +73,7 @@ interface i1 { var i1_i: i1; /** this is module comment*/ -module m1 { +namespace m1 { /** class b */ export class b { constructor(public x: number) { diff --git a/tests/cases/compiler/complicatedPrivacy.ts b/tests/cases/compiler/complicatedPrivacy.ts index 6fe144d237c..65ecc3536ba 100644 --- a/tests/cases/compiler/complicatedPrivacy.ts +++ b/tests/cases/compiler/complicatedPrivacy.ts @@ -1,5 +1,5 @@ // @target: es5 -module m1 { +namespace m1 { export module m2 { @@ -42,7 +42,7 @@ module m1 { new (arg1: C1) : C1 }) { } - module m3 { + namespace m3 { function f2(f1: C1) { } @@ -68,7 +68,7 @@ module m1 { class C2 { } -module m2 { +namespace m2 { export module m3 { export class c_pr implements mglo5.i5, mglo5.i6 { @@ -77,10 +77,10 @@ module m2 { } } - module m4 { + namespace m4 { class C { } - module m5 { + namespace m5 { export module m6 { function f1() { @@ -93,7 +93,7 @@ module m2 { } } -module mglo5 { +namespace mglo5 { export interface i5 { f1(): string; } diff --git a/tests/cases/compiler/compoundVarDecl1.ts b/tests/cases/compiler/compoundVarDecl1.ts index fe5c799b221..db6ddd5cd84 100644 --- a/tests/cases/compiler/compoundVarDecl1.ts +++ b/tests/cases/compiler/compoundVarDecl1.ts @@ -1,3 +1,3 @@ -module Foo { var a = 1, b = 1; a = b + 2; } +namespace Foo { var a = 1, b = 1; a = b + 2; } var foo = 4, bar = 5; \ No newline at end of file diff --git a/tests/cases/compiler/constDeclarations-access3.ts b/tests/cases/compiler/constDeclarations-access3.ts index 370288dab97..344af822932 100644 --- a/tests/cases/compiler/constDeclarations-access3.ts +++ b/tests/cases/compiler/constDeclarations-access3.ts @@ -1,7 +1,7 @@ // @target: ES6 -module M { +namespace M { export const x = 0; } diff --git a/tests/cases/compiler/constDeclarations-scopes.ts b/tests/cases/compiler/constDeclarations-scopes.ts index d0c1df425b6..3fe6bf707fd 100644 --- a/tests/cases/compiler/constDeclarations-scopes.ts +++ b/tests/cases/compiler/constDeclarations-scopes.ts @@ -101,7 +101,7 @@ var F3 = function () { }; // modules -module m { +namespace m { const c = 0; n = c; diff --git a/tests/cases/compiler/constDeclarations-validContexts.ts b/tests/cases/compiler/constDeclarations-validContexts.ts index 63af6d16959..323eba56450 100644 --- a/tests/cases/compiler/constDeclarations-validContexts.ts +++ b/tests/cases/compiler/constDeclarations-validContexts.ts @@ -86,7 +86,7 @@ var F3 = function () { }; // modules -module m { +namespace m { const c22 = 0; { diff --git a/tests/cases/compiler/constDeclarations2.ts b/tests/cases/compiler/constDeclarations2.ts index a221c3563ba..75d39f8eb81 100644 --- a/tests/cases/compiler/constDeclarations2.ts +++ b/tests/cases/compiler/constDeclarations2.ts @@ -2,7 +2,7 @@ // @declaration: true // No error -module M { +namespace M { export const c1 = false; export const c2: number = 23; export const c3 = 0, c4 :string = "", c5 = null; diff --git a/tests/cases/compiler/constEnumErrors.ts b/tests/cases/compiler/constEnumErrors.ts index ca2289ef3bf..68f87ca8070 100644 --- a/tests/cases/compiler/constEnumErrors.ts +++ b/tests/cases/compiler/constEnumErrors.ts @@ -3,7 +3,7 @@ const enum E { A } -module E { +namespace E { var x = 1; } diff --git a/tests/cases/compiler/constEnumMergingWithValues1.ts b/tests/cases/compiler/constEnumMergingWithValues1.ts index 0c2919c70df..cb54a40624b 100644 --- a/tests/cases/compiler/constEnumMergingWithValues1.ts +++ b/tests/cases/compiler/constEnumMergingWithValues1.ts @@ -2,7 +2,7 @@ //@filename: m1.ts function foo() {} -module foo { +namespace foo { const enum E { X } } diff --git a/tests/cases/compiler/constEnumMergingWithValues2.ts b/tests/cases/compiler/constEnumMergingWithValues2.ts index 3f30fdf4d3a..be4ab146172 100644 --- a/tests/cases/compiler/constEnumMergingWithValues2.ts +++ b/tests/cases/compiler/constEnumMergingWithValues2.ts @@ -2,7 +2,7 @@ //@filename: m1.ts class foo {} -module foo { +namespace foo { const enum E { X } } diff --git a/tests/cases/compiler/constEnumMergingWithValues3.ts b/tests/cases/compiler/constEnumMergingWithValues3.ts index 8edadc2eb38..e6dea73e834 100644 --- a/tests/cases/compiler/constEnumMergingWithValues3.ts +++ b/tests/cases/compiler/constEnumMergingWithValues3.ts @@ -2,7 +2,7 @@ //@filename: m1.ts enum foo { A } -module foo { +namespace foo { const enum E { X } } diff --git a/tests/cases/compiler/constEnumMergingWithValues4.ts b/tests/cases/compiler/constEnumMergingWithValues4.ts index 036c62c1de4..5047df678ce 100644 --- a/tests/cases/compiler/constEnumMergingWithValues4.ts +++ b/tests/cases/compiler/constEnumMergingWithValues4.ts @@ -1,11 +1,11 @@ //@module: amd //@filename: m1.ts -module foo { +namespace foo { const enum E { X } } -module foo { +namespace foo { var x = 1; } diff --git a/tests/cases/compiler/constEnumMergingWithValues5.ts b/tests/cases/compiler/constEnumMergingWithValues5.ts index aebb0abfaec..847978bde53 100644 --- a/tests/cases/compiler/constEnumMergingWithValues5.ts +++ b/tests/cases/compiler/constEnumMergingWithValues5.ts @@ -2,7 +2,7 @@ //@filename: m1.ts //@preserveConstEnums: true -module foo { +namespace foo { const enum E { X } } diff --git a/tests/cases/compiler/constEnumOnlyModuleMerging.ts b/tests/cases/compiler/constEnumOnlyModuleMerging.ts index 0b1b9e3f0cb..2c277c4acab 100644 --- a/tests/cases/compiler/constEnumOnlyModuleMerging.ts +++ b/tests/cases/compiler/constEnumOnlyModuleMerging.ts @@ -1,12 +1,12 @@ -module Outer { +namespace Outer { export var x = 1; } -module Outer { +namespace Outer { export const enum A { X } } -module B { +namespace B { import O = Outer; var x = O.A.X; var y = O.x; diff --git a/tests/cases/compiler/constEnums.ts b/tests/cases/compiler/constEnums.ts index 00d5b2d6b72..0c23de86380 100644 --- a/tests/cases/compiler/constEnums.ts +++ b/tests/cases/compiler/constEnums.ts @@ -47,7 +47,7 @@ const enum Comments { "-->", } -module A { +namespace A { export module B { export module C { export const enum E { @@ -58,7 +58,7 @@ module A { } } -module A { +namespace A { export module B { export module C { export const enum E { @@ -69,7 +69,7 @@ module A { } } -module A1 { +namespace A1 { export module B { export module C { export const enum E { @@ -80,7 +80,7 @@ module A1 { } } -module A2 { +namespace A2 { export module B { export module C { export const enum E { diff --git a/tests/cases/compiler/constructorArgWithGenericCallSignature.ts b/tests/cases/compiler/constructorArgWithGenericCallSignature.ts index 42601614cb3..dabfeccc148 100644 --- a/tests/cases/compiler/constructorArgWithGenericCallSignature.ts +++ b/tests/cases/compiler/constructorArgWithGenericCallSignature.ts @@ -1,4 +1,4 @@ -module Test { +namespace Test { export interface MyFunc { (value1: T): T; } diff --git a/tests/cases/compiler/contextualTyping.ts b/tests/cases/compiler/contextualTyping.ts index 73a75d01466..c8df0a47340 100644 --- a/tests/cases/compiler/contextualTyping.ts +++ b/tests/cases/compiler/contextualTyping.ts @@ -19,7 +19,7 @@ class C1T5 { } // CONTEXT: Module property declaration -module C2T5 { +namespace C2T5 { export var foo: (i: number, s: string) => number = function(i) { return i; } @@ -64,7 +64,7 @@ class C4T5 { } // CONTEXT: Module property assignment -module C5T5 { +namespace C5T5 { export var foo: (i: number, s: string) => string; foo = function(i, s) { return s; diff --git a/tests/cases/compiler/convertKeywordsYes.ts b/tests/cases/compiler/convertKeywordsYes.ts index ad50ce50e8e..feb273bb688 100644 --- a/tests/cases/compiler/convertKeywordsYes.ts +++ b/tests/cases/compiler/convertKeywordsYes.ts @@ -287,7 +287,7 @@ enum bigEnum { with, } -module bigModule { +namespace bigModule { class constructor { } class implements { } class interface { } diff --git a/tests/cases/compiler/covariance1.ts b/tests/cases/compiler/covariance1.ts index b2f5698cee2..35c2ddeccee 100644 --- a/tests/cases/compiler/covariance1.ts +++ b/tests/cases/compiler/covariance1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { interface X { m1:number; } export class XX implements X { constructor(public m1:number) { } } diff --git a/tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts b/tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts index 147d90d8e06..1f1c40ff8bd 100644 --- a/tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts +++ b/tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts @@ -1,6 +1,6 @@ //@module: commonjs // @declaration: true -module m3 { +namespace m3 { export module m2 { export interface connectModule { (res, req, next): void; diff --git a/tests/cases/compiler/declFileExportImportChain.ts b/tests/cases/compiler/declFileExportImportChain.ts index deeb2a89952..6d5a5df8f7e 100644 --- a/tests/cases/compiler/declFileExportImportChain.ts +++ b/tests/cases/compiler/declFileExportImportChain.ts @@ -2,7 +2,7 @@ //@declaration: true // @Filename: declFileExportImportChain_a.ts -module m1 { +namespace m1 { export module m2 { export class c1 { } diff --git a/tests/cases/compiler/declFileExportImportChain2.ts b/tests/cases/compiler/declFileExportImportChain2.ts index 6cf915c9673..9e8249c131c 100644 --- a/tests/cases/compiler/declFileExportImportChain2.ts +++ b/tests/cases/compiler/declFileExportImportChain2.ts @@ -2,7 +2,7 @@ //@declaration: true // @Filename: declFileExportImportChain2_a.ts -module m1 { +namespace m1 { export module m2 { export class c1 { } diff --git a/tests/cases/compiler/declFileImportChainInExportAssignment.ts b/tests/cases/compiler/declFileImportChainInExportAssignment.ts index da18e81a6c6..d67557a1dbf 100644 --- a/tests/cases/compiler/declFileImportChainInExportAssignment.ts +++ b/tests/cases/compiler/declFileImportChainInExportAssignment.ts @@ -1,6 +1,6 @@ // @declaration: true // @module: commonjs -module m { +namespace m { export module c { export class c { } diff --git a/tests/cases/compiler/declFileImportModuleWithExportAssignment.ts b/tests/cases/compiler/declFileImportModuleWithExportAssignment.ts index 3a619905768..fbc78ef1344 100644 --- a/tests/cases/compiler/declFileImportModuleWithExportAssignment.ts +++ b/tests/cases/compiler/declFileImportModuleWithExportAssignment.ts @@ -2,7 +2,7 @@ // @declaration: true // @Filename: declFileImportModuleWithExportAssignment_0.ts -module m2 { +namespace m2 { export interface connectModule { (res, req, next): void; } diff --git a/tests/cases/compiler/declFileInternalAliases.ts b/tests/cases/compiler/declFileInternalAliases.ts index 3378a794c2f..be54b4a1857 100644 --- a/tests/cases/compiler/declFileInternalAliases.ts +++ b/tests/cases/compiler/declFileInternalAliases.ts @@ -1,13 +1,13 @@ // @declaration: true -module m { +namespace m { export class c { } } -module m1 { +namespace m1 { import x = m.c; export var d = new x(); // emit the type as m.c } -module m2 { +namespace m2 { export import x = m.c; export var d = new x(); // emit the type as x } \ No newline at end of file diff --git a/tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts b/tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts index 3ec1a0cda01..e009d0fc787 100644 --- a/tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts +++ b/tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts @@ -1,6 +1,6 @@ // @declaration: true -module m1 { +namespace m1 { export class c { } } diff --git a/tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts b/tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts index fba7b8ad397..8d9f3ba6f6f 100644 --- a/tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts +++ b/tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts @@ -1,6 +1,6 @@ // @declaration: true -module m { +namespace m { export class c { } diff --git a/tests/cases/compiler/declFileTypeAnnotationArrayType.ts b/tests/cases/compiler/declFileTypeAnnotationArrayType.ts index 4bb99032a60..5a179596690 100644 --- a/tests/cases/compiler/declFileTypeAnnotationArrayType.ts +++ b/tests/cases/compiler/declFileTypeAnnotationArrayType.ts @@ -3,7 +3,7 @@ class c { } -module m { +namespace m { export class c { } export class g { diff --git a/tests/cases/compiler/declFileTypeAnnotationTupleType.ts b/tests/cases/compiler/declFileTypeAnnotationTupleType.ts index aafbfd02eae..2df63f55004 100644 --- a/tests/cases/compiler/declFileTypeAnnotationTupleType.ts +++ b/tests/cases/compiler/declFileTypeAnnotationTupleType.ts @@ -3,7 +3,7 @@ class c { } -module m { +namespace m { export class c { } export class g { diff --git a/tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts b/tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts index 447921f3f4a..4fbb6ac6ede 100644 --- a/tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts +++ b/tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts @@ -2,7 +2,7 @@ // @module: commonjs // @declaration: true -module M { +namespace M { export type Value = string | number | boolean; export var x: Value; @@ -25,7 +25,7 @@ interface Window { someMethod(); } -module M { +namespace M { export type W = Window | string; export module N { export class Window { } diff --git a/tests/cases/compiler/declFileTypeAnnotationTypeLiteral.ts b/tests/cases/compiler/declFileTypeAnnotationTypeLiteral.ts index e41495b68de..9d1ed91f3e5 100644 --- a/tests/cases/compiler/declFileTypeAnnotationTypeLiteral.ts +++ b/tests/cases/compiler/declFileTypeAnnotationTypeLiteral.ts @@ -5,7 +5,7 @@ class c { } class g { } -module m { +namespace m { export class c { } } diff --git a/tests/cases/compiler/declFileTypeAnnotationTypeQuery.ts b/tests/cases/compiler/declFileTypeAnnotationTypeQuery.ts index d3cde6a1faa..487e9a6c97b 100644 --- a/tests/cases/compiler/declFileTypeAnnotationTypeQuery.ts +++ b/tests/cases/compiler/declFileTypeAnnotationTypeQuery.ts @@ -3,7 +3,7 @@ class c { } -module m { +namespace m { export class c { } export class g { diff --git a/tests/cases/compiler/declFileTypeAnnotationTypeReference.ts b/tests/cases/compiler/declFileTypeAnnotationTypeReference.ts index e20ecff32f0..5e551be023d 100644 --- a/tests/cases/compiler/declFileTypeAnnotationTypeReference.ts +++ b/tests/cases/compiler/declFileTypeAnnotationTypeReference.ts @@ -3,7 +3,7 @@ class c { } -module m { +namespace m { export class c { } export class g { diff --git a/tests/cases/compiler/declFileTypeAnnotationUnionType.ts b/tests/cases/compiler/declFileTypeAnnotationUnionType.ts index 4a973834915..d2a5e71a321 100644 --- a/tests/cases/compiler/declFileTypeAnnotationUnionType.ts +++ b/tests/cases/compiler/declFileTypeAnnotationUnionType.ts @@ -4,7 +4,7 @@ class c { private p: string; } -module m { +namespace m { export class c { private q: string; } diff --git a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts index 6625973717f..ae660b97c9f 100644 --- a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts +++ b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts @@ -2,14 +2,14 @@ // @module: commonjs // @declaration: true -module m { +namespace m { class private1 { } export class public1 { } - module m2 { + namespace m2 { export class public2 { } } diff --git a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts index 8ae9d5bcf3f..06b544f26fd 100644 --- a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts +++ b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts @@ -2,7 +2,7 @@ // @module: commonjs // @declaration: true -module m { +namespace m { class private1 { } @@ -30,7 +30,7 @@ module m { export function foo14(param = new public1()) { } - module m2 { + namespace m2 { export class public2 { } } diff --git a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts index 880cba6d0cb..b5f250e1126 100644 --- a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts +++ b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts @@ -2,7 +2,7 @@ // @module: commonjs // @declaration: true -module m { +namespace m { class private1 { } @@ -38,7 +38,7 @@ module m { return new public1(); } - module m2 { + namespace m2 { export class public2 { } } diff --git a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.ts b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.ts index 6431dffd20f..f1d515f8823 100644 --- a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.ts +++ b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.ts @@ -6,7 +6,7 @@ interface Window { someMethod(); } -module M { +namespace M { type W = Window | string; export module N { export class Window { } @@ -14,7 +14,7 @@ module M { } } -module M1 { +namespace M1 { export type W = Window | string; export module N { export class Window { } @@ -22,12 +22,12 @@ module M1 { } } -module M2 { +namespace M2 { class private1 { } class public1 { } - module m3 { + namespace m3 { export class public1 { } } diff --git a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts index 65af116c193..9a32ae8e872 100644 --- a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts +++ b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts @@ -2,10 +2,10 @@ // @module: commonjs // @declaration: true -module m { +namespace m { class private1 { } - module m2 { + namespace m2 { export class public1 { } } diff --git a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts index fa2558f5a15..856abc334f5 100644 --- a/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts +++ b/tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts @@ -2,7 +2,7 @@ // @module: commonjs // @declaration: true -module m { +namespace m { class private1 { } @@ -22,7 +22,7 @@ module m { export var k2: public1; export var l2 = new public1(); - module m2 { + namespace m2 { export class public2 { } } diff --git a/tests/cases/compiler/declFileTypeofInAnonymousType.ts b/tests/cases/compiler/declFileTypeofInAnonymousType.ts index 928052bbffb..9715e61ba30 100644 --- a/tests/cases/compiler/declFileTypeofInAnonymousType.ts +++ b/tests/cases/compiler/declFileTypeofInAnonymousType.ts @@ -1,6 +1,6 @@ // @declaration: true -module m1 { +namespace m1 { export class c { } export enum e { diff --git a/tests/cases/compiler/declFileTypeofModule.ts b/tests/cases/compiler/declFileTypeofModule.ts index 0f786709aa1..c85bfbe2539 100644 --- a/tests/cases/compiler/declFileTypeofModule.ts +++ b/tests/cases/compiler/declFileTypeofModule.ts @@ -1,12 +1,12 @@ // @declaration: true -module m1 { +namespace m1 { export var c: string; } var m1_1 = m1; var m1_2: typeof m1; -module m2 { +namespace m2 { export var d: typeof m2; } diff --git a/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts b/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts index 03e4f6f7425..5df817bd06a 100644 --- a/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts +++ b/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts @@ -5,7 +5,7 @@ module X.A.C { } } module X.A.B.C { - module A { + namespace A { } export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict } diff --git a/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts b/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts index 2b27d435305..2421451e4e6 100644 --- a/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts +++ b/tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts @@ -10,6 +10,6 @@ module X.A.B.C { } module X.A.B.C { - module A { + namespace A { } } \ No newline at end of file diff --git a/tests/cases/compiler/declInput-2.ts b/tests/cases/compiler/declInput-2.ts index 206dcd968fd..7a90a2f1a60 100644 --- a/tests/cases/compiler/declInput-2.ts +++ b/tests/cases/compiler/declInput-2.ts @@ -1,5 +1,5 @@ // @declaration: true -module M { +namespace M { class C { } export class E {} export interface I1 {} diff --git a/tests/cases/compiler/declInput4.ts b/tests/cases/compiler/declInput4.ts index a613995225f..57f4c10ccd5 100644 --- a/tests/cases/compiler/declInput4.ts +++ b/tests/cases/compiler/declInput4.ts @@ -1,5 +1,5 @@ // @declaration: true -module M { +namespace M { class C { } export class E {} export interface I1 {} diff --git a/tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts b/tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts index 9cdc6c2ec90..a50d8a8b0e5 100644 --- a/tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts +++ b/tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts @@ -1,4 +1,4 @@ // @declaration: true -module M { +namespace M { export var [a, b] = [1, 2]; } \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts index 89e5b65a9d3..bf1676428d3 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts @@ -18,6 +18,6 @@ function f15() { } var { a4, b4, c4 } = f15(); -module m { +namespace m { export var { a4, b4, c4 } = f15(); } \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts index f700e68e397..b45a248c195 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts @@ -10,6 +10,6 @@ function f15() { } var { a4, b4, c4 } = f15(); -module m { +namespace m { export var { a4, b4, c4 } = f15(); } \ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts b/tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts index 987fb67a08b..20c0ef39ef9 100644 --- a/tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts +++ b/tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts @@ -1,5 +1,5 @@ // @declaration: true -module m { +namespace m { class c { } export var [x, y, z] = [10, new c(), 30]; diff --git a/tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts b/tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts index b246ba32ba4..e3d7e0a46a1 100644 --- a/tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts +++ b/tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts @@ -1,7 +1,7 @@ // @declaration: true // @module: commonjs -module m { +namespace m { export module c { export class c { } diff --git a/tests/cases/compiler/declarationEmitNameConflicts.ts b/tests/cases/compiler/declarationEmitNameConflicts.ts index a30f4b2ff1b..2bc80b8340f 100644 --- a/tests/cases/compiler/declarationEmitNameConflicts.ts +++ b/tests/cases/compiler/declarationEmitNameConflicts.ts @@ -1,7 +1,7 @@ // @declaration: true // @module: commonjs // @Filename: declarationEmit_nameConflicts_1.ts -module f { export class c { } } +namespace f { export class c { } } export = f; // @Filename: declarationEmit_nameConflicts_0.ts diff --git a/tests/cases/compiler/declarationEmitNameConflicts3.ts b/tests/cases/compiler/declarationEmitNameConflicts3.ts index 6edc1056fa2..1df09bca4e0 100644 --- a/tests/cases/compiler/declarationEmitNameConflicts3.ts +++ b/tests/cases/compiler/declarationEmitNameConflicts3.ts @@ -1,6 +1,6 @@ // @declaration: true // @module: commonjs -module M { +namespace M { export interface D { } export module D { export function f() { } diff --git a/tests/cases/compiler/declarationMaps.ts b/tests/cases/compiler/declarationMaps.ts index cb788335943..d338b9993c7 100644 --- a/tests/cases/compiler/declarationMaps.ts +++ b/tests/cases/compiler/declarationMaps.ts @@ -1,6 +1,6 @@ // @declaration: true // @declarationMap: true -module m2 { +namespace m2 { export interface connectModule { (res, req, next): void; } diff --git a/tests/cases/compiler/declarationMapsWithoutDeclaration.ts b/tests/cases/compiler/declarationMapsWithoutDeclaration.ts index 266b0760bb1..30070a04d90 100644 --- a/tests/cases/compiler/declarationMapsWithoutDeclaration.ts +++ b/tests/cases/compiler/declarationMapsWithoutDeclaration.ts @@ -1,5 +1,5 @@ // @declarationMap: true -module m2 { +namespace m2 { export interface connectModule { (res, req, next): void; } diff --git a/tests/cases/compiler/declareAlreadySeen.ts b/tests/cases/compiler/declareAlreadySeen.ts index 62ee588be4d..963e4778ff3 100644 --- a/tests/cases/compiler/declareAlreadySeen.ts +++ b/tests/cases/compiler/declareAlreadySeen.ts @@ -1,4 +1,4 @@ -module M { +namespace M { declare declare var x; declare declare function f(); diff --git a/tests/cases/compiler/declareDottedModuleName.ts b/tests/cases/compiler/declareDottedModuleName.ts index 456e22c5e89..ed8bab25a7a 100644 --- a/tests/cases/compiler/declareDottedModuleName.ts +++ b/tests/cases/compiler/declareDottedModuleName.ts @@ -1,9 +1,9 @@ // @declaration: true -module M { +namespace M { module P.Q { } // This shouldnt be emitted } -module M { +namespace M { export module R.S { } //This should be emitted } diff --git a/tests/cases/compiler/declareFileExportAssignment.ts b/tests/cases/compiler/declareFileExportAssignment.ts index b0db02ede81..19a4da31f08 100644 --- a/tests/cases/compiler/declareFileExportAssignment.ts +++ b/tests/cases/compiler/declareFileExportAssignment.ts @@ -1,6 +1,6 @@ //@module: commonjs // @declaration: true -module m2 { +namespace m2 { export interface connectModule { (res, req, next): void; } diff --git a/tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts b/tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts index 4333b9c1050..3c591015ebc 100644 --- a/tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts +++ b/tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts @@ -1,6 +1,6 @@ //@module: commonjs // @declaration: true -module m2 { +namespace m2 { export interface connectModule { (res, req, next): void; } diff --git a/tests/cases/compiler/defaultArgsInFunctionExpressions.ts b/tests/cases/compiler/defaultArgsInFunctionExpressions.ts index 040d7d9c639..cfbdb9a55b3 100644 --- a/tests/cases/compiler/defaultArgsInFunctionExpressions.ts +++ b/tests/cases/compiler/defaultArgsInFunctionExpressions.ts @@ -20,8 +20,8 @@ var f4: (a: number) => void = function (a = "") { }; var f5: (a: (s: string) => any) => void = function (a = s => s) { }; // Instantiated module -module T { } -module U { +namespace T { } +namespace U { export var x; } diff --git a/tests/cases/compiler/differentTypesWithSameName.ts b/tests/cases/compiler/differentTypesWithSameName.ts index 2b40e23c642..2cac2adc6ed 100644 --- a/tests/cases/compiler/differentTypesWithSameName.ts +++ b/tests/cases/compiler/differentTypesWithSameName.ts @@ -1,4 +1,4 @@ -module m { +namespace m { export class variable{ s: string; } diff --git a/tests/cases/compiler/dottedModuleName.ts b/tests/cases/compiler/dottedModuleName.ts index 664303f23ec..f1ae9acda1e 100644 --- a/tests/cases/compiler/dottedModuleName.ts +++ b/tests/cases/compiler/dottedModuleName.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export module N { export function f(x:number)=>2*x; export module X.Y.Z { diff --git a/tests/cases/compiler/dottedModuleName2.ts b/tests/cases/compiler/dottedModuleName2.ts index bc0f503d3d0..f61ddbad09e 100644 --- a/tests/cases/compiler/dottedModuleName2.ts +++ b/tests/cases/compiler/dottedModuleName2.ts @@ -6,7 +6,7 @@ module A.B { -module AA { export module B { +namespace AA { export module B { export var x = 1; @@ -29,7 +29,7 @@ module A.B.C -module M +namespace M { diff --git a/tests/cases/compiler/downlevelLetConst16.ts b/tests/cases/compiler/downlevelLetConst16.ts index b30f26b4b82..4a2bc0a055c 100644 --- a/tests/cases/compiler/downlevelLetConst16.ts +++ b/tests/cases/compiler/downlevelLetConst16.ts @@ -101,7 +101,7 @@ function bar2() { use(x); } -module M1 { +namespace M1 { let x = 1; use(x); let [y] = [1]; @@ -110,7 +110,7 @@ module M1 { use(z); } -module M2 { +namespace M2 { { let x = 1; use(x); @@ -122,7 +122,7 @@ module M2 { use(x); } -module M3 { +namespace M3 { const x = 1; use(x); const [y] = [1]; @@ -132,7 +132,7 @@ module M3 { } -module M4 { +namespace M4 { { const x = 1; use(x); diff --git a/tests/cases/compiler/duplicateAnonymousInners1.ts b/tests/cases/compiler/duplicateAnonymousInners1.ts index c2d30e567c9..37c17f09290 100644 --- a/tests/cases/compiler/duplicateAnonymousInners1.ts +++ b/tests/cases/compiler/duplicateAnonymousInners1.ts @@ -1,4 +1,4 @@ -module Foo { +namespace Foo { class Helper { @@ -11,7 +11,7 @@ module Foo { } -module Foo { +namespace Foo { // Should not be an error class Helper { diff --git a/tests/cases/compiler/duplicateAnonymousModuleClasses.ts b/tests/cases/compiler/duplicateAnonymousModuleClasses.ts index 20a24e31ae7..1db75b4ca52 100644 --- a/tests/cases/compiler/duplicateAnonymousModuleClasses.ts +++ b/tests/cases/compiler/duplicateAnonymousModuleClasses.ts @@ -1,4 +1,4 @@ -module F { +namespace F { class Helper { @@ -7,7 +7,7 @@ module F { } -module F { +namespace F { // Should not be an error class Helper { @@ -16,7 +16,7 @@ module F { } -module Foo { +namespace Foo { class Helper { @@ -25,7 +25,7 @@ module Foo { } -module Foo { +namespace Foo { // Should not be an error class Helper { @@ -34,8 +34,8 @@ module Foo { } -module Gar { - module Foo { +namespace Gar { + namespace Foo { class Helper { @@ -44,7 +44,7 @@ module Gar { } - module Foo { + namespace Foo { // Should not be an error class Helper { diff --git a/tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts b/tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts index 93d69444362..4eb23e5b6d3 100644 --- a/tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts +++ b/tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts @@ -1,35 +1,35 @@ -module M { +namespace M { export interface I { } } -module M { +namespace M { export class I { } } -module M { +namespace M { export function f() { } } -module M { +namespace M { export class f { } // error } -module M { +namespace M { function g() { } } -module M { +namespace M { export class g { } // no error } -module M { +namespace M { export class C { } } -module M { +namespace M { function C() { } // no error } -module M { +namespace M { export var v = 3; } -module M { +namespace M { export var v = 3; // error for redeclaring var in a different parent } @@ -37,11 +37,11 @@ class Foo { static x: number; } -module Foo { +namespace Foo { export var x: number; // error for redeclaring var in a different parent } -module N { +namespace N { export module F { var t; } diff --git a/tests/cases/compiler/duplicateIdentifiersAcrossFileBoundaries.ts b/tests/cases/compiler/duplicateIdentifiersAcrossFileBoundaries.ts index 94e5cd94ab1..1b65251f822 100644 --- a/tests/cases/compiler/duplicateIdentifiersAcrossFileBoundaries.ts +++ b/tests/cases/compiler/duplicateIdentifiersAcrossFileBoundaries.ts @@ -11,7 +11,7 @@ class Foo { static x: number; } -module N { +namespace N { export module F { var t; } @@ -24,7 +24,7 @@ function C2() { } // error -- cannot merge function with non-ambient class class f { } // error -- cannot merge function with non-ambient class var v = 3; -module Foo { +namespace Foo { export var x: number; // error for redeclaring var in a different parent } diff --git a/tests/cases/compiler/duplicateSymbolsExportMatching.ts b/tests/cases/compiler/duplicateSymbolsExportMatching.ts index 3c82b745f33..4e8123c2e87 100644 --- a/tests/cases/compiler/duplicateSymbolsExportMatching.ts +++ b/tests/cases/compiler/duplicateSymbolsExportMatching.ts @@ -1,27 +1,27 @@ //@module: amd -module M { +namespace M { export interface E { } interface I { } } -module M { +namespace M { export interface E { } // ok interface I { } // ok } // Doesn't match export visibility, but it's in a different parent, so it's ok -module M { +namespace M { interface E { } // ok export interface I { } // ok } -module N { +namespace N { interface I { } interface I { } // ok export interface E { } export interface E { } // ok } -module N2 { +namespace N2 { interface I { } export interface I { } // error export interface E { } @@ -29,8 +29,8 @@ module N2 { } // Should report error only once for instantiated module -module M { - module inst { +namespace M { + namespace inst { var t; } export module inst { // one error @@ -39,23 +39,23 @@ module M { } // Variables of the same / different type -module M2 { +namespace M2 { var v: string; export var v: string; // one error (visibility) var w: number; export var w: string; // two errors (visibility and type mismatch) } -module M { - module F { +namespace M { + namespace F { var t; } export function F() { } // Only one error for duplicate identifier (don't consider visibility) } -module M { +namespace M { class C { } - module C { } + namespace C { } export module C { // Two visibility errors (one for the clodule symbol, and one for the merged container symbol) var t; } diff --git a/tests/cases/compiler/duplicateVarAndImport.ts b/tests/cases/compiler/duplicateVarAndImport.ts index f8daf5ea9c9..c277648855e 100644 --- a/tests/cases/compiler/duplicateVarAndImport.ts +++ b/tests/cases/compiler/duplicateVarAndImport.ts @@ -1,5 +1,5 @@ // no error since module is not instantiated var a; -module M { } +namespace M { } import a = M; \ No newline at end of file diff --git a/tests/cases/compiler/duplicateVarAndImport2.ts b/tests/cases/compiler/duplicateVarAndImport2.ts index f42b2bcf50b..cf6479c09d6 100644 --- a/tests/cases/compiler/duplicateVarAndImport2.ts +++ b/tests/cases/compiler/duplicateVarAndImport2.ts @@ -1,4 +1,4 @@ // error since module is instantiated var a; -module M { export var x = 1; } +namespace M { export var x = 1; } import a = M; \ No newline at end of file diff --git a/tests/cases/compiler/duplicateVariablesByScope.ts b/tests/cases/compiler/duplicateVariablesByScope.ts index dc811130d4f..48c9dfd80ab 100644 --- a/tests/cases/compiler/duplicateVariablesByScope.ts +++ b/tests/cases/compiler/duplicateVariablesByScope.ts @@ -2,7 +2,7 @@ // duplicate local variables are only reported at global scope -module M { +namespace M { for (var j = 0; j < 10; j++) { } diff --git a/tests/cases/compiler/duplicateVariablesWithAny.ts b/tests/cases/compiler/duplicateVariablesWithAny.ts index cbed791dc50..ab9b7502b9a 100644 --- a/tests/cases/compiler/duplicateVariablesWithAny.ts +++ b/tests/cases/compiler/duplicateVariablesWithAny.ts @@ -5,7 +5,7 @@ var x = 2; //error var y = ""; var y; //error -module N { +namespace N { var x: any; var x = 2; //error diff --git a/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts b/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts index 03de4077caf..c037241f2d9 100644 --- a/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts +++ b/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts @@ -17,11 +17,11 @@ var y = ""; var z = 0; // @Filename: duplicateVarsAcrossFileBoundaries_4.ts -module P { } +namespace P { } import p = P; var q; // @Filename: duplicateVarsAcrossFileBoundaries_5.ts -module Q { } +namespace Q { } import q = Q; var p; \ No newline at end of file diff --git a/tests/cases/compiler/enumAssignmentCompat.ts b/tests/cases/compiler/enumAssignmentCompat.ts index d7539e7db85..55027e32757 100644 --- a/tests/cases/compiler/enumAssignmentCompat.ts +++ b/tests/cases/compiler/enumAssignmentCompat.ts @@ -1,4 +1,4 @@ -module W { +namespace W { export class D { } } diff --git a/tests/cases/compiler/enumAssignmentCompat2.ts b/tests/cases/compiler/enumAssignmentCompat2.ts index 71a96cfcfe1..a01db1d80aa 100644 --- a/tests/cases/compiler/enumAssignmentCompat2.ts +++ b/tests/cases/compiler/enumAssignmentCompat2.ts @@ -4,7 +4,7 @@ enum W { } -module W { +namespace W { export class D { } } diff --git a/tests/cases/compiler/enumBasics3.ts b/tests/cases/compiler/enumBasics3.ts index d0cb27c790e..d39c1c6f028 100644 --- a/tests/cases/compiler/enumBasics3.ts +++ b/tests/cases/compiler/enumBasics3.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export namespace N { export enum E1 { a = 1, @@ -7,7 +7,7 @@ module M { } } -module M { +namespace M { export namespace N { export enum E2 { b = M.N.E1.a, diff --git a/tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts b/tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts index 19cd98fd5e8..97c268f2bf9 100644 --- a/tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts +++ b/tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts @@ -1,20 +1,20 @@ -module X { +namespace X { export enum Foo { A, B } } -module Y { +namespace Y { export enum Foo { A, B } } -module Z { +namespace Z { export enum Foo { A = 1 << 1, B = 1 << 2, } } -module Ka { +namespace Ka { export enum Foo { A = 1 << 10, B = 1 << 11, diff --git a/tests/cases/compiler/enumsWithMultipleDeclarations3.ts b/tests/cases/compiler/enumsWithMultipleDeclarations3.ts index 108a0569afe..eb84498cdde 100644 --- a/tests/cases/compiler/enumsWithMultipleDeclarations3.ts +++ b/tests/cases/compiler/enumsWithMultipleDeclarations3.ts @@ -1,4 +1,4 @@ -module E { +namespace E { } enum E { diff --git a/tests/cases/compiler/es5ExportEqualsDts.ts b/tests/cases/compiler/es5ExportEqualsDts.ts index 1253c9ac220..3bb8cb2c046 100644 --- a/tests/cases/compiler/es5ExportEqualsDts.ts +++ b/tests/cases/compiler/es5ExportEqualsDts.ts @@ -9,7 +9,7 @@ class A { } } -module A { +namespace A { export interface B { } } diff --git a/tests/cases/compiler/es6ClassTest3.ts b/tests/cases/compiler/es6ClassTest3.ts index d02bcedc05b..392acbe9529 100644 --- a/tests/cases/compiler/es6ClassTest3.ts +++ b/tests/cases/compiler/es6ClassTest3.ts @@ -1,4 +1,4 @@ -module M { +namespace M { class Visibility { public foo() { }; private bar() { }; diff --git a/tests/cases/compiler/es6ClassTest5.ts b/tests/cases/compiler/es6ClassTest5.ts index 21c630c6f97..51b37575b0d 100644 --- a/tests/cases/compiler/es6ClassTest5.ts +++ b/tests/cases/compiler/es6ClassTest5.ts @@ -4,7 +4,7 @@ class C1T5 { return i; } } -module C2T5 {} +namespace C2T5 {} class bigClass { public break = 1; diff --git a/tests/cases/compiler/es6ExportClause.ts b/tests/cases/compiler/es6ExportClause.ts index a16e2c9e7aa..685ed75f3e0 100644 --- a/tests/cases/compiler/es6ExportClause.ts +++ b/tests/cases/compiler/es6ExportClause.ts @@ -6,11 +6,11 @@ class c { } interface i { } -module m { +namespace m { export var x = 10; } var x = 10; -module uninstantiated { +namespace uninstantiated { } export { c }; export { c as c2 }; diff --git a/tests/cases/compiler/es6ExportClauseInEs5.ts b/tests/cases/compiler/es6ExportClauseInEs5.ts index 675f302bcb6..b4688ed0624 100644 --- a/tests/cases/compiler/es6ExportClauseInEs5.ts +++ b/tests/cases/compiler/es6ExportClauseInEs5.ts @@ -7,11 +7,11 @@ class c { } interface i { } -module m { +namespace m { export var x = 10; } var x = 10; -module uninstantiated { +namespace uninstantiated { } export { c }; export { c as c2 }; diff --git a/tests/cases/compiler/es6ModuleClassDeclaration.ts b/tests/cases/compiler/es6ModuleClassDeclaration.ts index 3b36e53037f..846003a7cf5 100644 --- a/tests/cases/compiler/es6ModuleClassDeclaration.ts +++ b/tests/cases/compiler/es6ModuleClassDeclaration.ts @@ -72,7 +72,7 @@ export module m1 { new c3(); new c4(); } -module m2 { +namespace m2 { export class c3 { constructor() { } diff --git a/tests/cases/compiler/es6ModuleConst.ts b/tests/cases/compiler/es6ModuleConst.ts index 42bf24698a9..e4580337be9 100644 --- a/tests/cases/compiler/es6ModuleConst.ts +++ b/tests/cases/compiler/es6ModuleConst.ts @@ -9,7 +9,7 @@ export module m1 { const n = m1.k; const o: string = n, p = k; } -module m2 { +namespace m2 { export const k = a; export const l: string = b, m = k; const n = m1.k; diff --git a/tests/cases/compiler/es6ModuleConstEnumDeclaration.ts b/tests/cases/compiler/es6ModuleConstEnumDeclaration.ts index c3490093d3e..71bb7654c25 100644 --- a/tests/cases/compiler/es6ModuleConstEnumDeclaration.ts +++ b/tests/cases/compiler/es6ModuleConstEnumDeclaration.ts @@ -27,7 +27,7 @@ export module m1 { var x2 = e3.a; var y2 = e4.x; } -module m2 { +namespace m2 { export const enum e5 { a, b, diff --git a/tests/cases/compiler/es6ModuleConstEnumDeclaration2.ts b/tests/cases/compiler/es6ModuleConstEnumDeclaration2.ts index 6dddea09d8a..c2a7ddc8296 100644 --- a/tests/cases/compiler/es6ModuleConstEnumDeclaration2.ts +++ b/tests/cases/compiler/es6ModuleConstEnumDeclaration2.ts @@ -29,7 +29,7 @@ export module m1 { var x2 = e3.a; var y2 = e4.x; } -module m2 { +namespace m2 { export const enum e5 { a, b, diff --git a/tests/cases/compiler/es6ModuleEnumDeclaration.ts b/tests/cases/compiler/es6ModuleEnumDeclaration.ts index a0cebde9947..5e9b8362923 100644 --- a/tests/cases/compiler/es6ModuleEnumDeclaration.ts +++ b/tests/cases/compiler/es6ModuleEnumDeclaration.ts @@ -27,7 +27,7 @@ export module m1 { var x2 = e3.a; var y2 = e4.x; } -module m2 { +namespace m2 { export enum e5 { a, b, diff --git a/tests/cases/compiler/es6ModuleFunctionDeclaration.ts b/tests/cases/compiler/es6ModuleFunctionDeclaration.ts index 82eebb1580e..d1374741aed 100644 --- a/tests/cases/compiler/es6ModuleFunctionDeclaration.ts +++ b/tests/cases/compiler/es6ModuleFunctionDeclaration.ts @@ -16,7 +16,7 @@ export module m1 { foo3(); foo4(); } -module m2 { +namespace m2 { export function foo3() { } function foo4() { diff --git a/tests/cases/compiler/es6ModuleInternalImport.ts b/tests/cases/compiler/es6ModuleInternalImport.ts index 24e209a87f6..23be88466d9 100644 --- a/tests/cases/compiler/es6ModuleInternalImport.ts +++ b/tests/cases/compiler/es6ModuleInternalImport.ts @@ -11,7 +11,7 @@ export module m1 { var x = a1 + a2; var x2 = a3 + a4; } -module m2 { +namespace m2 { export import a3 = m.a; import a4 = m.a; var x = a1 + a2; diff --git a/tests/cases/compiler/es6ModuleLet.ts b/tests/cases/compiler/es6ModuleLet.ts index fc5dfc94bd5..1b0955315cb 100644 --- a/tests/cases/compiler/es6ModuleLet.ts +++ b/tests/cases/compiler/es6ModuleLet.ts @@ -9,7 +9,7 @@ export module m1 { let n = m1.k; let o: string = n, p = k; } -module m2 { +namespace m2 { export let k = a; export let l: string = b, m = k; let n = m1.k; diff --git a/tests/cases/compiler/es6ModuleModuleDeclaration.ts b/tests/cases/compiler/es6ModuleModuleDeclaration.ts index 99868f6087b..2ff326bc3d7 100644 --- a/tests/cases/compiler/es6ModuleModuleDeclaration.ts +++ b/tests/cases/compiler/es6ModuleModuleDeclaration.ts @@ -11,7 +11,7 @@ export module m1 { var y = 10; } } -module m2 { +namespace m2 { export var a = 10; var b = 10; export module innerExportedModule { diff --git a/tests/cases/compiler/es6ModuleVariableStatement.ts b/tests/cases/compiler/es6ModuleVariableStatement.ts index a3ae29fbe6a..0237d405f8e 100644 --- a/tests/cases/compiler/es6ModuleVariableStatement.ts +++ b/tests/cases/compiler/es6ModuleVariableStatement.ts @@ -9,7 +9,7 @@ export module m1 { var n = m1.k; var o: string = n, p = k; } -module m2 { +namespace m2 { export var k = a; export var l: string = b, m = k; var n = m1.k; diff --git a/tests/cases/compiler/escapedIdentifiers.ts b/tests/cases/compiler/escapedIdentifiers.ts index c58c59d9b42..c220bd19320 100644 --- a/tests/cases/compiler/escapedIdentifiers.ts +++ b/tests/cases/compiler/escapedIdentifiers.ts @@ -22,7 +22,7 @@ b ++; \u0062 ++; // modules -module moduleType1 { +namespace moduleType1 { export var baz1: number; } module moduleType\u0032 { diff --git a/tests/cases/compiler/exportAlreadySeen.ts b/tests/cases/compiler/exportAlreadySeen.ts index f5d38f0d170..80cd4f6a6e1 100644 --- a/tests/cases/compiler/exportAlreadySeen.ts +++ b/tests/cases/compiler/exportAlreadySeen.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export export var x = 1; export export function f() { } diff --git a/tests/cases/compiler/exportAssignClassAndModule.ts b/tests/cases/compiler/exportAssignClassAndModule.ts index 0ac65454b00..bea2a35afb4 100644 --- a/tests/cases/compiler/exportAssignClassAndModule.ts +++ b/tests/cases/compiler/exportAssignClassAndModule.ts @@ -3,7 +3,7 @@ class Foo { x: Foo.Bar; } -module Foo { +namespace Foo { export interface Bar { } } diff --git a/tests/cases/compiler/exportAssignmentError.ts b/tests/cases/compiler/exportAssignmentError.ts index a2d8267841c..69d4777cda2 100644 --- a/tests/cases/compiler/exportAssignmentError.ts +++ b/tests/cases/compiler/exportAssignmentError.ts @@ -1,6 +1,6 @@ //@module: amd // @Filename: exportEqualsModule_A.ts -module M { +namespace M { export var x; } diff --git a/tests/cases/compiler/exportAssignmentInternalModule.ts b/tests/cases/compiler/exportAssignmentInternalModule.ts index a4911e5b7db..e1ef4fcc6d4 100644 --- a/tests/cases/compiler/exportAssignmentInternalModule.ts +++ b/tests/cases/compiler/exportAssignmentInternalModule.ts @@ -1,6 +1,6 @@ //@module: amd // @Filename: exportAssignmentInternalModule_A.ts -module M { +namespace M { export var x; } diff --git a/tests/cases/compiler/exportAssignmentWithImportStatementPrivacyError.ts b/tests/cases/compiler/exportAssignmentWithImportStatementPrivacyError.ts index b9a00bad3d9..1d7a9f3bbc2 100644 --- a/tests/cases/compiler/exportAssignmentWithImportStatementPrivacyError.ts +++ b/tests/cases/compiler/exportAssignmentWithImportStatementPrivacyError.ts @@ -1,5 +1,5 @@ //@module: amd -module m2 { +namespace m2 { export interface connectModule { (res, req, next): void; } @@ -10,7 +10,7 @@ module m2 { } -module M { +namespace M { export var server: { (): m2.connectExport; test1: m2.connectModule; diff --git a/tests/cases/compiler/exportDeclarationInInternalModule.ts b/tests/cases/compiler/exportDeclarationInInternalModule.ts index 0b9ba7600a4..b033aec7992 100644 --- a/tests/cases/compiler/exportDeclarationInInternalModule.ts +++ b/tests/cases/compiler/exportDeclarationInInternalModule.ts @@ -7,11 +7,11 @@ class Bbb { class Aaa extends Bbb { } -module Aaa { +namespace Aaa { export class SomeType { } } -module Bbb { +namespace Bbb { export class SomeType { } export * from Aaa; // this line causes the nullref diff --git a/tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts b/tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts index a1d1cab94b6..2c97853c38b 100644 --- a/tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts +++ b/tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts @@ -1,6 +1,6 @@ // @target: ES6 -module m { +namespace m { export interface foo { } } diff --git a/tests/cases/compiler/exportEqualErrorType.ts b/tests/cases/compiler/exportEqualErrorType.ts index f23a203a544..d5195c411ac 100644 --- a/tests/cases/compiler/exportEqualErrorType.ts +++ b/tests/cases/compiler/exportEqualErrorType.ts @@ -1,6 +1,6 @@ //@module: amd // @Filename: exportEqualErrorType_0.ts -module server { +namespace server { export interface connectModule { (res, req, next): void; } diff --git a/tests/cases/compiler/exportEqualMemberMissing.ts b/tests/cases/compiler/exportEqualMemberMissing.ts index 89b328f0536..0751aea85e8 100644 --- a/tests/cases/compiler/exportEqualMemberMissing.ts +++ b/tests/cases/compiler/exportEqualMemberMissing.ts @@ -1,6 +1,6 @@ // @module: commonjs // @Filename: exportEqualMemberMissing_0.ts -module server { +namespace server { export interface connectModule { (res, req, next): void; } diff --git a/tests/cases/compiler/exportImportAndClodule.ts b/tests/cases/compiler/exportImportAndClodule.ts index fd60ae5c92c..d8effb9900c 100644 --- a/tests/cases/compiler/exportImportAndClodule.ts +++ b/tests/cases/compiler/exportImportAndClodule.ts @@ -1,4 +1,4 @@ -module K { +namespace K { export class L { constructor(public name: string) { } } @@ -10,7 +10,7 @@ module K { } } } -module M { +namespace M { export import D = K.L; } var o: { name: string }; diff --git a/tests/cases/compiler/exportImportNonInstantiatedModule.ts b/tests/cases/compiler/exportImportNonInstantiatedModule.ts index 2c5d59dea6d..87720406e8f 100644 --- a/tests/cases/compiler/exportImportNonInstantiatedModule.ts +++ b/tests/cases/compiler/exportImportNonInstantiatedModule.ts @@ -1,8 +1,8 @@ -module A { +namespace A { export interface I { x: number } } -module B { +namespace B { export import A1 = A } diff --git a/tests/cases/compiler/exportPrivateType.ts b/tests/cases/compiler/exportPrivateType.ts index 9103d3afca5..4c69b16f2de 100644 --- a/tests/cases/compiler/exportPrivateType.ts +++ b/tests/cases/compiler/exportPrivateType.ts @@ -1,4 +1,4 @@ -module foo { +namespace foo { class C1 { x: string; y: C1; diff --git a/tests/cases/compiler/extBaseClass1.ts b/tests/cases/compiler/extBaseClass1.ts index 44ec01bf31b..659cbcb9693 100644 --- a/tests/cases/compiler/extBaseClass1.ts +++ b/tests/cases/compiler/extBaseClass1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class B { public x=10; } @@ -7,12 +7,12 @@ module M { } } -module M { +namespace M { export class C2 extends B { } } -module N { +namespace N { export class C3 extends M.B { } } diff --git a/tests/cases/compiler/extBaseClass2.ts b/tests/cases/compiler/extBaseClass2.ts index 17ec5917a6d..f907ac3ff95 100644 --- a/tests/cases/compiler/extBaseClass2.ts +++ b/tests/cases/compiler/extBaseClass2.ts @@ -1,9 +1,9 @@ -module N { +namespace N { export class C4 extends M.B { } } -module M { +namespace M { export class C5 extends B { } } diff --git a/tests/cases/compiler/externalModuleResolution.ts b/tests/cases/compiler/externalModuleResolution.ts index 8c0d3bf7e3f..d7b9baaa675 100644 --- a/tests/cases/compiler/externalModuleResolution.ts +++ b/tests/cases/compiler/externalModuleResolution.ts @@ -6,7 +6,7 @@ declare module M1 { export = M1 // @Filename: foo.ts -module M2 { +namespace M2 { export var Y = 1; } export = M2 diff --git a/tests/cases/compiler/externalModuleResolution2.ts b/tests/cases/compiler/externalModuleResolution2.ts index 28d9c44f061..78b9df55e79 100644 --- a/tests/cases/compiler/externalModuleResolution2.ts +++ b/tests/cases/compiler/externalModuleResolution2.ts @@ -1,6 +1,6 @@ //@module: commonjs // @Filename: foo.ts -module M2 { +namespace M2 { export var X = 1; } export = M2 diff --git a/tests/cases/compiler/fatArrowSelf.ts b/tests/cases/compiler/fatArrowSelf.ts index f1662fb994f..28e63dba1f4 100644 --- a/tests/cases/compiler/fatArrowSelf.ts +++ b/tests/cases/compiler/fatArrowSelf.ts @@ -1,4 +1,4 @@ -module Events { +namespace Events { export interface ListenerCallback { (value:any):void; } @@ -8,7 +8,7 @@ module Events { } } -module Consumer { +namespace Consumer { class EventEmitterConsummer { constructor (private emitter: Events.EventEmitter) { } diff --git a/tests/cases/compiler/forInModule.ts b/tests/cases/compiler/forInModule.ts index dfe90d70d39..92ef2b0eb1b 100644 --- a/tests/cases/compiler/forInModule.ts +++ b/tests/cases/compiler/forInModule.ts @@ -1,4 +1,4 @@ -module Foo { +namespace Foo { for (var i = 0; i < 1; i++) { i+i; } diff --git a/tests/cases/compiler/funClodule.ts b/tests/cases/compiler/funClodule.ts index 6182e172157..f99301d6a39 100644 --- a/tests/cases/compiler/funClodule.ts +++ b/tests/cases/compiler/funClodule.ts @@ -13,7 +13,7 @@ declare function foo2(); // Should error function foo3() { } -module foo3 { +namespace foo3 { export function x(): any { } } class foo3 { } // Should error \ No newline at end of file diff --git a/tests/cases/compiler/funcdecl.ts b/tests/cases/compiler/funcdecl.ts index b09bb2e41d1..b4ef1a3cbaf 100644 --- a/tests/cases/compiler/funcdecl.ts +++ b/tests/cases/compiler/funcdecl.ts @@ -49,7 +49,7 @@ var withOverloadSignature = overload1; function f(n: () => void) { } -module m2 { +namespace m2 { export function foo(n: () => void ) { } diff --git a/tests/cases/compiler/functionCall5.ts b/tests/cases/compiler/functionCall5.ts index 084bf9bac13..7b253d0c78f 100644 --- a/tests/cases/compiler/functionCall5.ts +++ b/tests/cases/compiler/functionCall5.ts @@ -1,3 +1,3 @@ -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} function foo():m1.c1{return new m1.c1();}; var x = foo(); \ No newline at end of file diff --git a/tests/cases/compiler/functionCall7.ts b/tests/cases/compiler/functionCall7.ts index c37dc55093b..e36c4ec36ae 100644 --- a/tests/cases/compiler/functionCall7.ts +++ b/tests/cases/compiler/functionCall7.ts @@ -1,4 +1,4 @@ -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} function foo(a:m1.c1){ a.a = 1; }; var myC = new m1.c1(); foo(myC); diff --git a/tests/cases/compiler/functionInIfStatementInModule.ts b/tests/cases/compiler/functionInIfStatementInModule.ts index 1bb53ee9b19..485928b0b98 100644 --- a/tests/cases/compiler/functionInIfStatementInModule.ts +++ b/tests/cases/compiler/functionInIfStatementInModule.ts @@ -1,5 +1,5 @@ -module Midori +namespace Midori { if (false) { function Foo(src) diff --git a/tests/cases/compiler/functionTypeArgumentArrayAssignment.ts b/tests/cases/compiler/functionTypeArgumentArrayAssignment.ts index 91cf2d551b9..577e4428b26 100644 --- a/tests/cases/compiler/functionTypeArgumentArrayAssignment.ts +++ b/tests/cases/compiler/functionTypeArgumentArrayAssignment.ts @@ -1,4 +1,4 @@ -module test { +namespace test { interface Array { foo: T; length: number; diff --git a/tests/cases/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.ts b/tests/cases/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.ts index 3964804796e..97855bc1099 100644 --- a/tests/cases/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.ts +++ b/tests/cases/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.ts @@ -1,6 +1,6 @@ function fn() { return fn.n; } -module fn { +namespace fn { export var n = 1; } diff --git a/tests/cases/compiler/funduleSplitAcrossFiles.ts b/tests/cases/compiler/funduleSplitAcrossFiles.ts index 605acb98f9b..fffce243c89 100644 --- a/tests/cases/compiler/funduleSplitAcrossFiles.ts +++ b/tests/cases/compiler/funduleSplitAcrossFiles.ts @@ -2,7 +2,7 @@ function D() { } // @Filename: funduleSplitAcrossFiles_module.ts -module D { +namespace D { export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/cases/compiler/fuzzy.ts b/tests/cases/compiler/fuzzy.ts index 1f921fa0c7b..91bc359dcd1 100644 --- a/tests/cases/compiler/fuzzy.ts +++ b/tests/cases/compiler/fuzzy.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export interface I { works:()=>R; alsoWorks:()=>R; diff --git a/tests/cases/compiler/generativeRecursionWithTypeOf.ts b/tests/cases/compiler/generativeRecursionWithTypeOf.ts index 31da58ce8f8..827aa3a4d68 100644 --- a/tests/cases/compiler/generativeRecursionWithTypeOf.ts +++ b/tests/cases/compiler/generativeRecursionWithTypeOf.ts @@ -3,7 +3,7 @@ class C { type: T; } -module M { +namespace M { export function f(x: typeof C) { return new x(); } diff --git a/tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts b/tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts index c8ce2d01be0..a796daefecc 100644 --- a/tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts +++ b/tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts @@ -1,4 +1,4 @@ -module Underscore { +namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; } diff --git a/tests/cases/compiler/genericCallbacksAndClassHierarchy.ts b/tests/cases/compiler/genericCallbacksAndClassHierarchy.ts index c59fcb17d92..3f1eba3777a 100644 --- a/tests/cases/compiler/genericCallbacksAndClassHierarchy.ts +++ b/tests/cases/compiler/genericCallbacksAndClassHierarchy.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export interface I { subscribe(callback: (newValue: T) => void ): any; } diff --git a/tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts b/tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts index b5fc7b356e1..36cae5e5cbc 100644 --- a/tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts +++ b/tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts @@ -1,7 +1,7 @@ // @declaration: true -module foo { +namespace foo { export interface IFoo { } } -module bar { +namespace bar { export class Foo implements foo.IFoo { } } diff --git a/tests/cases/compiler/genericClassWithStaticFactory.ts b/tests/cases/compiler/genericClassWithStaticFactory.ts index c5ab1032b6f..48b6bf43293 100644 --- a/tests/cases/compiler/genericClassWithStaticFactory.ts +++ b/tests/cases/compiler/genericClassWithStaticFactory.ts @@ -1,4 +1,4 @@ -module Editor { +namespace Editor { export class List { public next: List; diff --git a/tests/cases/compiler/genericClassesInModule.ts b/tests/cases/compiler/genericClassesInModule.ts index e8cf415af8f..4cc150e42b0 100644 --- a/tests/cases/compiler/genericClassesInModule.ts +++ b/tests/cases/compiler/genericClassesInModule.ts @@ -1,6 +1,6 @@ // @declaration: true -module Foo { +namespace Foo { export class B{ } diff --git a/tests/cases/compiler/genericCloduleInModule.ts b/tests/cases/compiler/genericCloduleInModule.ts index bddd1a76673..bd5157835cf 100644 --- a/tests/cases/compiler/genericCloduleInModule.ts +++ b/tests/cases/compiler/genericCloduleInModule.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class B { foo() { } static bar() { } diff --git a/tests/cases/compiler/genericCloduleInModule2.ts b/tests/cases/compiler/genericCloduleInModule2.ts index 28e522217bb..1303f8effef 100644 --- a/tests/cases/compiler/genericCloduleInModule2.ts +++ b/tests/cases/compiler/genericCloduleInModule2.ts @@ -1,11 +1,11 @@ -module A { +namespace A { export class B { foo() { } static bar() { } } } -module A { +namespace A { export module B { export var x = 1; } diff --git a/tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts b/tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts index 1fcc60f865d..3826196ea59 100644 --- a/tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts +++ b/tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts @@ -1,4 +1,4 @@ -module EndGate { +namespace EndGate { export interface ICloneable { Clone(): any; } diff --git a/tests/cases/compiler/genericFunduleInModule.ts b/tests/cases/compiler/genericFunduleInModule.ts index e6e8759bd6d..60b814a88a0 100644 --- a/tests/cases/compiler/genericFunduleInModule.ts +++ b/tests/cases/compiler/genericFunduleInModule.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export function B(x: T) { return x; } export module B { export var x = 1; diff --git a/tests/cases/compiler/genericFunduleInModule2.ts b/tests/cases/compiler/genericFunduleInModule2.ts index 52f01c72dc9..a98c600214b 100644 --- a/tests/cases/compiler/genericFunduleInModule2.ts +++ b/tests/cases/compiler/genericFunduleInModule2.ts @@ -1,8 +1,8 @@ -module A { +namespace A { export function B(x: T) { return x; } } -module A { +namespace A { export module B { export var x = 1; } diff --git a/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts b/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts index 6d8270e6304..122bc49ee8c 100644 --- a/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts +++ b/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter.ts @@ -1,5 +1,5 @@ function foo(y: T, z: U) { return y; } -module foo { +namespace foo { export var x: T; var y = 1; } diff --git a/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts b/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts index 188b6b7c4d8..f16f185bd5b 100644 --- a/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts +++ b/tests/cases/compiler/genericMergedDeclarationUsingTypeParameter2.ts @@ -1,5 +1,5 @@ class foo { constructor(x: T) { } } -module foo { +namespace foo { export var x: T; var y = 1; } diff --git a/tests/cases/compiler/genericOfACloduleType1.ts b/tests/cases/compiler/genericOfACloduleType1.ts index 781cedab357..b4e26fa14d7 100644 --- a/tests/cases/compiler/genericOfACloduleType1.ts +++ b/tests/cases/compiler/genericOfACloduleType1.ts @@ -1,5 +1,5 @@ class G{ bar(x: T) { return x; } } -module M { +namespace M { export class C { foo() { } } export module C { export class X { diff --git a/tests/cases/compiler/genericOfACloduleType2.ts b/tests/cases/compiler/genericOfACloduleType2.ts index ea3418cc9e2..c40c7024d31 100644 --- a/tests/cases/compiler/genericOfACloduleType2.ts +++ b/tests/cases/compiler/genericOfACloduleType2.ts @@ -1,5 +1,5 @@ class G{ bar(x: T) { return x; } } -module M { +namespace M { export class C { foo() { } } export module C { export class X { @@ -10,6 +10,6 @@ module M { g1.bar(null).foo(); // no error } -module N { +namespace N { var g2 = new G() } \ No newline at end of file diff --git a/tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts b/tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts index 60bc06a8e2e..980b03ba234 100644 --- a/tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts +++ b/tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts @@ -1,4 +1,4 @@ -module TypeScript2 { +namespace TypeScript2 { export interface DeclKind { }; export interface PullTypesymbol { }; export interface SymbolLinkKind { }; diff --git a/tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts b/tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts index 3d94ffbdbe6..95f3bfa1914 100644 --- a/tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts +++ b/tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts @@ -1,11 +1,11 @@ -module TypeScript { +namespace TypeScript { export class MemberName { static create(arg1: any, arg2?: any, arg3?: any): MemberName { } } } -module TypeScript { +namespace TypeScript { export class PullSymbol { public type: PullTypeSymbol = null; } diff --git a/tests/cases/compiler/genericTypeArgumentInference1.ts b/tests/cases/compiler/genericTypeArgumentInference1.ts index dbdf503d76f..a448916d85a 100644 --- a/tests/cases/compiler/genericTypeArgumentInference1.ts +++ b/tests/cases/compiler/genericTypeArgumentInference1.ts @@ -1,4 +1,4 @@ -module Underscore { +namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; } diff --git a/tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts b/tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts index c80106b3dd6..e6ed2305b9b 100644 --- a/tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts +++ b/tests/cases/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts @@ -16,7 +16,7 @@ declare class _ { each(iterator: _.ListIterator, context?: any): void; } -module MyModule { +namespace MyModule { export class MyClass { public get myGetter() { var obj:any = {}; diff --git a/tests/cases/compiler/giant.ts b/tests/cases/compiler/giant.ts index 09d1787fcaa..361075e6c53 100644 --- a/tests/cases/compiler/giant.ts +++ b/tests/cases/compiler/giant.ts @@ -78,7 +78,7 @@ interface I { p7(pa1, pa2): void; p7? (pa1, pa2): void; } -module M { +namespace M { var V; function F() { }; class C { @@ -142,12 +142,12 @@ module M { p7(pa1, pa2): void; p7? (pa1, pa2): void; } - module M { + namespace M { var V; function F() { }; class C { }; interface I { }; - module M { }; + namespace M { }; export var eV; export function eF() { }; export class eC { }; @@ -226,7 +226,7 @@ module M { function F() { }; class C { }; interface I { }; - module M { }; + namespace M { }; export var eV; export function eF() { }; export class eC { }; @@ -265,7 +265,7 @@ module M { function F() { }; class C { } interface I { } - module M { } + namespace M { } export var eV; export function eF() { }; export class eC { } @@ -400,12 +400,12 @@ export module eM { p7(pa1, pa2): void; p7? (pa1, pa2): void; } - module M { + namespace M { var V; function F() { }; class C { }; interface I { }; - module M { }; + namespace M { }; export var eV; export function eF() { }; export class eC { }; @@ -484,7 +484,7 @@ export module eM { function F() { }; class C { }; interface I { }; - module M { }; + namespace M { }; export var eV; export function eF() { }; export class eC { }; @@ -523,7 +523,7 @@ export module eM { function F() { }; class C { } interface I { } - module M { } + namespace M { } export var eV; export function eF() { }; export class eC { } @@ -604,12 +604,12 @@ export declare module eaM { p7(pa1, pa2): void; p7? (pa1, pa2): void; } - module M { + namespace M { var V; function F() { }; class C { } interface I { } - module M { } + namespace M { } export var eV; export function eF() { }; export class eC { } @@ -674,7 +674,7 @@ export declare module eaM { var V; function F() { }; class C { } - module M { } + namespace M { } export var eV; export function eF() { }; export class eC { } diff --git a/tests/cases/compiler/global.ts b/tests/cases/compiler/global.ts index 5e4d8ab693f..23157da26cb 100644 --- a/tests/cases/compiler/global.ts +++ b/tests/cases/compiler/global.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export function f(y:number) { return x+y; } diff --git a/tests/cases/compiler/implicitAnyAmbients.ts b/tests/cases/compiler/implicitAnyAmbients.ts index 8786f5f93e4..8588421e256 100644 --- a/tests/cases/compiler/implicitAnyAmbients.ts +++ b/tests/cases/compiler/implicitAnyAmbients.ts @@ -20,7 +20,7 @@ declare module m { foo3(x: any): any; } - module n { + namespace n { var y; // error } diff --git a/tests/cases/compiler/implicitAnyInAmbientDeclaration.ts b/tests/cases/compiler/implicitAnyInAmbientDeclaration.ts index 3d9325c04cf..f4592ae01c7 100644 --- a/tests/cases/compiler/implicitAnyInAmbientDeclaration.ts +++ b/tests/cases/compiler/implicitAnyInAmbientDeclaration.ts @@ -1,5 +1,5 @@ //@noimplicitany: true -module Test { +namespace Test { declare class C { public publicMember; // this should be an error private privateMember; // this should not be an error diff --git a/tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule.ts b/tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule.ts index 0743ac6f4ca..8620578bf7e 100644 --- a/tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule.ts +++ b/tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule.ts @@ -5,7 +5,7 @@ export module m { // @Filename: importAliasAnExternalModuleInsideAnInternalModule_file1.ts import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0'); -module m_private { +namespace m_private { //import r2 = require('m'); // would be error export import C = r; // no error C.m.foo(); diff --git a/tests/cases/compiler/importAliasWithDottedName.ts b/tests/cases/compiler/importAliasWithDottedName.ts index 4f741182b56..5a00afd1c14 100644 --- a/tests/cases/compiler/importAliasWithDottedName.ts +++ b/tests/cases/compiler/importAliasWithDottedName.ts @@ -1,11 +1,11 @@ -module M { +namespace M { export var x = 1; export module N { export var y = 2; } } -module A { +namespace A { import N = M.N; var r = N.y; var r2 = M.N.y; diff --git a/tests/cases/compiler/importAnImport.ts b/tests/cases/compiler/importAnImport.ts index 2fd8e4e7d02..e1550118db4 100644 --- a/tests/cases/compiler/importAnImport.ts +++ b/tests/cases/compiler/importAnImport.ts @@ -2,6 +2,6 @@ module c.a.b { import ma = a; } -module m0 { +namespace m0 { import m8 = c.a.b.ma; } \ No newline at end of file diff --git a/tests/cases/compiler/importAndVariableDeclarationConflict1.ts b/tests/cases/compiler/importAndVariableDeclarationConflict1.ts index 9bb368fe87e..6de01d9ea58 100644 --- a/tests/cases/compiler/importAndVariableDeclarationConflict1.ts +++ b/tests/cases/compiler/importAndVariableDeclarationConflict1.ts @@ -1,4 +1,4 @@ -module m { +namespace m { export var m = ''; } diff --git a/tests/cases/compiler/importAndVariableDeclarationConflict2.ts b/tests/cases/compiler/importAndVariableDeclarationConflict2.ts index ca6f3cf55c3..64ce717b2c0 100644 --- a/tests/cases/compiler/importAndVariableDeclarationConflict2.ts +++ b/tests/cases/compiler/importAndVariableDeclarationConflict2.ts @@ -1,4 +1,4 @@ -module m { +namespace m { export var m = ''; } diff --git a/tests/cases/compiler/importAndVariableDeclarationConflict3.ts b/tests/cases/compiler/importAndVariableDeclarationConflict3.ts index 3bca8655f4c..f5088cbfe96 100644 --- a/tests/cases/compiler/importAndVariableDeclarationConflict3.ts +++ b/tests/cases/compiler/importAndVariableDeclarationConflict3.ts @@ -1,4 +1,4 @@ -module m { +namespace m { export var m = ''; } diff --git a/tests/cases/compiler/importAndVariableDeclarationConflict4.ts b/tests/cases/compiler/importAndVariableDeclarationConflict4.ts index 0ab02a8715f..81205b9b279 100644 --- a/tests/cases/compiler/importAndVariableDeclarationConflict4.ts +++ b/tests/cases/compiler/importAndVariableDeclarationConflict4.ts @@ -1,4 +1,4 @@ -module m { +namespace m { export var m = ''; } diff --git a/tests/cases/compiler/importDeclWithClassModifiers.ts b/tests/cases/compiler/importDeclWithClassModifiers.ts index fa83d44de32..2a5f92d5a30 100644 --- a/tests/cases/compiler/importDeclWithClassModifiers.ts +++ b/tests/cases/compiler/importDeclWithClassModifiers.ts @@ -1,5 +1,5 @@ //@module: amd -module x { +namespace x { interface c { } } diff --git a/tests/cases/compiler/importDeclWithDeclareModifier.ts b/tests/cases/compiler/importDeclWithDeclareModifier.ts index a800be73797..9c16b9bfafb 100644 --- a/tests/cases/compiler/importDeclWithDeclareModifier.ts +++ b/tests/cases/compiler/importDeclWithDeclareModifier.ts @@ -1,4 +1,4 @@ -module x { +namespace x { interface c { } } diff --git a/tests/cases/compiler/importDeclWithExportModifier.ts b/tests/cases/compiler/importDeclWithExportModifier.ts index 7f4b909a8ef..47c04399563 100644 --- a/tests/cases/compiler/importDeclWithExportModifier.ts +++ b/tests/cases/compiler/importDeclWithExportModifier.ts @@ -1,5 +1,5 @@ //@module: amd -module x { +namespace x { interface c { } } diff --git a/tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts b/tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts index 853cc4e9e59..1ec51288cea 100644 --- a/tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts +++ b/tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts @@ -1,5 +1,5 @@ //@module: commonjs -module x { +namespace x { interface c { } } diff --git a/tests/cases/compiler/importDeclarationInModuleDeclaration1.ts b/tests/cases/compiler/importDeclarationInModuleDeclaration1.ts index 9f7f9ed7ccd..73f380d6ebc 100644 --- a/tests/cases/compiler/importDeclarationInModuleDeclaration1.ts +++ b/tests/cases/compiler/importDeclarationInModuleDeclaration1.ts @@ -1,3 +1,3 @@ -module m2 { +namespace m2 { import m3 = require("use_glo_M1_public"); } \ No newline at end of file diff --git a/tests/cases/compiler/importInTypePosition.ts b/tests/cases/compiler/importInTypePosition.ts index 9460e4fc8f5..d7be902466b 100644 --- a/tests/cases/compiler/importInTypePosition.ts +++ b/tests/cases/compiler/importInTypePosition.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } } @@ -6,12 +6,12 @@ module A { } // no code gen expected -module B { +namespace B { import a = A; //Error generates 'var = ;' } // no code gen expected -module C { +namespace C { import a = A; //Error generates 'var = ;' var m: typeof a; diff --git a/tests/cases/compiler/importOnAliasedIdentifiers.ts b/tests/cases/compiler/importOnAliasedIdentifiers.ts index bfacd19b6b1..010d3f3242c 100644 --- a/tests/cases/compiler/importOnAliasedIdentifiers.ts +++ b/tests/cases/compiler/importOnAliasedIdentifiers.ts @@ -1,8 +1,8 @@ -module A { +namespace A { export interface X { s: string } export var X: X; } -module B { +namespace B { interface A { n: number } import Y = A; // Alias only for module A import Z = A.X; // Alias for both type and member A.X diff --git a/tests/cases/compiler/import_reference-exported-alias.ts b/tests/cases/compiler/import_reference-exported-alias.ts index f04b2c2b323..b409b620021 100644 --- a/tests/cases/compiler/import_reference-exported-alias.ts +++ b/tests/cases/compiler/import_reference-exported-alias.ts @@ -1,5 +1,5 @@ // @Filename: file1.ts -module App { +namespace App { export module Services { export class UserServices { public getUserName(): string { diff --git a/tests/cases/compiler/importedModuleAddToGlobal.ts b/tests/cases/compiler/importedModuleAddToGlobal.ts index 4bff5df0e58..ceedaea5325 100644 --- a/tests/cases/compiler/importedModuleAddToGlobal.ts +++ b/tests/cases/compiler/importedModuleAddToGlobal.ts @@ -1,16 +1,16 @@ // Binding for an import statement in a typeref position is being added to the global scope // Shouldn't compile b.B is not defined in C -module A { +namespace A { import b = B; import c = C; } -module B { +namespace B { import a = A; export class B { } } -module C { +namespace C { import a = A; function hello(): b.B { return null; } } \ No newline at end of file diff --git a/tests/cases/compiler/indexIntoEnum.ts b/tests/cases/compiler/indexIntoEnum.ts index 70dc85c46b1..80100d52dc6 100644 --- a/tests/cases/compiler/indexIntoEnum.ts +++ b/tests/cases/compiler/indexIntoEnum.ts @@ -1,4 +1,4 @@ -module M { +namespace M { enum E { } diff --git a/tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts b/tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts index ea279444fb9..8b5f53695fb 100644 --- a/tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts +++ b/tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts @@ -1,8 +1,8 @@ -module M { +namespace M { export class C1 { } export class C2 { } } -module N { +namespace N { export class D1 extends M.C1 { } export class D2 extends M.C2 { } } diff --git a/tests/cases/compiler/inheritedModuleMembersForClodule.ts b/tests/cases/compiler/inheritedModuleMembersForClodule.ts index 8af61bfa123..294ee2ae4e9 100644 --- a/tests/cases/compiler/inheritedModuleMembersForClodule.ts +++ b/tests/cases/compiler/inheritedModuleMembersForClodule.ts @@ -7,7 +7,7 @@ class C { class D extends C { } -module D { +namespace D { export function foo(): number { return 0; }; diff --git a/tests/cases/compiler/innerAliases.ts b/tests/cases/compiler/innerAliases.ts index ac551bd6dee..8343d53f28d 100644 --- a/tests/cases/compiler/innerAliases.ts +++ b/tests/cases/compiler/innerAliases.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export module B { export module C { export class Class1 {} @@ -6,7 +6,7 @@ module A { } } -module D { +namespace D { import inner = A.B.C; var c1 = new inner.Class1(); diff --git a/tests/cases/compiler/innerAliases2.ts b/tests/cases/compiler/innerAliases2.ts index 9bf08bd8faf..78ef92a8e5b 100644 --- a/tests/cases/compiler/innerAliases2.ts +++ b/tests/cases/compiler/innerAliases2.ts @@ -1,11 +1,11 @@ -module _provider { +namespace _provider { export class UsefulClass { public foo() { } } } -module consumer { +namespace consumer { import provider = _provider; var g:provider.UsefulClass= null; diff --git a/tests/cases/compiler/innerBoundLambdaEmit.ts b/tests/cases/compiler/innerBoundLambdaEmit.ts index f6b9697a72f..7c76fc07855 100644 --- a/tests/cases/compiler/innerBoundLambdaEmit.ts +++ b/tests/cases/compiler/innerBoundLambdaEmit.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class Foo { } var bar = () => { }; diff --git a/tests/cases/compiler/innerExtern.ts b/tests/cases/compiler/innerExtern.ts index d906079e508..5f6f3064114 100644 --- a/tests/cases/compiler/innerExtern.ts +++ b/tests/cases/compiler/innerExtern.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export declare module BB { export var Elephant; } diff --git a/tests/cases/compiler/innerFunc.ts b/tests/cases/compiler/innerFunc.ts index 6501ac5b4e2..afaef11a0ea 100644 --- a/tests/cases/compiler/innerFunc.ts +++ b/tests/cases/compiler/innerFunc.ts @@ -3,7 +3,7 @@ function salt() { return pepper(); } -module M { +namespace M { export function tungsten() { function oxygen() { return 6; }; return oxygen(); diff --git a/tests/cases/compiler/innerModExport1.ts b/tests/cases/compiler/innerModExport1.ts index 7ffeb614e9b..986fc455721 100644 --- a/tests/cases/compiler/innerModExport1.ts +++ b/tests/cases/compiler/innerModExport1.ts @@ -1,4 +1,4 @@ -module Outer { +namespace Outer { // inner mod 1 var non_export_var: number; diff --git a/tests/cases/compiler/innerModExport2.ts b/tests/cases/compiler/innerModExport2.ts index dfcf8ba490a..e9b2dac1ea6 100644 --- a/tests/cases/compiler/innerModExport2.ts +++ b/tests/cases/compiler/innerModExport2.ts @@ -1,4 +1,4 @@ -module Outer { +namespace Outer { // inner mod 1 var non_export_var: number; diff --git a/tests/cases/compiler/interMixingModulesInterfaces0.ts b/tests/cases/compiler/interMixingModulesInterfaces0.ts index 2c3c9a26493..9a47364d96a 100644 --- a/tests/cases/compiler/interMixingModulesInterfaces0.ts +++ b/tests/cases/compiler/interMixingModulesInterfaces0.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export module B { export function createB(): B { diff --git a/tests/cases/compiler/interMixingModulesInterfaces1.ts b/tests/cases/compiler/interMixingModulesInterfaces1.ts index b0cca5f2ee6..21b4ca4f505 100644 --- a/tests/cases/compiler/interMixingModulesInterfaces1.ts +++ b/tests/cases/compiler/interMixingModulesInterfaces1.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface B { name: string; diff --git a/tests/cases/compiler/interMixingModulesInterfaces2.ts b/tests/cases/compiler/interMixingModulesInterfaces2.ts index 91736eb95e1..09960b256ce 100644 --- a/tests/cases/compiler/interMixingModulesInterfaces2.ts +++ b/tests/cases/compiler/interMixingModulesInterfaces2.ts @@ -1,11 +1,11 @@ -module A { +namespace A { export interface B { name: string; value: number; } - module B { + namespace B { export function createB(): B { return null; } diff --git a/tests/cases/compiler/interMixingModulesInterfaces3.ts b/tests/cases/compiler/interMixingModulesInterfaces3.ts index e32787c927d..1bf0dc24152 100644 --- a/tests/cases/compiler/interMixingModulesInterfaces3.ts +++ b/tests/cases/compiler/interMixingModulesInterfaces3.ts @@ -1,6 +1,6 @@ -module A { +namespace A { - module B { + namespace B { export function createB(): B { return null; } diff --git a/tests/cases/compiler/interMixingModulesInterfaces4.ts b/tests/cases/compiler/interMixingModulesInterfaces4.ts index 6a717e10d08..8a2c36a7bb3 100644 --- a/tests/cases/compiler/interMixingModulesInterfaces4.ts +++ b/tests/cases/compiler/interMixingModulesInterfaces4.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export module B { export function createB(): number { diff --git a/tests/cases/compiler/interMixingModulesInterfaces5.ts b/tests/cases/compiler/interMixingModulesInterfaces5.ts index 6ebf84c241b..a1e2389606c 100644 --- a/tests/cases/compiler/interMixingModulesInterfaces5.ts +++ b/tests/cases/compiler/interMixingModulesInterfaces5.ts @@ -1,4 +1,4 @@ -module A { +namespace A { interface B { name: string; diff --git a/tests/cases/compiler/interfaceAssignmentCompat.ts b/tests/cases/compiler/interfaceAssignmentCompat.ts index 030463cd9a5..d384dc530ae 100644 --- a/tests/cases/compiler/interfaceAssignmentCompat.ts +++ b/tests/cases/compiler/interfaceAssignmentCompat.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export enum Color { Green, Blue, diff --git a/tests/cases/compiler/interfaceDeclaration2.ts b/tests/cases/compiler/interfaceDeclaration2.ts index 35c4337db0a..b81550239d1 100644 --- a/tests/cases/compiler/interfaceDeclaration2.ts +++ b/tests/cases/compiler/interfaceDeclaration2.ts @@ -1,5 +1,5 @@ interface I1 { } -module I1 { } +namespace I1 { } interface I2 { } class I2 { } diff --git a/tests/cases/compiler/interfaceDeclaration3.ts b/tests/cases/compiler/interfaceDeclaration3.ts index 5f944c12696..eb447ca91c7 100644 --- a/tests/cases/compiler/interfaceDeclaration3.ts +++ b/tests/cases/compiler/interfaceDeclaration3.ts @@ -1,7 +1,7 @@ //@module: amd interface I1 { item:number; } -module M1 { +namespace M1 { interface I1 { item:string; } interface I2 { item:number; } class C1 implements I1 { diff --git a/tests/cases/compiler/interfaceDeclaration4.ts b/tests/cases/compiler/interfaceDeclaration4.ts index e82549c9f2c..2f18fdeccaf 100644 --- a/tests/cases/compiler/interfaceDeclaration4.ts +++ b/tests/cases/compiler/interfaceDeclaration4.ts @@ -1,6 +1,6 @@ // Import this module when test harness supports external modules. Also remove the internal module below. // import Foo = require("interfaceDeclaration5") -module Foo { +namespace Foo { export interface I1 { item: string; } export class C1 { } } diff --git a/tests/cases/compiler/interfaceInReopenedModule.ts b/tests/cases/compiler/interfaceInReopenedModule.ts index 05f3736566f..775e522d2b3 100644 --- a/tests/cases/compiler/interfaceInReopenedModule.ts +++ b/tests/cases/compiler/interfaceInReopenedModule.ts @@ -1,8 +1,8 @@ -module m { +namespace m { } // In second instance of same module, exported interface is not visible -module m { +namespace m { interface f {} export class n { private n: f; diff --git a/tests/cases/compiler/interfaceNameAsIdentifier.ts b/tests/cases/compiler/interfaceNameAsIdentifier.ts index 484a627fb56..34e4e7da30e 100644 --- a/tests/cases/compiler/interfaceNameAsIdentifier.ts +++ b/tests/cases/compiler/interfaceNameAsIdentifier.ts @@ -3,7 +3,7 @@ interface C { } C(); -module m2 { +namespace m2 { export interface C { (): void; } diff --git a/tests/cases/compiler/internalAliasClass.ts b/tests/cases/compiler/internalAliasClass.ts index bdf702d93dd..4f881bc089c 100644 --- a/tests/cases/compiler/internalAliasClass.ts +++ b/tests/cases/compiler/internalAliasClass.ts @@ -1,10 +1,10 @@ // @declaration: true -module a { +namespace a { export class c { } } -module c { +namespace c { import b = a.c; export var x: b = new b(); } \ No newline at end of file diff --git a/tests/cases/compiler/internalAliasEnum.ts b/tests/cases/compiler/internalAliasEnum.ts index 310c8b07f5b..83bcbc7af7f 100644 --- a/tests/cases/compiler/internalAliasEnum.ts +++ b/tests/cases/compiler/internalAliasEnum.ts @@ -1,5 +1,5 @@ // @declaration: true -module a { +namespace a { export enum weekend { Friday, Saturday, @@ -7,7 +7,7 @@ module a { } } -module c { +namespace c { import b = a.weekend; export var bVal: b = b.Sunday; } diff --git a/tests/cases/compiler/internalAliasFunction.ts b/tests/cases/compiler/internalAliasFunction.ts index c62ab5b8248..cdf70ff6057 100644 --- a/tests/cases/compiler/internalAliasFunction.ts +++ b/tests/cases/compiler/internalAliasFunction.ts @@ -1,11 +1,11 @@ // @declaration: true -module a { +namespace a { export function foo(x: number) { return x; } } -module c { +namespace c { import b = a.foo; export var bVal = b(10); export var bVal2 = b; diff --git a/tests/cases/compiler/internalAliasInitializedModule.ts b/tests/cases/compiler/internalAliasInitializedModule.ts index af4d88db3b2..04dcf806e70 100644 --- a/tests/cases/compiler/internalAliasInitializedModule.ts +++ b/tests/cases/compiler/internalAliasInitializedModule.ts @@ -1,12 +1,12 @@ // @declaration: true -module a { +namespace a { export module b { export class c { } } } -module c { +namespace c { import b = a.b; export var x: b.c = new b.c(); } \ No newline at end of file diff --git a/tests/cases/compiler/internalAliasInterface.ts b/tests/cases/compiler/internalAliasInterface.ts index e4dae7ffeb3..1e9205de023 100644 --- a/tests/cases/compiler/internalAliasInterface.ts +++ b/tests/cases/compiler/internalAliasInterface.ts @@ -1,10 +1,10 @@ // @declaration: true -module a { +namespace a { export interface I { } } -module c { +namespace c { import b = a.I; export var x: b; } diff --git a/tests/cases/compiler/internalAliasUninitializedModule.ts b/tests/cases/compiler/internalAliasUninitializedModule.ts index ad4c28b4c72..430b137d5b6 100644 --- a/tests/cases/compiler/internalAliasUninitializedModule.ts +++ b/tests/cases/compiler/internalAliasUninitializedModule.ts @@ -1,5 +1,5 @@ // @declaration: true -module a { +namespace a { export module b { export interface I { foo(); @@ -7,7 +7,7 @@ module a { } } -module c { +namespace c { import b = a.b; export var x: b.I; x.foo(); diff --git a/tests/cases/compiler/internalAliasVar.ts b/tests/cases/compiler/internalAliasVar.ts index 3dc8cb8cf9f..e9fa82f0835 100644 --- a/tests/cases/compiler/internalAliasVar.ts +++ b/tests/cases/compiler/internalAliasVar.ts @@ -1,9 +1,9 @@ // @declaration: true -module a { +namespace a { export var x = 10; } -module c { +namespace c { import b = a.x; export var bVal = b; } diff --git a/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts b/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts index ebabd3e1f94..9f37dac6586 100644 --- a/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts +++ b/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts @@ -1,12 +1,12 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } export var a = 10; } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts b/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts index 3817ebbd979..44d8010366c 100644 --- a/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts +++ b/tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts @@ -1,11 +1,11 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } export var a = 10; } -module B { +namespace B { import Y = A; } diff --git a/tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts b/tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts index 79e8f652afb..761962c2966 100644 --- a/tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts +++ b/tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts @@ -1,9 +1,9 @@ -module A { +namespace A { export interface X { s: string } export var a = 10; } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts b/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts index 6546804ef7e..8d195bc62c7 100644 --- a/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts +++ b/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts @@ -1,11 +1,11 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts b/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts index f264b5df7f9..b5d0ff67256 100644 --- a/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts +++ b/tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts @@ -1,10 +1,10 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } } -module B { +namespace B { import Y = A; } diff --git a/tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts b/tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts index adce53349a9..2dac103b2d3 100644 --- a/tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts +++ b/tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts @@ -1,8 +1,8 @@ -module A { +namespace A { export interface X { s: string } } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/tests/cases/compiler/intrinsics.ts b/tests/cases/compiler/intrinsics.ts index 2391e45e83b..0a1f9431b4d 100644 --- a/tests/cases/compiler/intrinsics.ts +++ b/tests/cases/compiler/intrinsics.ts @@ -2,7 +2,7 @@ var hasOwnProperty: hasOwnProperty; // Error -module m1 { +namespace m1 { export var __proto__; interface __proto__ {} diff --git a/tests/cases/compiler/isDeclarationVisibleNodeKinds.ts b/tests/cases/compiler/isDeclarationVisibleNodeKinds.ts index 0434c40ee6a..5351379b55c 100644 --- a/tests/cases/compiler/isDeclarationVisibleNodeKinds.ts +++ b/tests/cases/compiler/isDeclarationVisibleNodeKinds.ts @@ -2,28 +2,28 @@ // @target: es5 // Function types -module schema { +namespace schema { export function createValidator1(schema: any): (data: T) => T { return undefined; } } // Constructor types -module schema { +namespace schema { export function createValidator2(schema: any): new (data: T) => T { return undefined; } } // union types -module schema { +namespace schema { export function createValidator3(schema: any): number | { new (data: T): T; } { return undefined; } } // Array types -module schema { +namespace schema { export function createValidator4(schema: any): { new (data: T): T; }[] { return undefined; } @@ -31,35 +31,35 @@ module schema { // TypeLiterals -module schema { +namespace schema { export function createValidator5(schema: any): { new (data: T): T } { return undefined; } } // Tuple types -module schema { +namespace schema { export function createValidator6(schema: any): [ new (data: T) => T, number] { return undefined; } } // Paren Types -module schema { +namespace schema { export function createValidator7(schema: any): (new (data: T)=>T )[] { return undefined; } } // Type reference -module schema { +namespace schema { export function createValidator8(schema: any): Array<{ (data: T) : T}> { return undefined; } } -module schema { +namespace schema { export class T { get createValidator9(): (data: T) => T { return undefined; diff --git a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts index f7d1a9070f6..ee19b2050fb 100644 --- a/tests/cases/compiler/jsFileCompilationModuleSyntax.ts +++ b/tests/cases/compiler/jsFileCompilationModuleSyntax.ts @@ -1,3 +1,3 @@ // @allowJs: true // @filename: a.js -module M { } \ No newline at end of file +namespace M { } \ No newline at end of file diff --git a/tests/cases/compiler/lambdaPropSelf.ts b/tests/cases/compiler/lambdaPropSelf.ts index 0a1f5c19392..2b80447755a 100644 --- a/tests/cases/compiler/lambdaPropSelf.ts +++ b/tests/cases/compiler/lambdaPropSelf.ts @@ -17,6 +17,6 @@ class T { } } -module M { +namespace M { var x = this; } diff --git a/tests/cases/compiler/letAndVarRedeclaration.ts b/tests/cases/compiler/letAndVarRedeclaration.ts index aaf2ce1a68c..6615de3cff7 100644 --- a/tests/cases/compiler/letAndVarRedeclaration.ts +++ b/tests/cases/compiler/letAndVarRedeclaration.ts @@ -22,13 +22,13 @@ function f1() { } } -module M0 { +namespace M0 { let x2; var x2; function x2() { } } -module M1 { +namespace M1 { let x2; { var x2; @@ -48,7 +48,7 @@ function f2() { } } -module M2 { +namespace M2 { let x11; for (var x11; ;) { } diff --git a/tests/cases/compiler/letDeclarations-scopes.ts b/tests/cases/compiler/letDeclarations-scopes.ts index b050a5e9bd0..1597bb441c0 100644 --- a/tests/cases/compiler/letDeclarations-scopes.ts +++ b/tests/cases/compiler/letDeclarations-scopes.ts @@ -112,7 +112,7 @@ var F3 = function () { }; // modules -module m { +namespace m { let l = 0; n = l; diff --git a/tests/cases/compiler/letDeclarations-validContexts.ts b/tests/cases/compiler/letDeclarations-validContexts.ts index 2a4022901c1..c7558d2c0ac 100644 --- a/tests/cases/compiler/letDeclarations-validContexts.ts +++ b/tests/cases/compiler/letDeclarations-validContexts.ts @@ -88,7 +88,7 @@ var F3 = function () { }; // modules -module m { +namespace m { let l22 = 0; { @@ -139,7 +139,7 @@ function f3() { } } -module m3 { +namespace m3 { label: let l34 = 0; { label2: let l35 = 0; diff --git a/tests/cases/compiler/letDeclarations2.ts b/tests/cases/compiler/letDeclarations2.ts index e7e09f0849a..9b38845651a 100644 --- a/tests/cases/compiler/letDeclarations2.ts +++ b/tests/cases/compiler/letDeclarations2.ts @@ -1,7 +1,7 @@ // @target: ES6 // @declaration: true -module M { +namespace M { let l1 = "s"; export let l2 = 0; } \ No newline at end of file diff --git a/tests/cases/compiler/letKeepNamesOfTopLevelItems.ts b/tests/cases/compiler/letKeepNamesOfTopLevelItems.ts index b5fc5fc031c..b1c9eac7499 100644 --- a/tests/cases/compiler/letKeepNamesOfTopLevelItems.ts +++ b/tests/cases/compiler/letKeepNamesOfTopLevelItems.ts @@ -3,6 +3,6 @@ function foo() { let x; } -module A { +namespace A { let x; } \ No newline at end of file diff --git a/tests/cases/compiler/libMembers.ts b/tests/cases/compiler/libMembers.ts index 4470041632e..38111f20be3 100644 --- a/tests/cases/compiler/libMembers.ts +++ b/tests/cases/compiler/libMembers.ts @@ -3,7 +3,7 @@ s.substring(0); s.substring(3,4); s.subby(12); // error unresolved String.fromCharCode(12); -module M { +namespace M { export class C { } var a=new C[]; diff --git a/tests/cases/compiler/listFailure.ts b/tests/cases/compiler/listFailure.ts index a70bfe95797..2f7e7a9ea2d 100644 --- a/tests/cases/compiler/listFailure.ts +++ b/tests/cases/compiler/listFailure.ts @@ -1,4 +1,4 @@ -module Editor { +namespace Editor { export class Buffer { lines: List = ListMakeHead(); diff --git a/tests/cases/compiler/localImportNameVsGlobalName.ts b/tests/cases/compiler/localImportNameVsGlobalName.ts index 1153bba6ba1..59ce499b359 100644 --- a/tests/cases/compiler/localImportNameVsGlobalName.ts +++ b/tests/cases/compiler/localImportNameVsGlobalName.ts @@ -1,8 +1,8 @@ -module Keyboard { +namespace Keyboard { export enum Key { UP, DOWN, LEFT, RIGHT } } -module App { +namespace App { import Key = Keyboard.Key; export function foo(key: Key): void {} diff --git a/tests/cases/compiler/memberScope.ts b/tests/cases/compiler/memberScope.ts index 102c7884250..305a5eaacfa 100644 --- a/tests/cases/compiler/memberScope.ts +++ b/tests/cases/compiler/memberScope.ts @@ -1,4 +1,4 @@ -module Salt { +namespace Salt { export class Pepper {} export module Basil { } var z = Basil.Pepper; diff --git a/tests/cases/compiler/mergedDeclarations1.ts b/tests/cases/compiler/mergedDeclarations1.ts index 18e31c0d1d9..fd29e1ac595 100644 --- a/tests/cases/compiler/mergedDeclarations1.ts +++ b/tests/cases/compiler/mergedDeclarations1.ts @@ -5,7 +5,7 @@ interface Point { function point(x: number, y: number): Point { return { x: x, y: y }; } -module point { +namespace point { export var origin = point(0, 0); export function equals(p1: Point, p2: Point) { return p1.x == p2.x && p1.y == p2.y; diff --git a/tests/cases/compiler/mergedDeclarations2.ts b/tests/cases/compiler/mergedDeclarations2.ts index 745b4f01fc5..f009e9e3200 100644 --- a/tests/cases/compiler/mergedDeclarations2.ts +++ b/tests/cases/compiler/mergedDeclarations2.ts @@ -5,6 +5,6 @@ enum Foo { a = b } -module Foo { +namespace Foo { export var x = b } \ No newline at end of file diff --git a/tests/cases/compiler/mergedDeclarations3.ts b/tests/cases/compiler/mergedDeclarations3.ts index b2754c62277..41a1b32091c 100644 --- a/tests/cases/compiler/mergedDeclarations3.ts +++ b/tests/cases/compiler/mergedDeclarations3.ts @@ -1,34 +1,34 @@ -module M { +namespace M { export enum Color { Red, Green } } -module M { +namespace M { export module Color { export var Blue = 4; } } var p = M.Color.Blue; // ok -module M { +namespace M { export function foo() { } } -module M { - module foo { +namespace M { + namespace foo { export var x = 1; } } -module M { +namespace M { export module foo { export var y = 2 } } -module M { - module foo { +namespace M { + namespace foo { export var z = 1; } } diff --git a/tests/cases/compiler/mergedDeclarations4.ts b/tests/cases/compiler/mergedDeclarations4.ts index a45384415a2..7bec0f4fd10 100644 --- a/tests/cases/compiler/mergedDeclarations4.ts +++ b/tests/cases/compiler/mergedDeclarations4.ts @@ -1,11 +1,11 @@ -module M { +namespace M { export function f() { } f(); M.f(); var r = f.hello; } -module M { +namespace M { export module f { export var hello = 1; } diff --git a/tests/cases/compiler/mergedModuleDeclarationCodeGen4.ts b/tests/cases/compiler/mergedModuleDeclarationCodeGen4.ts index f6c17b1e673..d53fc363636 100644 --- a/tests/cases/compiler/mergedModuleDeclarationCodeGen4.ts +++ b/tests/cases/compiler/mergedModuleDeclarationCodeGen4.ts @@ -1,4 +1,4 @@ -module superContain { +namespace superContain { export module contain { export module my.buz { export module data { diff --git a/tests/cases/compiler/mergedModuleDeclarationWithSharedExportedVar.ts b/tests/cases/compiler/mergedModuleDeclarationWithSharedExportedVar.ts index d075ae378b5..6e36f2e0207 100644 --- a/tests/cases/compiler/mergedModuleDeclarationWithSharedExportedVar.ts +++ b/tests/cases/compiler/mergedModuleDeclarationWithSharedExportedVar.ts @@ -1,7 +1,7 @@ -module M { +namespace M { export var v = 10; v; } -module M { +namespace M { v; } \ No newline at end of file diff --git a/tests/cases/compiler/metadataOfClassFromModule.ts b/tests/cases/compiler/metadataOfClassFromModule.ts index aca356f2247..a7aa5fbcce0 100644 --- a/tests/cases/compiler/metadataOfClassFromModule.ts +++ b/tests/cases/compiler/metadataOfClassFromModule.ts @@ -1,7 +1,7 @@ // @experimentalDecorators: true // @emitDecoratorMetadata: true // @target: es5 -module MyModule { +namespace MyModule { export function inject(target: any, key: string): void { } diff --git a/tests/cases/compiler/methodContainingLocalFunction.ts b/tests/cases/compiler/methodContainingLocalFunction.ts index 8acddf7511b..420ac612b2c 100644 --- a/tests/cases/compiler/methodContainingLocalFunction.ts +++ b/tests/cases/compiler/methodContainingLocalFunction.ts @@ -33,7 +33,7 @@ class C { } } -module M { +namespace M { export function exhibitBug() { function localFunction() { } var x: { (): void; }; diff --git a/tests/cases/compiler/missingReturnStatement.ts b/tests/cases/compiler/missingReturnStatement.ts index 5e513aa6d7a..3c2af2b12b8 100644 --- a/tests/cases/compiler/missingReturnStatement.ts +++ b/tests/cases/compiler/missingReturnStatement.ts @@ -1,4 +1,4 @@ -module Test { +namespace Test { export class Bug { public foo():string { } diff --git a/tests/cases/compiler/mixedExports.ts b/tests/cases/compiler/mixedExports.ts index c3ad54846a9..82486352761 100644 --- a/tests/cases/compiler/mixedExports.ts +++ b/tests/cases/compiler/mixedExports.ts @@ -9,7 +9,7 @@ declare module M1 { interface Foo {} } -module A { +namespace A { interface X {x} export module X {} interface X {y} diff --git a/tests/cases/compiler/mixingFunctionAndAmbientModule1.ts b/tests/cases/compiler/mixingFunctionAndAmbientModule1.ts index 199e3ac7dfc..9a9c29d3165 100644 --- a/tests/cases/compiler/mixingFunctionAndAmbientModule1.ts +++ b/tests/cases/compiler/mixingFunctionAndAmbientModule1.ts @@ -1,11 +1,11 @@ -module A { +namespace A { declare module My { export var x: number; } function My(s: string) { } } -module B { +namespace B { declare module My { export var x: number; } @@ -13,14 +13,14 @@ module B { function My(s: any) { } } -module C { +namespace C { declare module My { export var x: number; } declare function My(s: boolean); } -module D { +namespace D { declare module My { export var x: number; } @@ -29,7 +29,7 @@ module D { } -module E { +namespace E { declare module My { export var x: number; } diff --git a/tests/cases/compiler/moduleAliasInterface.ts b/tests/cases/compiler/moduleAliasInterface.ts index d92599cae09..36e0abc4d4d 100644 --- a/tests/cases/compiler/moduleAliasInterface.ts +++ b/tests/cases/compiler/moduleAliasInterface.ts @@ -1,4 +1,4 @@ -module _modes { +namespace _modes { export interface IMode { } @@ -10,7 +10,7 @@ module _modes { // _modes. // produces an internal error - please implement in derived class -module editor { +namespace editor { import modes = _modes; var i : modes.IMode; @@ -25,7 +25,7 @@ module editor { } import modesOuter = _modes; -module editor2 { +namespace editor2 { var i : modesOuter.IMode; @@ -34,19 +34,19 @@ module editor2 { } - module Foo { export class Bar{} } + namespace Foo { export class Bar{} } class Bug2 { constructor(p1: Foo.Bar, p2: modesOuter.Mode) { } } } -module A1 { +namespace A1 { export interface A1I1 {} export class A1C1 {} } -module B1 { +namespace B1 { import A1Alias1 = A1; var i : A1Alias1.A1I1; diff --git a/tests/cases/compiler/moduleAndInterfaceSharingName.ts b/tests/cases/compiler/moduleAndInterfaceSharingName.ts index 4e4456672b3..af18876294e 100644 --- a/tests/cases/compiler/moduleAndInterfaceSharingName.ts +++ b/tests/cases/compiler/moduleAndInterfaceSharingName.ts @@ -1,4 +1,4 @@ -module X { +namespace X { export module Y { export interface Z { } } diff --git a/tests/cases/compiler/moduleAndInterfaceSharingName2.ts b/tests/cases/compiler/moduleAndInterfaceSharingName2.ts index f5775be4679..58d0597fb14 100644 --- a/tests/cases/compiler/moduleAndInterfaceSharingName2.ts +++ b/tests/cases/compiler/moduleAndInterfaceSharingName2.ts @@ -1,4 +1,4 @@ -module X { +namespace X { export module Y { export interface Z { } } diff --git a/tests/cases/compiler/moduleAndInterfaceSharingName3.ts b/tests/cases/compiler/moduleAndInterfaceSharingName3.ts index 9db8182c51f..3197728de02 100644 --- a/tests/cases/compiler/moduleAndInterfaceSharingName3.ts +++ b/tests/cases/compiler/moduleAndInterfaceSharingName3.ts @@ -1,4 +1,4 @@ -module X { +namespace X { export module Y { export interface Z { } } diff --git a/tests/cases/compiler/moduleAndInterfaceSharingName4.ts b/tests/cases/compiler/moduleAndInterfaceSharingName4.ts index 7be873e9444..afd99322400 100644 --- a/tests/cases/compiler/moduleAndInterfaceSharingName4.ts +++ b/tests/cases/compiler/moduleAndInterfaceSharingName4.ts @@ -1,7 +1,7 @@ declare module D3 { var x: D3.Color.Color; - module Color { + namespace Color { export interface Color { darker: Color; } diff --git a/tests/cases/compiler/moduleAndInterfaceWithSameName.ts b/tests/cases/compiler/moduleAndInterfaceWithSameName.ts index 6e265a58a75..b9c81acaa9a 100644 --- a/tests/cases/compiler/moduleAndInterfaceWithSameName.ts +++ b/tests/cases/compiler/moduleAndInterfaceWithSameName.ts @@ -1,4 +1,4 @@ -module Foo1 { +namespace Foo1 { export module Bar { export var x = 42; } @@ -8,8 +8,8 @@ module Foo1 { } } -module Foo2 { - module Bar { +namespace Foo2 { + namespace Bar { export var x = 42; } @@ -20,7 +20,7 @@ module Foo2 { var z2 = Foo2.Bar.y; // Error for using interface name as a value. -module Foo3 { +namespace Foo3 { export module Bar { export var x = 42; } diff --git a/tests/cases/compiler/moduleAsBaseType.ts b/tests/cases/compiler/moduleAsBaseType.ts index 5ff686635f0..20afdcc29f3 100644 --- a/tests/cases/compiler/moduleAsBaseType.ts +++ b/tests/cases/compiler/moduleAsBaseType.ts @@ -1,4 +1,4 @@ -module M {} +namespace M {} class C extends M {} interface I extends M { } class C2 implements M { } \ No newline at end of file diff --git a/tests/cases/compiler/moduleAssignmentCompat1.ts b/tests/cases/compiler/moduleAssignmentCompat1.ts index 4adeba4b69a..e5134a439b1 100644 --- a/tests/cases/compiler/moduleAssignmentCompat1.ts +++ b/tests/cases/compiler/moduleAssignmentCompat1.ts @@ -1,7 +1,7 @@ -module A { +namespace A { export class C { } } -module B { +namespace B { export class C { } class D { } } diff --git a/tests/cases/compiler/moduleAssignmentCompat2.ts b/tests/cases/compiler/moduleAssignmentCompat2.ts index 49a931db909..985e90cba4a 100644 --- a/tests/cases/compiler/moduleAssignmentCompat2.ts +++ b/tests/cases/compiler/moduleAssignmentCompat2.ts @@ -1,7 +1,7 @@ -module A { +namespace A { export class C { } } -module B { +namespace B { export class C { } export class D { } } diff --git a/tests/cases/compiler/moduleAssignmentCompat3.ts b/tests/cases/compiler/moduleAssignmentCompat3.ts index c641f48a2e6..8ea60fa662f 100644 --- a/tests/cases/compiler/moduleAssignmentCompat3.ts +++ b/tests/cases/compiler/moduleAssignmentCompat3.ts @@ -1,7 +1,7 @@ -module A { +namespace A { export var x = 1; } -module B { +namespace B { export var x = ""; } diff --git a/tests/cases/compiler/moduleAssignmentCompat4.ts b/tests/cases/compiler/moduleAssignmentCompat4.ts index 5e30d4e2c80..b041ea5d9ed 100644 --- a/tests/cases/compiler/moduleAssignmentCompat4.ts +++ b/tests/cases/compiler/moduleAssignmentCompat4.ts @@ -1,9 +1,9 @@ -module A { +namespace A { export module M { class C { } } } -module B { +namespace B { export module M { export class D { } } diff --git a/tests/cases/compiler/moduleClassArrayCodeGenTest.ts b/tests/cases/compiler/moduleClassArrayCodeGenTest.ts index 3d30b9a9fa8..07a9b8dd7c2 100644 --- a/tests/cases/compiler/moduleClassArrayCodeGenTest.ts +++ b/tests/cases/compiler/moduleClassArrayCodeGenTest.ts @@ -1,6 +1,6 @@ // Invalid code gen for Array of Module class -module M +namespace M { export class A { } class B{ } diff --git a/tests/cases/compiler/moduleCodeGenTest3.ts b/tests/cases/compiler/moduleCodeGenTest3.ts index 29127a29e7a..2004ccb8464 100644 --- a/tests/cases/compiler/moduleCodeGenTest3.ts +++ b/tests/cases/compiler/moduleCodeGenTest3.ts @@ -1,3 +1,3 @@ -module Baz { export var x = "hello"; } +namespace Baz { export var x = "hello"; } Baz.x = "goodbye"; \ No newline at end of file diff --git a/tests/cases/compiler/moduleCrashBug1.ts b/tests/cases/compiler/moduleCrashBug1.ts index fa394c83c76..dabbd0264ff 100644 --- a/tests/cases/compiler/moduleCrashBug1.ts +++ b/tests/cases/compiler/moduleCrashBug1.ts @@ -1,4 +1,4 @@ -module _modes { +namespace _modes { export interface IMode { } @@ -10,7 +10,7 @@ module _modes { //_modes. // produces an internal error - please implement in derived class -module editor { +namespace editor { import modes = _modes; } diff --git a/tests/cases/compiler/moduleIdentifiers.ts b/tests/cases/compiler/moduleIdentifiers.ts index 1d9de2f16d2..b612c527fda 100644 --- a/tests/cases/compiler/moduleIdentifiers.ts +++ b/tests/cases/compiler/moduleIdentifiers.ts @@ -1,4 +1,4 @@ -module M { +namespace M { interface P { x: number; y: number; } export var a = 1 } diff --git a/tests/cases/compiler/moduleImport.ts b/tests/cases/compiler/moduleImport.ts index ddc41dd17c5..1ec12a366df 100644 --- a/tests/cases/compiler/moduleImport.ts +++ b/tests/cases/compiler/moduleImport.ts @@ -5,7 +5,7 @@ } } -module X { +namespace X { import ABC = A.B.C; export function pong(x: number) { if (x > 0) ABC.ping(x-1); diff --git a/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts b/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts index 1c4da98ed84..f5e5e663d8d 100644 --- a/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts +++ b/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts @@ -6,7 +6,7 @@ } } -module TypeScript { +namespace TypeScript { export interface ISyntaxElement { }; export interface ISyntaxToken { }; @@ -22,7 +22,7 @@ module TypeScript { } } -module TypeScript { +namespace TypeScript { export class SyntaxNode { public findToken(position: number, includeSkippedTokens: boolean = false): PositionedToken { var positionedToken = this.findTokenInternal(null, position, 0); diff --git a/tests/cases/compiler/moduleMemberWithoutTypeAnnotation2.ts b/tests/cases/compiler/moduleMemberWithoutTypeAnnotation2.ts index fec033dd8c0..1d5dfbec59e 100644 --- a/tests/cases/compiler/moduleMemberWithoutTypeAnnotation2.ts +++ b/tests/cases/compiler/moduleMemberWithoutTypeAnnotation2.ts @@ -1,4 +1,4 @@ -module TypeScript { +namespace TypeScript { export module CompilerDiagnostics { export interface IDiagnosticWriter { diff --git a/tests/cases/compiler/moduleMerge.ts b/tests/cases/compiler/moduleMerge.ts index 94ca217fc11..de1ae22d581 100644 --- a/tests/cases/compiler/moduleMerge.ts +++ b/tests/cases/compiler/moduleMerge.ts @@ -1,6 +1,6 @@ // This should not compile both B classes are in the same module this should be a collission -module A +namespace A { class B { @@ -11,7 +11,7 @@ module A } } -module A +namespace A { export class B { diff --git a/tests/cases/compiler/moduleNewExportBug.ts b/tests/cases/compiler/moduleNewExportBug.ts index b696a284038..37575a9117d 100644 --- a/tests/cases/compiler/moduleNewExportBug.ts +++ b/tests/cases/compiler/moduleNewExportBug.ts @@ -1,4 +1,4 @@ -module mod1 { +namespace mod1 { interface mInt { new (bar:any):any; foo (bar:any):any; diff --git a/tests/cases/compiler/moduleNoEmit.ts b/tests/cases/compiler/moduleNoEmit.ts index 7c811ed7c4c..29b8c51ca7d 100644 --- a/tests/cases/compiler/moduleNoEmit.ts +++ b/tests/cases/compiler/moduleNoEmit.ts @@ -1,3 +1,3 @@ -module Foo { +namespace Foo { 1+1; } \ No newline at end of file diff --git a/tests/cases/compiler/moduleOuterQualification.ts b/tests/cases/compiler/moduleOuterQualification.ts index 08cdd34addd..bd315843125 100644 --- a/tests/cases/compiler/moduleOuterQualification.ts +++ b/tests/cases/compiler/moduleOuterQualification.ts @@ -2,7 +2,7 @@ declare module outer { interface Beta { } - module inner { + namespace inner { // .d.ts emit: should be 'extends outer.Beta' export interface Beta extends outer.Beta { } } diff --git a/tests/cases/compiler/moduleProperty1.ts b/tests/cases/compiler/moduleProperty1.ts index 8005b6ed3e9..6dc399edeab 100644 --- a/tests/cases/compiler/moduleProperty1.ts +++ b/tests/cases/compiler/moduleProperty1.ts @@ -1,10 +1,10 @@ -module M { +namespace M { var x=10; // variable local to this module body var y=x; // property visible only in module export var z=y; // property visible to any code } -module M2 { +namespace M2 { var x = 10; // variable local to this module body private y = x; // can't use private in modules export var z = y; // property visible to any code diff --git a/tests/cases/compiler/moduleProperty2.ts b/tests/cases/compiler/moduleProperty2.ts index 16a2c13f8d0..2603148161d 100644 --- a/tests/cases/compiler/moduleProperty2.ts +++ b/tests/cases/compiler/moduleProperty2.ts @@ -1,4 +1,4 @@ -module M { +namespace M { function f() { var x; } @@ -8,7 +8,7 @@ module M { var test2=y; // y visible because same module } -module N { +namespace N { var test3=M.y; // nope y private property of M var test4=M.z; // ok public property of M } \ No newline at end of file diff --git a/tests/cases/compiler/moduleRedifinitionErrors.ts b/tests/cases/compiler/moduleRedifinitionErrors.ts index 5539d787220..e8e94cf5eec 100644 --- a/tests/cases/compiler/moduleRedifinitionErrors.ts +++ b/tests/cases/compiler/moduleRedifinitionErrors.ts @@ -1,4 +1,4 @@ class A { } -module A { +namespace A { } diff --git a/tests/cases/compiler/moduleReopenedTypeOtherBlock.ts b/tests/cases/compiler/moduleReopenedTypeOtherBlock.ts index cebd2613236..6179d7763f5 100644 --- a/tests/cases/compiler/moduleReopenedTypeOtherBlock.ts +++ b/tests/cases/compiler/moduleReopenedTypeOtherBlock.ts @@ -1,7 +1,7 @@ -module M { +namespace M { export class C1 { } export interface I { n: number; } } -module M { +namespace M { export class C2 { f(): I { return null; } } } diff --git a/tests/cases/compiler/moduleReopenedTypeSameBlock.ts b/tests/cases/compiler/moduleReopenedTypeSameBlock.ts index 5cae6d6dbf4..e63aba22e9a 100644 --- a/tests/cases/compiler/moduleReopenedTypeSameBlock.ts +++ b/tests/cases/compiler/moduleReopenedTypeSameBlock.ts @@ -1,5 +1,5 @@ -module M { export class C1 { } } -module M { +namespace M { export class C1 { } } +namespace M { export interface I { n: number; } export class C2 { f(): I { return null; } } } diff --git a/tests/cases/compiler/moduleScopingBug.ts b/tests/cases/compiler/moduleScopingBug.ts index 838318f8f76..3b33be8e183 100644 --- a/tests/cases/compiler/moduleScopingBug.ts +++ b/tests/cases/compiler/moduleScopingBug.ts @@ -1,4 +1,4 @@ -module M +namespace M { @@ -18,7 +18,7 @@ module M } - module X { + namespace X { var inner = outer; // Error: outer not visible diff --git a/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts b/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts index 417d6aad8fd..3d80b3dbdf4 100644 --- a/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts +++ b/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt3.ts @@ -1,4 +1,4 @@ -module Z { +namespace Z { export module M { export function bar() { return ""; diff --git a/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt5.ts b/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt5.ts index fa224b1b7f9..b37b002b4b3 100644 --- a/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt5.ts +++ b/tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt5.ts @@ -1,4 +1,4 @@ -module Z { +namespace Z { export module M { export function bar() { return ""; diff --git a/tests/cases/compiler/moduleSymbolMerging.ts b/tests/cases/compiler/moduleSymbolMerging.ts index 8caf60b4910..5d239cb296a 100644 --- a/tests/cases/compiler/moduleSymbolMerging.ts +++ b/tests/cases/compiler/moduleSymbolMerging.ts @@ -1,12 +1,12 @@ // @declaration: true // @Filename: A.ts -module A { export interface I {} } +namespace A { export interface I {} } // @Filename: B.ts /// -module A { ; } -module B { +namespace A { ; } +namespace B { export function f(): A.I { return null; } } diff --git a/tests/cases/compiler/moduleUnassignedVariable.ts b/tests/cases/compiler/moduleUnassignedVariable.ts index 77f471811f4..6d154df3977 100644 --- a/tests/cases/compiler/moduleUnassignedVariable.ts +++ b/tests/cases/compiler/moduleUnassignedVariable.ts @@ -1,4 +1,4 @@ -module Bar { +namespace Bar { export var a = 1; function fooA() { return a; } // Correct: return Bar.a diff --git a/tests/cases/compiler/moduleVariableArrayIndexer.ts b/tests/cases/compiler/moduleVariableArrayIndexer.ts index e2423f31f34..4c1f32bf152 100644 --- a/tests/cases/compiler/moduleVariableArrayIndexer.ts +++ b/tests/cases/compiler/moduleVariableArrayIndexer.ts @@ -1,4 +1,4 @@ -module Bar { +namespace Bar { export var a = 1; var t = undefined[a][a]; // CG: var t = undefined[Bar.a][a]; } diff --git a/tests/cases/compiler/moduleVariables.ts b/tests/cases/compiler/moduleVariables.ts index b53b43a5ba2..f209d42439a 100644 --- a/tests/cases/compiler/moduleVariables.ts +++ b/tests/cases/compiler/moduleVariables.ts @@ -2,16 +2,16 @@ declare var console: any; var x = 1; -module M { +namespace M { export var x = 2; console.log(x); // 2 } -module M { +namespace M { console.log(x); // 2 } -module M { +namespace M { var x = 3; console.log(x); // 3 } diff --git a/tests/cases/compiler/moduleVisibilityTest1.ts b/tests/cases/compiler/moduleVisibilityTest1.ts index 2b691be9327..5b21c0727ce 100644 --- a/tests/cases/compiler/moduleVisibilityTest1.ts +++ b/tests/cases/compiler/moduleVisibilityTest1.ts @@ -1,6 +1,6 @@ -module OuterMod { +namespace OuterMod { export function someExportedOuterFunc() { return -1; } export module OuterInnerMod { @@ -10,7 +10,7 @@ module OuterMod { import OuterInnerAlias = OuterMod.OuterInnerMod; -module M { +namespace M { export module InnerMod { export function someExportedInnerFunc() { return -2; } @@ -52,7 +52,7 @@ module M { function someModuleFunction() { return 5;} } -module M { +namespace M { export var c = x; export var meb = M.E.B; } diff --git a/tests/cases/compiler/moduleVisibilityTest2.ts b/tests/cases/compiler/moduleVisibilityTest2.ts index 5b2478dcf22..9f334a15909 100644 --- a/tests/cases/compiler/moduleVisibilityTest2.ts +++ b/tests/cases/compiler/moduleVisibilityTest2.ts @@ -1,6 +1,6 @@ -module OuterMod { +namespace OuterMod { export function someExportedOuterFunc() { return -1; } export module OuterInnerMod { @@ -10,9 +10,9 @@ module OuterMod { import OuterInnerAlias = OuterMod.OuterInnerMod; -module M { +namespace M { - module InnerMod { + namespace InnerMod { export function someExportedInnerFunc() { return -2; } } @@ -53,7 +53,7 @@ module M { function someModuleFunction() { return 5;} } -module M { +namespace M { export var c = x; export var meb = M.E.B; } diff --git a/tests/cases/compiler/moduleVisibilityTest3.ts b/tests/cases/compiler/moduleVisibilityTest3.ts index 6b5ea820ff4..b9cf7a49aed 100644 --- a/tests/cases/compiler/moduleVisibilityTest3.ts +++ b/tests/cases/compiler/moduleVisibilityTest3.ts @@ -1,4 +1,4 @@ -module _modes { +namespace _modes { export interface IMode { } @@ -10,7 +10,7 @@ module _modes { //_modes. // produces an internal error - please implement in derived class -module editor { +namespace editor { import modes = _modes; var i : modes.IMode; diff --git a/tests/cases/compiler/moduleVisibilityTest4.ts b/tests/cases/compiler/moduleVisibilityTest4.ts index ee749b6f7f2..00e1fec4879 100644 --- a/tests/cases/compiler/moduleVisibilityTest4.ts +++ b/tests/cases/compiler/moduleVisibilityTest4.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export type nums = number; } diff --git a/tests/cases/compiler/moduleWithNoValuesAsType.ts b/tests/cases/compiler/moduleWithNoValuesAsType.ts index 06508c19c57..849a8de767b 100644 --- a/tests/cases/compiler/moduleWithNoValuesAsType.ts +++ b/tests/cases/compiler/moduleWithNoValuesAsType.ts @@ -1,13 +1,13 @@ -module A { } +namespace A { } var a: A; // error -module B { +namespace B { interface I {} } var b: B; // error -module C { - module M { +namespace C { + namespace M { interface I {} } } diff --git a/tests/cases/compiler/moduleWithTryStatement1.ts b/tests/cases/compiler/moduleWithTryStatement1.ts index d87b77652dc..88bf96c0fe0 100644 --- a/tests/cases/compiler/moduleWithTryStatement1.ts +++ b/tests/cases/compiler/moduleWithTryStatement1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { try { } catch (e) { diff --git a/tests/cases/compiler/moduleWithValuesAsType.ts b/tests/cases/compiler/moduleWithValuesAsType.ts index c3e710e61e7..e053e823e25 100644 --- a/tests/cases/compiler/moduleWithValuesAsType.ts +++ b/tests/cases/compiler/moduleWithValuesAsType.ts @@ -1,4 +1,4 @@ -module A { +namespace A { var b = 1; } diff --git a/tests/cases/compiler/module_augmentExistingAmbientVariable.ts b/tests/cases/compiler/module_augmentExistingAmbientVariable.ts index 4972714a82f..a6c6a5828b7 100644 --- a/tests/cases/compiler/module_augmentExistingAmbientVariable.ts +++ b/tests/cases/compiler/module_augmentExistingAmbientVariable.ts @@ -1,6 +1,6 @@ // @lib: es5 declare var console: any; -module console { +namespace console { export var x = 2; } \ No newline at end of file diff --git a/tests/cases/compiler/module_augmentExistingVariable.ts b/tests/cases/compiler/module_augmentExistingVariable.ts index 266c3ad4d7f..653535a20e8 100644 --- a/tests/cases/compiler/module_augmentExistingVariable.ts +++ b/tests/cases/compiler/module_augmentExistingVariable.ts @@ -1,6 +1,6 @@ // @lib: es5 var console: any; -module console { +namespace console { export var x = 2; } \ No newline at end of file diff --git a/tests/cases/compiler/multiModuleClodule1.ts b/tests/cases/compiler/multiModuleClodule1.ts index 15ee53b8b6b..9cb6961defd 100644 --- a/tests/cases/compiler/multiModuleClodule1.ts +++ b/tests/cases/compiler/multiModuleClodule1.ts @@ -5,11 +5,11 @@ class C { static boo() { } } -module C { +namespace C { export var x = 1; var y = 2; } -module C { +namespace C { export function foo() { } function baz() { return ''; } } diff --git a/tests/cases/compiler/multiModuleFundule1.ts b/tests/cases/compiler/multiModuleFundule1.ts index c93aea8566d..0ab97b6db18 100644 --- a/tests/cases/compiler/multiModuleFundule1.ts +++ b/tests/cases/compiler/multiModuleFundule1.ts @@ -1,9 +1,9 @@ function C(x: number) { } -module C { +namespace C { export var x = 1; } -module C { +namespace C { export function foo() { } } diff --git a/tests/cases/compiler/multivar.ts b/tests/cases/compiler/multivar.ts index 1c6e59edecd..421d32b760d 100644 --- a/tests/cases/compiler/multivar.ts +++ b/tests/cases/compiler/multivar.ts @@ -1,7 +1,7 @@ var a,b,c; var x=1,y=2,z=3; -module m2 { +namespace m2 { export var a, b2: number = 10, b; var m1; diff --git a/tests/cases/compiler/nameCollisionWithBlockScopedVariable1.ts b/tests/cases/compiler/nameCollisionWithBlockScopedVariable1.ts index 231476ee339..6ad20da899f 100644 --- a/tests/cases/compiler/nameCollisionWithBlockScopedVariable1.ts +++ b/tests/cases/compiler/nameCollisionWithBlockScopedVariable1.ts @@ -1,8 +1,8 @@ // @target: es6 -module M { +namespace M { export class C { } } -module M { +namespace M { { let M = 0; new C(); diff --git a/tests/cases/compiler/nameCollisions.ts b/tests/cases/compiler/nameCollisions.ts index 90b2967fa5f..648fa5522bc 100644 --- a/tests/cases/compiler/nameCollisions.ts +++ b/tests/cases/compiler/nameCollisions.ts @@ -1,25 +1,25 @@ -module T { +namespace T { var x = 2; - module x { // error + namespace x { // error export class Bar { test: number; } } - module z { + namespace z { var t; } var z; // error - module y { + namespace y { var b; } class y { } // error var w; - module w { } //ok + namespace w { } //ok var f; function f() { } //error diff --git a/tests/cases/compiler/namedFunctionExpressionInModule.ts b/tests/cases/compiler/namedFunctionExpressionInModule.ts index 66a6b7a545e..f4da02d6ad2 100644 --- a/tests/cases/compiler/namedFunctionExpressionInModule.ts +++ b/tests/cases/compiler/namedFunctionExpressionInModule.ts @@ -1,4 +1,4 @@ -module Variables{ +namespace Variables{ var x = function bar(a, b, c) { } x(1, 2, 3); diff --git a/tests/cases/compiler/namespaces1.ts b/tests/cases/compiler/namespaces1.ts index fe85edf315d..cf27961eb93 100644 --- a/tests/cases/compiler/namespaces1.ts +++ b/tests/cases/compiler/namespaces1.ts @@ -1,4 +1,4 @@ -module X { +namespace X { export module Y { export interface Z { } } diff --git a/tests/cases/compiler/namespaces2.ts b/tests/cases/compiler/namespaces2.ts index 00482a2b6f2..e16b97f35a3 100644 --- a/tests/cases/compiler/namespaces2.ts +++ b/tests/cases/compiler/namespaces2.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export module B { export class C { } } diff --git a/tests/cases/compiler/namespacesDeclaration1.ts b/tests/cases/compiler/namespacesDeclaration1.ts index a231cf2d9d1..48a600c381e 100644 --- a/tests/cases/compiler/namespacesDeclaration1.ts +++ b/tests/cases/compiler/namespacesDeclaration1.ts @@ -1,6 +1,6 @@ // @declaration: true -module M { +namespace M { export namespace N { export module M2 { export interface I {} diff --git a/tests/cases/compiler/namespacesDeclaration2.ts b/tests/cases/compiler/namespacesDeclaration2.ts index 6c4a1790354..17bb3c91aca 100644 --- a/tests/cases/compiler/namespacesDeclaration2.ts +++ b/tests/cases/compiler/namespacesDeclaration2.ts @@ -3,7 +3,7 @@ namespace N { function S() {} } -module M { +namespace M { function F() {} } diff --git a/tests/cases/compiler/nestedModulePrivateAccess.ts b/tests/cases/compiler/nestedModulePrivateAccess.ts index 6770321fd46..7625d4b8af0 100644 --- a/tests/cases/compiler/nestedModulePrivateAccess.ts +++ b/tests/cases/compiler/nestedModulePrivateAccess.ts @@ -1,6 +1,6 @@ -module a{ +namespace a{ var x:number; - module b{ + namespace b{ var y = x; // should not be an error } } \ No newline at end of file diff --git a/tests/cases/compiler/nestedSelf.ts b/tests/cases/compiler/nestedSelf.ts index 00fc089698c..58249250218 100644 --- a/tests/cases/compiler/nestedSelf.ts +++ b/tests/cases/compiler/nestedSelf.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C { public n = 42; public foo() { [1,2,3].map((x) => { return this.n * x; })} diff --git a/tests/cases/compiler/newArrays.ts b/tests/cases/compiler/newArrays.ts index c66924ffc60..2aa9f90ef80 100644 --- a/tests/cases/compiler/newArrays.ts +++ b/tests/cases/compiler/newArrays.ts @@ -1,4 +1,4 @@ -module M { +namespace M { class Foo {} class Gar { public fa: Foo[]; diff --git a/tests/cases/compiler/newOperator.ts b/tests/cases/compiler/newOperator.ts index 6bb28daabb1..fea9c595fd8 100644 --- a/tests/cases/compiler/newOperator.ts +++ b/tests/cases/compiler/newOperator.ts @@ -45,7 +45,7 @@ new ctorUnion(""); declare const ctorUnion2: (new (a: T) => void) | (new (a: string) => void) new ctorUnion2(""); -module M { +namespace M { export class T { x: number; } diff --git a/tests/cases/compiler/noImplicitAnyParametersInModule.ts b/tests/cases/compiler/noImplicitAnyParametersInModule.ts index 69dd3c8c647..be3064f106f 100644 --- a/tests/cases/compiler/noImplicitAnyParametersInModule.ts +++ b/tests/cases/compiler/noImplicitAnyParametersInModule.ts @@ -1,6 +1,6 @@ //@noImplicitAny: true -module M { +namespace M { // No implicit-'any' errors. function m_f1(): void { } diff --git a/tests/cases/compiler/nonExportedElementsOfMergedModules.ts b/tests/cases/compiler/nonExportedElementsOfMergedModules.ts index bb1199ab5de..280af189c59 100644 --- a/tests/cases/compiler/nonExportedElementsOfMergedModules.ts +++ b/tests/cases/compiler/nonExportedElementsOfMergedModules.ts @@ -1,13 +1,13 @@ -module One { +namespace One { enum A { X } - module B { + namespace B { export var x; } } -module One { +namespace One { enum A { Y } - module B { + namespace B { export var y; } B.x; diff --git a/tests/cases/compiler/objectLitArrayDeclNoNew.ts b/tests/cases/compiler/objectLitArrayDeclNoNew.ts index f089a99e67b..34b6eea4065 100644 --- a/tests/cases/compiler/objectLitArrayDeclNoNew.ts +++ b/tests/cases/compiler/objectLitArrayDeclNoNew.ts @@ -1,7 +1,7 @@ // @lib: es5 declare var console; "use strict"; -module Test { +namespace Test { export interface IState { } diff --git a/tests/cases/compiler/overload1.ts b/tests/cases/compiler/overload1.ts index aff1b2ec07b..39434cebf92 100644 --- a/tests/cases/compiler/overload1.ts +++ b/tests/cases/compiler/overload1.ts @@ -1,4 +1,4 @@ -module O { +namespace O { export class A { } diff --git a/tests/cases/compiler/overloadResolutionOverNonCTLambdas.ts b/tests/cases/compiler/overloadResolutionOverNonCTLambdas.ts index fd75839ade1..eadaf7c77d7 100644 --- a/tests/cases/compiler/overloadResolutionOverNonCTLambdas.ts +++ b/tests/cases/compiler/overloadResolutionOverNonCTLambdas.ts @@ -1,4 +1,4 @@ -module Bugs { +namespace Bugs { class A { } diff --git a/tests/cases/compiler/overloadResolutionOverNonCTObjectLit.ts b/tests/cases/compiler/overloadResolutionOverNonCTObjectLit.ts index 88f11240424..0929650b065 100644 --- a/tests/cases/compiler/overloadResolutionOverNonCTObjectLit.ts +++ b/tests/cases/compiler/overloadResolutionOverNonCTObjectLit.ts @@ -1,4 +1,4 @@ -module Bugs { +namespace Bugs { export interface IToken { startIndex:number; type:string; diff --git a/tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts b/tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts index eb22f0a2447..b73f941f7a9 100644 --- a/tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts +++ b/tests/cases/compiler/overloadsInDifferentContainersDisagreeOnAmbient.ts @@ -3,6 +3,6 @@ declare module M { export function f(); } -module M { +namespace M { export function f() { } } \ No newline at end of file diff --git a/tests/cases/compiler/parameterPropertyInConstructor2.ts b/tests/cases/compiler/parameterPropertyInConstructor2.ts index 7a606fe2910..6890f21032b 100644 --- a/tests/cases/compiler/parameterPropertyInConstructor2.ts +++ b/tests/cases/compiler/parameterPropertyInConstructor2.ts @@ -1,4 +1,4 @@ -module mod { +namespace mod { class Customers { constructor(public names: string); constructor(public names: string, public ages: number) { diff --git a/tests/cases/compiler/primaryExpressionMods.ts b/tests/cases/compiler/primaryExpressionMods.ts index 7474d8b1e36..a0c571435f4 100644 --- a/tests/cases/compiler/primaryExpressionMods.ts +++ b/tests/cases/compiler/primaryExpressionMods.ts @@ -1,4 +1,4 @@ -module M +namespace M { export interface P { x: number; y: number; } export var a = 1; diff --git a/tests/cases/compiler/primitiveTypeAsmoduleName.ts b/tests/cases/compiler/primitiveTypeAsmoduleName.ts index 9b4b955b891..5899e9a79d1 100644 --- a/tests/cases/compiler/primitiveTypeAsmoduleName.ts +++ b/tests/cases/compiler/primitiveTypeAsmoduleName.ts @@ -1 +1 @@ -module string {} \ No newline at end of file +namespace string {} \ No newline at end of file diff --git a/tests/cases/compiler/privacyAccessorDeclFile.ts b/tests/cases/compiler/privacyAccessorDeclFile.ts index 25d590c0d37..7f0e4448f56 100644 --- a/tests/cases/compiler/privacyAccessorDeclFile.ts +++ b/tests/cases/compiler/privacyAccessorDeclFile.ts @@ -408,7 +408,7 @@ export module publicModule { } } -module privateModule { +namespace privateModule { class privateClass { } @@ -653,14 +653,14 @@ class publicClassInGlobalWithWithPublicSetAccessorTypes { } } -module publicModuleInGlobal { +namespace publicModuleInGlobal { class privateClass { } export class publicClass { } - module privateModule { + namespace privateModule { class privateClass { } diff --git a/tests/cases/compiler/privacyCheckAnonymousFunctionParameter.ts b/tests/cases/compiler/privacyCheckAnonymousFunctionParameter.ts index c867a664520..c4a36e3882b 100644 --- a/tests/cases/compiler/privacyCheckAnonymousFunctionParameter.ts +++ b/tests/cases/compiler/privacyCheckAnonymousFunctionParameter.ts @@ -4,7 +4,7 @@ export var x = 1; // Makes this an external module interface Iterator { } -module Query { +namespace Query { export function fromDoWhile(doWhile: (test: Iterator) => boolean): Iterator { return null; } diff --git a/tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts b/tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts index 1aea1a17e98..de07ee4bb0f 100644 --- a/tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts +++ b/tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts @@ -3,13 +3,13 @@ export var x = 1; // Makes this an external module interface Iterator { x: T } -module Q { +namespace Q { export function foo(x: (a: Iterator) => number) { return x; } } -module Q { +namespace Q { function bar() { foo(null); } diff --git a/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface1.ts b/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface1.ts index b2a5e374f48..11400b7df1f 100644 --- a/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface1.ts +++ b/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface1.ts @@ -1,6 +1,6 @@ //@module: commonjs //@declaration: true -module Foo { +namespace Foo { export interface A { } } diff --git a/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface2.ts b/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface2.ts index 42c121ac80e..e918a2f5f3d 100644 --- a/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface2.ts +++ b/tests/cases/compiler/privacyCheckExportAssignmentOnExportedGenericInterface2.ts @@ -9,6 +9,6 @@ function Foo(array: T[]): Foo { return undefined; } -module Foo { +namespace Foo { export var x = "hello"; } diff --git a/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleError.ts b/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleError.ts index b37fb72677b..ea6607d7acf 100644 --- a/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleError.ts +++ b/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleError.ts @@ -1,6 +1,6 @@ //@declaration: true -module Outer { - module Inner { +namespace Outer { + namespace Inner { export var m: typeof Inner; } diff --git a/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleNoError.ts b/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleNoError.ts index f5cee38a1e3..fafabc67298 100644 --- a/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleNoError.ts +++ b/tests/cases/compiler/privacyCheckTypeOfInvisibleModuleNoError.ts @@ -1,6 +1,6 @@ // @declaration: true -module Outer { - module Inner { +namespace Outer { + namespace Inner { export var m: number; } diff --git a/tests/cases/compiler/privacyClass.ts b/tests/cases/compiler/privacyClass.ts index e589e070399..b57d0d3626a 100644 --- a/tests/cases/compiler/privacyClass.ts +++ b/tests/cases/compiler/privacyClass.ts @@ -43,7 +43,7 @@ export module m1 { } -module m2 { +namespace m2 { export interface m2_i_public { } diff --git a/tests/cases/compiler/privacyClassExtendsClauseDeclFile.ts b/tests/cases/compiler/privacyClassExtendsClauseDeclFile.ts index 4feb4a691b7..18f7bcb8d69 100644 --- a/tests/cases/compiler/privacyClassExtendsClauseDeclFile.ts +++ b/tests/cases/compiler/privacyClassExtendsClauseDeclFile.ts @@ -26,7 +26,7 @@ export module publicModule { } } -module privateModule { +namespace privateModule { export class publicClassInPrivateModule { private f1() { } @@ -73,7 +73,7 @@ export class publicClassExtendingFromPrivateModuleClass extends privateModule.pu } // @Filename: privacyClassExtendsClauseDeclFile_GlobalFile.ts -module publicModuleInGlobal { +namespace publicModuleInGlobal { export class publicClassInPublicModule { private f1() { } diff --git a/tests/cases/compiler/privacyClassImplementsClauseDeclFile.ts b/tests/cases/compiler/privacyClassImplementsClauseDeclFile.ts index 17791e49f86..aa0b5ea2713 100644 --- a/tests/cases/compiler/privacyClassImplementsClauseDeclFile.ts +++ b/tests/cases/compiler/privacyClassImplementsClauseDeclFile.ts @@ -27,7 +27,7 @@ export module publicModule { } } -module privateModule { +namespace privateModule { export interface publicInterfaceInPrivateModule { } @@ -72,7 +72,7 @@ export class publicClassImplementingFromPrivateModuleInterface implements privat } // @Filename: privacyClassImplementsClauseDeclFile_GlobalFile.ts -module publicModuleInGlobal { +namespace publicModuleInGlobal { export interface publicInterfaceInPublicModule { } diff --git a/tests/cases/compiler/privacyFunc.ts b/tests/cases/compiler/privacyFunc.ts index bb9ad25e867..8d910ad9d56 100644 --- a/tests/cases/compiler/privacyFunc.ts +++ b/tests/cases/compiler/privacyFunc.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { export class C1_public { private f1() { } diff --git a/tests/cases/compiler/privacyFunctionParameterDeclFile.ts b/tests/cases/compiler/privacyFunctionParameterDeclFile.ts index baa2ed4bee6..4012bef654f 100644 --- a/tests/cases/compiler/privacyFunctionParameterDeclFile.ts +++ b/tests/cases/compiler/privacyFunctionParameterDeclFile.ts @@ -266,7 +266,7 @@ export module publicModule { } -module privateModule { +namespace privateModule { class privateClass { } @@ -422,14 +422,14 @@ function publicFunctionWithPublicParmeterTypesInGlobal(param: publicClassInGloba } declare function publicAmbientFunctionWithPublicParmeterTypesInGlobal(param: publicClassInGlobal): void; -module publicModuleInGlobal { +namespace publicModuleInGlobal { class privateClass { } export class publicClass { } - module privateModule { + namespace privateModule { class privateClass { } diff --git a/tests/cases/compiler/privacyFunctionReturnTypeDeclFile.ts b/tests/cases/compiler/privacyFunctionReturnTypeDeclFile.ts index c09c4b123f2..c329dbd6a99 100644 --- a/tests/cases/compiler/privacyFunctionReturnTypeDeclFile.ts +++ b/tests/cases/compiler/privacyFunctionReturnTypeDeclFile.ts @@ -460,7 +460,7 @@ export module publicModule { declare function privateAmbientFunctionWithPrivateModuleParameterTypes(): privateModule.publicClass; } -module privateModule { +namespace privateModule { class privateClass { } @@ -733,14 +733,14 @@ function publicFunctionWithPublicParmeterTypesInGlobal1() { } declare function publicAmbientFunctionWithPublicParmeterTypesInGlobal(): publicClassInGlobal; -module publicModuleInGlobal { +namespace publicModuleInGlobal { class privateClass { } export class publicClass { } - module privateModule { + namespace privateModule { class privateClass { } diff --git a/tests/cases/compiler/privacyGetter.ts b/tests/cases/compiler/privacyGetter.ts index aab0cb22a0e..a6799bd4456 100644 --- a/tests/cases/compiler/privacyGetter.ts +++ b/tests/cases/compiler/privacyGetter.ts @@ -70,7 +70,7 @@ export module m1 { } } -module m2 { +namespace m2 { export class m2_C1_public { private f1() { } diff --git a/tests/cases/compiler/privacyGloClass.ts b/tests/cases/compiler/privacyGloClass.ts index 79b018adc6e..01da2899eb9 100644 --- a/tests/cases/compiler/privacyGloClass.ts +++ b/tests/cases/compiler/privacyGloClass.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { export interface m1_i_public { } diff --git a/tests/cases/compiler/privacyGloFunc.ts b/tests/cases/compiler/privacyGloFunc.ts index 55be524308e..a5dff8b2a36 100644 --- a/tests/cases/compiler/privacyGloFunc.ts +++ b/tests/cases/compiler/privacyGloFunc.ts @@ -177,7 +177,7 @@ export module m1 { } } -module m2 { +namespace m2 { export class m2_C1_public { private f() { } diff --git a/tests/cases/compiler/privacyGloGetter.ts b/tests/cases/compiler/privacyGloGetter.ts index c892c2e75da..b1e37317df4 100644 --- a/tests/cases/compiler/privacyGloGetter.ts +++ b/tests/cases/compiler/privacyGloGetter.ts @@ -1,5 +1,5 @@ // @target: ES5 -module m1 { +namespace m1 { export class C1_public { private f1() { } diff --git a/tests/cases/compiler/privacyGloInterface.ts b/tests/cases/compiler/privacyGloInterface.ts index 931a7e21b6f..b56a1da7063 100644 --- a/tests/cases/compiler/privacyGloInterface.ts +++ b/tests/cases/compiler/privacyGloInterface.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { export class C1_public { private f1() { } @@ -86,7 +86,7 @@ interface C7_public { f3(): C5_public; } -module m3 { +namespace m3 { export interface m3_i_public { f1(): number; } diff --git a/tests/cases/compiler/privacyGloVar.ts b/tests/cases/compiler/privacyGloVar.ts index c56f72ebfd3..7fcc8793531 100644 --- a/tests/cases/compiler/privacyGloVar.ts +++ b/tests/cases/compiler/privacyGloVar.ts @@ -1,4 +1,4 @@ -module m1 { +namespace m1 { export class C1_public { private f1() { } diff --git a/tests/cases/compiler/privacyInterface.ts b/tests/cases/compiler/privacyInterface.ts index 176fe4adf76..ab83c313e74 100644 --- a/tests/cases/compiler/privacyInterface.ts +++ b/tests/cases/compiler/privacyInterface.ts @@ -65,7 +65,7 @@ export module m1 { } -module m2 { +namespace m2 { export class C1_public { private f1() { } @@ -218,7 +218,7 @@ export module m3 { } -module m4 { +namespace m4 { export interface m4_i_public { f1(): number; } diff --git a/tests/cases/compiler/privacyInterfaceExtendsClauseDeclFile.ts b/tests/cases/compiler/privacyInterfaceExtendsClauseDeclFile.ts index d1c73724bb9..69db00d13f1 100644 --- a/tests/cases/compiler/privacyInterfaceExtendsClauseDeclFile.ts +++ b/tests/cases/compiler/privacyInterfaceExtendsClauseDeclFile.ts @@ -27,7 +27,7 @@ export module publicModule { } } -module privateModule { +namespace privateModule { export interface publicInterfaceInPrivateModule { } @@ -72,7 +72,7 @@ export interface publicInterfaceImplementingFromPrivateModuleInterface extends p } // @Filename: privacyInterfaceExtendsClauseDeclFile_GlobalFile.ts -module publicModuleInGlobal { +namespace publicModuleInGlobal { export interface publicInterfaceInPublicModule { } diff --git a/tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts b/tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts index 89bd95e6a64..a2a8fdc5033 100644 --- a/tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts +++ b/tests/cases/compiler/privacyLocalInternalReferenceImportWithExport.ts @@ -1,7 +1,7 @@ //@module: commonjs //@declaration: true // private elements -module m_private { +namespace m_private { export class c_private { } export enum e_private { @@ -101,7 +101,7 @@ export module import_public { export var publicUse_im_public_mu_public: im_public_mu_public.i; } -module import_private { +namespace import_private { // No Privacy errors - importing private elements export import im_private_c_private = m_private.c_private; export import im_private_e_private = m_private.e_private; diff --git a/tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts b/tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts index 454212f2e31..752d56c601d 100644 --- a/tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts +++ b/tests/cases/compiler/privacyLocalInternalReferenceImportWithoutExport.ts @@ -1,7 +1,7 @@ //@module: amd //@declaration: true // private elements -module m_private { +namespace m_private { export class c_private { } export enum e_private { @@ -101,7 +101,7 @@ export module import_public { export var publicUse_im_private_mu_public: im_private_mu_public.i; } -module import_private { +namespace import_private { // No Privacy errors - importing private elements import im_private_c_private = m_private.c_private; import im_private_e_private = m_private.e_private; diff --git a/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts b/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts index 987c35c7325..4dda10bf155 100644 --- a/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts +++ b/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithExport.ts @@ -1,7 +1,7 @@ //@module: amd //@declaration: true // private elements -module m_private { +namespace m_private { export class c_private { } export enum e_private { diff --git a/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts b/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts index 8f241c5ab01..2e75f66c501 100644 --- a/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts +++ b/tests/cases/compiler/privacyTopLevelInternalReferenceImportWithoutExport.ts @@ -2,7 +2,7 @@ //@declaration: true // private elements -module m_private { +namespace m_private { export class c_private { } export enum e_private { diff --git a/tests/cases/compiler/privacyTypeParameterOfFunctionDeclFile.ts b/tests/cases/compiler/privacyTypeParameterOfFunctionDeclFile.ts index 7ea908e9cfb..ffe336834d3 100644 --- a/tests/cases/compiler/privacyTypeParameterOfFunctionDeclFile.ts +++ b/tests/cases/compiler/privacyTypeParameterOfFunctionDeclFile.ts @@ -312,7 +312,7 @@ export module publicModule { } -module privateModule { +namespace privateModule { class privateClass { } diff --git a/tests/cases/compiler/privacyTypeParametersOfClassDeclFile.ts b/tests/cases/compiler/privacyTypeParametersOfClassDeclFile.ts index dcc21ca362a..665d990f345 100644 --- a/tests/cases/compiler/privacyTypeParametersOfClassDeclFile.ts +++ b/tests/cases/compiler/privacyTypeParametersOfClassDeclFile.ts @@ -110,7 +110,7 @@ export module publicModule { } } -module privateModule { +namespace privateModule { class privateClassInPrivateModule { } diff --git a/tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts b/tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts index 55984b46ccb..f230c21b35c 100644 --- a/tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts +++ b/tests/cases/compiler/privacyTypeParametersOfInterfaceDeclFile.ts @@ -131,7 +131,7 @@ export module publicModule { } } -module privateModule { +namespace privateModule { class privateClassInPrivateModule { } diff --git a/tests/cases/compiler/privacyVar.ts b/tests/cases/compiler/privacyVar.ts index ce1f060d269..4558556b7bd 100644 --- a/tests/cases/compiler/privacyVar.ts +++ b/tests/cases/compiler/privacyVar.ts @@ -58,7 +58,7 @@ export module m1 { export var m1_v24_public: C2_private = new C2_private(); // error } -module m2 { +namespace m2 { export class m2_C1_public { private f1() { } diff --git a/tests/cases/compiler/privacyVarDeclFile.ts b/tests/cases/compiler/privacyVarDeclFile.ts index 46012bc9d9f..a41c5c98657 100644 --- a/tests/cases/compiler/privacyVarDeclFile.ts +++ b/tests/cases/compiler/privacyVarDeclFile.ts @@ -164,7 +164,7 @@ export module publicModule { declare var privateAmbientVarWithPrivateModulePropertyTypes: privateModule.publicClass; } -module privateModule { +namespace privateModule { class privateClass { } @@ -261,14 +261,14 @@ class publicClassWithWithPublicPropertyTypesInGlobal { var publicVarWithPublicPropertyTypesInGlobal: publicClassInGlobal; declare var publicAmbientVarWithPublicPropertyTypesInGlobal: publicClassInGlobal; -module publicModuleInGlobal { +namespace publicModuleInGlobal { class privateClass { } export class publicClass { } - module privateModule { + namespace privateModule { class privateClass { } diff --git a/tests/cases/compiler/privateInstanceVisibility.ts b/tests/cases/compiler/privateInstanceVisibility.ts index 2a4541290e4..bb92976310a 100644 --- a/tests/cases/compiler/privateInstanceVisibility.ts +++ b/tests/cases/compiler/privateInstanceVisibility.ts @@ -1,4 +1,4 @@ -module Test { +namespace Test { export class Example { diff --git a/tests/cases/compiler/privateVisibility.ts b/tests/cases/compiler/privateVisibility.ts index 3ab51f595af..53f073631fa 100644 --- a/tests/cases/compiler/privateVisibility.ts +++ b/tests/cases/compiler/privateVisibility.ts @@ -12,7 +12,7 @@ f.privProp; // should not work f.pubMeth(); // should work f.pubProp; // should work -module M { +namespace M { export class C { public pub = 0; private priv = 1; } export var V = 0; } diff --git a/tests/cases/compiler/propertyNamesWithStringLiteral.ts b/tests/cases/compiler/propertyNamesWithStringLiteral.ts index f72c9c23992..74f804a5d1a 100644 --- a/tests/cases/compiler/propertyNamesWithStringLiteral.ts +++ b/tests/cases/compiler/propertyNamesWithStringLiteral.ts @@ -7,7 +7,7 @@ interface NamedColors { "blue": _Color; "pale blue": _Color; } -module Color { +namespace Color { export var namedColors: NamedColors; } var a = Color.namedColors["azure"]; diff --git a/tests/cases/compiler/qualifiedModuleLocals.ts b/tests/cases/compiler/qualifiedModuleLocals.ts index 0d9fdc17581..fc9469abd09 100644 --- a/tests/cases/compiler/qualifiedModuleLocals.ts +++ b/tests/cases/compiler/qualifiedModuleLocals.ts @@ -1,4 +1,4 @@ -module A { +namespace A { function b() {} diff --git a/tests/cases/compiler/qualifiedName_ImportDeclarations-entity-names-referencing-a-var.ts b/tests/cases/compiler/qualifiedName_ImportDeclarations-entity-names-referencing-a-var.ts index 267b2feaf5c..e3dff51dc6b 100644 --- a/tests/cases/compiler/qualifiedName_ImportDeclarations-entity-names-referencing-a-var.ts +++ b/tests/cases/compiler/qualifiedName_ImportDeclarations-entity-names-referencing-a-var.ts @@ -1,8 +1,8 @@ -module Alpha { +namespace Alpha { export var x = 100; } -module Beta { +namespace Beta { import p = Alpha.x; } diff --git a/tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts b/tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts index 7a9fc225903..31b34b20b7a 100644 --- a/tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts +++ b/tests/cases/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.ts @@ -1,4 +1,4 @@ -module Alpha { +namespace Alpha { export var x = 100; } diff --git a/tests/cases/compiler/qualify.ts b/tests/cases/compiler/qualify.ts index 18e10ce77c8..9f6f3e10c83 100644 --- a/tests/cases/compiler/qualify.ts +++ b/tests/cases/compiler/qualify.ts @@ -1,11 +1,11 @@ -module M { +namespace M { export var m=0; export module N { export var n=1; } } -module M { +namespace M { export module N { var y=m; var x=n+y; @@ -13,7 +13,7 @@ module M { } -module T { +namespace T { export interface I { p; } @@ -25,13 +25,13 @@ module T { } } -module Peer { +namespace Peer { export module U2 { var z:T.U.I2=3; } } -module Everest { +namespace Everest { export module K1 { export interface I3 { zeep; diff --git a/tests/cases/compiler/reachabilityChecks1.ts b/tests/cases/compiler/reachabilityChecks1.ts index 6430556a203..fbe742b383f 100644 --- a/tests/cases/compiler/reachabilityChecks1.ts +++ b/tests/cases/compiler/reachabilityChecks1.ts @@ -4,33 +4,33 @@ while (true); var x = 1; -module A { +namespace A { while (true); let x; } -module A1 { +namespace A1 { do {} while(true); - module A { + namespace A { interface F {} } } -module A2 { +namespace A2 { while (true); - module A { + namespace A { var x = 1; } } -module A3 { +namespace A3 { while (true); type T = string; } -module A4 { +namespace A4 { while (true); - module A { + namespace A { const enum E { X } } } @@ -51,9 +51,9 @@ function f2() { } } -module B { +namespace B { for (; ;); - module C { + namespace C { } } diff --git a/tests/cases/compiler/reachabilityChecks2.ts b/tests/cases/compiler/reachabilityChecks2.ts index 5a7a8aaab58..60f454fca39 100644 --- a/tests/cases/compiler/reachabilityChecks2.ts +++ b/tests/cases/compiler/reachabilityChecks2.ts @@ -4,9 +4,9 @@ while (true) { } const enum E { X } -module A4 { +namespace A4 { while (true); - module A { + namespace A { const enum E { X } } } diff --git a/tests/cases/compiler/reboundBaseClassSymbol.ts b/tests/cases/compiler/reboundBaseClassSymbol.ts index 4dbaf75cc72..66d5f12db75 100644 --- a/tests/cases/compiler/reboundBaseClassSymbol.ts +++ b/tests/cases/compiler/reboundBaseClassSymbol.ts @@ -1,5 +1,5 @@ interface A { a: number; } -module Foo { +namespace Foo { var A = 1; interface B extends A { b: string; } } \ No newline at end of file diff --git a/tests/cases/compiler/reboundIdentifierOnImportAlias.ts b/tests/cases/compiler/reboundIdentifierOnImportAlias.ts index 242e8e9048b..31e152a4b58 100644 --- a/tests/cases/compiler/reboundIdentifierOnImportAlias.ts +++ b/tests/cases/compiler/reboundIdentifierOnImportAlias.ts @@ -1,7 +1,7 @@ -module Foo { +namespace Foo { export var x = "hello"; } -module Bar { +namespace Bar { var Foo = 1; import F = Foo; } \ No newline at end of file diff --git a/tests/cases/compiler/rectype.ts b/tests/cases/compiler/rectype.ts index 2bf712782a8..bd2eec6802b 100644 --- a/tests/cases/compiler/rectype.ts +++ b/tests/cases/compiler/rectype.ts @@ -1,4 +1,4 @@ -module M { +namespace M { interface I { (i:I):I; } export function f(p: I) { return f }; diff --git a/tests/cases/compiler/recursiveClassInstantiationsWithDefaultConstructors.ts b/tests/cases/compiler/recursiveClassInstantiationsWithDefaultConstructors.ts index 9f008cd2b1e..737decda46e 100644 --- a/tests/cases/compiler/recursiveClassInstantiationsWithDefaultConstructors.ts +++ b/tests/cases/compiler/recursiveClassInstantiationsWithDefaultConstructors.ts @@ -1,4 +1,4 @@ -module TypeScript2 { +namespace TypeScript2 { export class MemberName { public prefix: string = ""; } diff --git a/tests/cases/compiler/recursiveCloduleReference.ts b/tests/cases/compiler/recursiveCloduleReference.ts index b62481618bf..a3dd263be3c 100644 --- a/tests/cases/compiler/recursiveCloduleReference.ts +++ b/tests/cases/compiler/recursiveCloduleReference.ts @@ -1,4 +1,4 @@ -module M +namespace M { export class C { } diff --git a/tests/cases/compiler/recursiveIdenticalOverloadResolution.ts b/tests/cases/compiler/recursiveIdenticalOverloadResolution.ts index a0ec51412e9..eaebcb13d10 100644 --- a/tests/cases/compiler/recursiveIdenticalOverloadResolution.ts +++ b/tests/cases/compiler/recursiveIdenticalOverloadResolution.ts @@ -1,5 +1,5 @@ -module M { +namespace M { interface I { (i: I): I; } diff --git a/tests/cases/compiler/reservedNameOnModuleImport.ts b/tests/cases/compiler/reservedNameOnModuleImport.ts index de0344f56f3..e1ef5ec443d 100644 --- a/tests/cases/compiler/reservedNameOnModuleImport.ts +++ b/tests/cases/compiler/reservedNameOnModuleImport.ts @@ -1,5 +1,5 @@ declare module test { - module mstring { } + namespace mstring { } // Should be fine; this does not clobber any declared values. export import string = mstring; diff --git a/tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts b/tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts index bde58f92795..ca90c9d4761 100644 --- a/tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts +++ b/tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts @@ -1,6 +1,6 @@ declare module test { interface mi_string { } - module mi_string { } + namespace mi_string { } // Should error; imports both a type and a module, which means it conflicts with the 'string' type. import string = mi_string; diff --git a/tests/cases/compiler/reservedWords2.ts b/tests/cases/compiler/reservedWords2.ts index e74b403d27b..6e2915ae2cc 100644 --- a/tests/cases/compiler/reservedWords2.ts +++ b/tests/cases/compiler/reservedWords2.ts @@ -3,7 +3,7 @@ import * as while from "foo" var typeof = 10; function throw() {} -module void {} +namespace void {} var {while, return} = { while: 1, return: 2 }; var {this, switch: { continue} } = { this: 1, switch: { continue: 2 }}; var [debugger, if] = [1, 2]; diff --git a/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts b/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts index de8ad75b0eb..5cfdbad015f 100644 --- a/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts +++ b/tests/cases/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.ts @@ -1,5 +1,5 @@ // @declaration: true -module rionegrensis { +namespace rionegrensis { export class caniventer extends Lanthanum.nitidus { salomonseni() : caniventer { var x : caniventer; () => { var y = this; }; return x; } uchidai() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -15,7 +15,7 @@ module rionegrensis { nivicola() : samarensis.pallidus { var x : samarensis.pallidus; () => { var y = this; }; return x; } } } -module julianae { +namespace julianae { export class steerii { } export class nudicaudus { @@ -100,13 +100,13 @@ module julianae { phrudus() : sagitta.stolzmanni { var x : sagitta.stolzmanni; () => { var y = this; }; return x; } } } -module ruatanica { +namespace ruatanica { export class hector { humulis() : julianae.steerii { var x : julianae.steerii; () => { var y = this; }; return x; } eurycerus() : panamensis.linulus, lavali.wilsoni> { var x : panamensis.linulus, lavali.wilsoni>; () => { var y = this; }; return x; } } } -module Lanthanum { +namespace Lanthanum { export class suillus { spilosoma() : quasiater.carolinensis { var x : quasiater.carolinensis; () => { var y = this; }; return x; } tumbalensis() : caurinus.megaphyllus { var x : caurinus.megaphyllus; () => { var y = this; }; return x; } @@ -151,7 +151,7 @@ module Lanthanum { ileile() : quasiater.carolinensis { var x : quasiater.carolinensis; () => { var y = this; }; return x; } } } -module rendalli { +namespace rendalli { export class zuluensis extends julianae.steerii { telfairi() : argurus.wetmorei { var x : argurus.wetmorei; () => { var y = this; }; return x; } keyensis() : quasiater.wattsi { var x : quasiater.wattsi; () => { var y = this; }; return x; } @@ -186,7 +186,7 @@ module rendalli { edax() : lutreolus.cor>, rionegrensis.caniventer> { var x : lutreolus.cor>, rionegrensis.caniventer>; () => { var y = this; }; return x; } } } -module trivirgatus { +namespace trivirgatus { export class tumidifrons { nivalis() : dogramacii.kaiseri { var x : dogramacii.kaiseri; () => { var y = this; }; return x; } vestitus() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -236,7 +236,7 @@ module trivirgatus { ralli() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } } } -module quasiater { +namespace quasiater { export class bobrinskoi { crassicaudatus() : samarensis.cahirinus { var x : samarensis.cahirinus; () => { var y = this; }; return x; } mulatta() : argurus.oreas { var x : argurus.oreas; () => { var y = this; }; return x; } @@ -244,7 +244,7 @@ module quasiater { Copper() : argurus.netscheri { var x : argurus.netscheri; () => { var y = this; }; return x; } } } -module ruatanica { +namespace ruatanica { export class americanus extends imperfecta.ciliolabrum { nasoloi() : macrorhinos.konganensis { var x : macrorhinos.konganensis; () => { var y = this; }; return x; } mystacalis() : howi.angulatus { var x : howi.angulatus; () => { var y = this; }; return x; } @@ -252,7 +252,7 @@ module ruatanica { tumidus() : gabriellae.amicus { var x : gabriellae.amicus; () => { var y = this; }; return x; } } } -module lavali { +namespace lavali { export class wilsoni extends Lanthanum.nitidus { setiger() : nigra.thalia { var x : nigra.thalia; () => { var y = this; }; return x; } lorentzii() : imperfecta.subspinosus { var x : imperfecta.subspinosus; () => { var y = this; }; return x; } @@ -314,7 +314,7 @@ module lavali { aequalis() : sagitta.cinereus>, petrophilus.minutilla>, Lanthanum.jugularis> { var x : sagitta.cinereus>, petrophilus.minutilla>, Lanthanum.jugularis>; () => { var y = this; }; return x; } } } -module dogramacii { +namespace dogramacii { export class robustulus extends lavali.wilsoni { fossor() : minutus.inez { var x : minutus.inez; () => { var y = this; }; return x; } humboldti() : sagitta.cinereus { var x : sagitta.cinereus; () => { var y = this; }; return x; } @@ -355,7 +355,7 @@ module dogramacii { erythromos() : caurinus.johorensis, nigra.dolichurus> { var x : caurinus.johorensis, nigra.dolichurus>; () => { var y = this; }; return x; } } } -module lutreolus { +namespace lutreolus { export class schlegeli extends lavali.beisa { mittendorfi() : rionegrensis.caniventer { var x : rionegrensis.caniventer; () => { var y = this; }; return x; } blicki() : dogramacii.robustulus { var x : dogramacii.robustulus; () => { var y = this; }; return x; } @@ -373,7 +373,7 @@ module lutreolus { dispar() : panamensis.linulus { var x : panamensis.linulus; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class dauricus { chinensis() : Lanthanum.jugularis { var x : Lanthanum.jugularis; () => { var y = this; }; return x; } duodecimcostatus() : lavali.xanthognathus { var x : lavali.xanthognathus; () => { var y = this; }; return x; } @@ -388,7 +388,7 @@ module argurus { misionensis() : macrorhinos.marmosurus, gabriellae.echinatus> { var x : macrorhinos.marmosurus, gabriellae.echinatus>; () => { var y = this; }; return x; } } } -module nigra { +namespace nigra { export class dolichurus { solomonis() : panglima.abidi, argurus.netscheri, julianae.oralis>>> { var x : panglima.abidi, argurus.netscheri, julianae.oralis>>>; () => { var y = this; }; return x; } alfredi() : caurinus.psilurus { var x : caurinus.psilurus; () => { var y = this; }; return x; } @@ -400,7 +400,7 @@ module nigra { sagei() : howi.marcanoi { var x : howi.marcanoi; () => { var y = this; }; return x; } } } -module panglima { +namespace panglima { export class amphibius extends caurinus.johorensis, Lanthanum.jugularis> { bottegi(): macrorhinos.marmosurus, gabriellae.echinatus>, sagitta.stolzmanni> { var x: macrorhinos.marmosurus, gabriellae.echinatus>, sagitta.stolzmanni>; () => { var y = this; }; return x; } jerdoni(): macrorhinos.daphaenodon { var x: macrorhinos.daphaenodon; () => { var y = this; }; return x; } @@ -422,7 +422,7 @@ module panglima { ega(): imperfecta.lasiurus> { var x: imperfecta.lasiurus>; () => { var y = this; }; return x; } } } -module quasiater { +namespace quasiater { export class carolinensis { concinna(): rendalli.zuluensis { var x: rendalli.zuluensis; () => { var y = this; }; return x; } aeneus(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; } @@ -433,7 +433,7 @@ module quasiater { patrizii(): Lanthanum.megalonyx { var x: Lanthanum.megalonyx; () => { var y = this; }; return x; } } } -module minutus { +namespace minutus { export class himalayana extends lutreolus.punicus { simoni(): argurus.netscheri> { var x: argurus.netscheri>; () => { var y = this; }; return x; } lobata(): samarensis.pallidus { var x: samarensis.pallidus; () => { var y = this; }; return x; } @@ -449,7 +449,7 @@ module minutus { olympus(): Lanthanum.megalonyx { var x: Lanthanum.megalonyx; () => { var y = this; }; return x; } } } -module caurinus { +namespace caurinus { export class mahaganus extends panglima.fundatus { martiniquensis(): ruatanica.hector>> { var x: ruatanica.hector>>; () => { var y = this; }; return x; } devius(): samarensis.pelurus, trivirgatus.falconeri>> { var x: samarensis.pelurus, trivirgatus.falconeri>>; () => { var y = this; }; return x; } @@ -461,21 +461,21 @@ module caurinus { acticola(): argurus.luctuosa { var x: argurus.luctuosa; () => { var y = this; }; return x; } } } -module macrorhinos { +namespace macrorhinos { export class marmosurus { tansaniana(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } } } -module howi { +namespace howi { export class angulatus extends sagitta.stolzmanni { pennatus(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; } } } -module daubentonii { +namespace daubentonii { export class nesiotes { } } -module nigra { +namespace nigra { export class thalia { dichotomus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } arnuxii(): panamensis.linulus, lavali.beisa> { var x: panamensis.linulus, lavali.beisa>; () => { var y = this; }; return x; } @@ -487,21 +487,21 @@ module nigra { brucei(): chrysaeolus.sarasinorum { var x: chrysaeolus.sarasinorum; () => { var y = this; }; return x; } } } -module sagitta { +namespace sagitta { export class walkeri extends minutus.portoricensis { maracajuensis(): samarensis.cahirinus { var x: samarensis.cahirinus; () => { var y = this; }; return x; } } } -module minutus { +namespace minutus { export class inez extends samarensis.pelurus { vexillaris(): samarensis.cahirinus { var x: samarensis.cahirinus; () => { var y = this; }; return x; } } } -module macrorhinos { +namespace macrorhinos { export class konganensis extends imperfecta.lasiurus { } } -module panamensis { +namespace panamensis { export class linulus extends ruatanica.hector> { goslingi(): daubentonii.arboreus { var x: daubentonii.arboreus; () => { var y = this; }; return x; } taki(): patas.uralensis { var x: patas.uralensis; () => { var y = this; }; return x; } @@ -514,7 +514,7 @@ module panamensis { gomantongensis(): rionegrensis.veraecrucis> { var x: rionegrensis.veraecrucis>; () => { var y = this; }; return x; } } } -module nigra { +namespace nigra { export class gracilis { weddellii(): nigra.dolichurus { var x: nigra.dolichurus; () => { var y = this; }; return x; } echinothrix(): Lanthanum.nitidus, argurus.oreas> { var x: Lanthanum.nitidus, argurus.oreas>; () => { var y = this; }; return x; } @@ -531,7 +531,7 @@ module nigra { ramirohitra(): panglima.amphibius { var x: panglima.amphibius; () => { var y = this; }; return x; } } } -module samarensis { +namespace samarensis { export class pelurus extends sagitta.stolzmanni { Palladium(): panamensis.linulus { var x: panamensis.linulus; () => { var y = this; }; return x; } castanea(): argurus.netscheri, julianae.oralis> { var x: argurus.netscheri, julianae.oralis>; () => { var y = this; }; return x; } @@ -577,7 +577,7 @@ module samarensis { saussurei(): rendalli.crenulata, argurus.netscheri, julianae.oralis>> { var x: rendalli.crenulata, argurus.netscheri, julianae.oralis>>; () => { var y = this; }; return x; } } } -module sagitta { +namespace sagitta { export class leptoceros extends caurinus.johorensis> { victus(): rionegrensis.caniventer { var x: rionegrensis.caniventer; () => { var y = this; }; return x; } hoplomyoides(): panglima.fundatus, nigra.gracilis> { var x: panglima.fundatus, nigra.gracilis>; () => { var y = this; }; return x; } @@ -586,23 +586,23 @@ module sagitta { bolami(): trivirgatus.tumidifrons { var x: trivirgatus.tumidifrons; () => { var y = this; }; return x; } } } -module daubentonii { +namespace daubentonii { export class nigricans extends sagitta.stolzmanni { woosnami(): dogramacii.robustulus { var x: dogramacii.robustulus; () => { var y = this; }; return x; } } } -module dammermani { +namespace dammermani { export class siberu { } } -module argurus { +namespace argurus { export class pygmaea extends rendalli.moojeni { pajeros(): gabriellae.echinatus { var x: gabriellae.echinatus; () => { var y = this; }; return x; } capucinus(): rendalli.zuluensis { var x: rendalli.zuluensis; () => { var y = this; }; return x; } cuvieri(): rionegrensis.caniventer { var x: rionegrensis.caniventer; () => { var y = this; }; return x; } } } -module chrysaeolus { +namespace chrysaeolus { export class sarasinorum extends caurinus.psilurus { belzebul(): samarensis.pallidus { var x: samarensis.pallidus; () => { var y = this; }; return x; } hinpoon(): nigra.caucasica { var x: nigra.caucasica; () => { var y = this; }; return x; } @@ -613,7 +613,7 @@ module chrysaeolus { princeps(): minutus.portoricensis { var x: minutus.portoricensis; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class wetmorei { leucoptera(): petrophilus.rosalia { var x: petrophilus.rosalia; () => { var y = this; }; return x; } ochraventer(): sagitta.walkeri { var x: sagitta.walkeri; () => { var y = this; }; return x; } @@ -624,7 +624,7 @@ module argurus { mayori(): sagitta.stolzmanni { var x: sagitta.stolzmanni; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class oreas extends lavali.wilsoni { salamonis(): lavali.xanthognathus { var x: lavali.xanthognathus; () => { var y = this; }; return x; } paniscus(): ruatanica.Praseodymium { var x: ruatanica.Praseodymium; () => { var y = this; }; return x; } @@ -636,7 +636,7 @@ module argurus { univittatus(): argurus.peninsulae { var x: argurus.peninsulae; () => { var y = this; }; return x; } } } -module daubentonii { +namespace daubentonii { export class arboreus { capreolus(): rendalli.crenulata, lavali.wilsoni> { var x: rendalli.crenulata, lavali.wilsoni>; () => { var y = this; }; return x; } moreni(): panglima.abidi { var x: panglima.abidi; () => { var y = this; }; return x; } @@ -652,7 +652,7 @@ module daubentonii { tianshanica(): howi.marcanoi { var x: howi.marcanoi; () => { var y = this; }; return x; } } } -module patas { +namespace patas { export class uralensis { cartilagonodus(): Lanthanum.nitidus { var x: Lanthanum.nitidus; () => { var y = this; }; return x; } pyrrhinus(): lavali.beisa { var x: lavali.beisa; () => { var y = this; }; return x; } @@ -669,19 +669,19 @@ module patas { albiventer(): rendalli.crenulata { var x: rendalli.crenulata; () => { var y = this; }; return x; } } } -module provocax { +namespace provocax { export class melanoleuca extends lavali.wilsoni { Neodymium(): macrorhinos.marmosurus, lutreolus.foina> { var x: macrorhinos.marmosurus, lutreolus.foina>; () => { var y = this; }; return x; } baeri(): imperfecta.lasiurus { var x: imperfecta.lasiurus; () => { var y = this; }; return x; } } } -module sagitta { +namespace sagitta { export class sicarius { Chlorine(): samarensis.cahirinus, dogramacii.robustulus> { var x: samarensis.cahirinus, dogramacii.robustulus>; () => { var y = this; }; return x; } simulator(): macrorhinos.marmosurus, macrorhinos.marmosurus, gabriellae.echinatus>, sagitta.stolzmanni>> { var x: macrorhinos.marmosurus, macrorhinos.marmosurus, gabriellae.echinatus>, sagitta.stolzmanni>>; () => { var y = this; }; return x; } } } -module howi { +namespace howi { export class marcanoi extends Lanthanum.megalonyx { formosae(): Lanthanum.megalonyx { var x: Lanthanum.megalonyx; () => { var y = this; }; return x; } dudui(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } @@ -699,7 +699,7 @@ module howi { hyaena(): julianae.oralis { var x: julianae.oralis; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class gilbertii { nasutus(): lavali.lepturus { var x: lavali.lepturus; () => { var y = this; }; return x; } poecilops(): julianae.steerii { var x: julianae.steerii; () => { var y = this; }; return x; } @@ -715,11 +715,11 @@ module argurus { amurensis(): daubentonii.arboreus { var x: daubentonii.arboreus; () => { var y = this; }; return x; } } } -module petrophilus { +namespace petrophilus { export class minutilla { } } -module lutreolus { +namespace lutreolus { export class punicus { strandi(): gabriellae.klossii { var x: gabriellae.klossii; () => { var y = this; }; return x; } lar(): caurinus.mahaganus { var x: caurinus.mahaganus; () => { var y = this; }; return x; } @@ -736,7 +736,7 @@ module lutreolus { Helium(): julianae.acariensis { var x: julianae.acariensis; () => { var y = this; }; return x; } } } -module macrorhinos { +namespace macrorhinos { export class daphaenodon { bredanensis(): julianae.sumatrana { var x: julianae.sumatrana; () => { var y = this; }; return x; } othus(): howi.coludo { var x: howi.coludo; () => { var y = this; }; return x; } @@ -746,7 +746,7 @@ module macrorhinos { callosus(): trivirgatus.lotor { var x: trivirgatus.lotor; () => { var y = this; }; return x; } } } -module sagitta { +namespace sagitta { export class cinereus { zunigae(): rendalli.crenulata> { var x: rendalli.crenulata>; () => { var y = this; }; return x; } microps(): daubentonii.nigricans> { var x: daubentonii.nigricans>; () => { var y = this; }; return x; } @@ -762,11 +762,11 @@ module sagitta { pittieri(): samarensis.fuscus { var x: samarensis.fuscus; () => { var y = this; }; return x; } } } -module nigra { +namespace nigra { export class caucasica { } } -module gabriellae { +namespace gabriellae { export class klossii extends imperfecta.lasiurus { } export class amicus { @@ -785,7 +785,7 @@ module gabriellae { tenuipes(): howi.coludo> { var x: howi.coludo>; () => { var y = this; }; return x; } } } -module imperfecta { +namespace imperfecta { export class lasiurus { marisae(): lavali.thaeleri { var x: lavali.thaeleri; () => { var y = this; }; return x; } fulvus(): argurus.germaini { var x: argurus.germaini; () => { var y = this; }; return x; } @@ -813,7 +813,7 @@ module imperfecta { sinicus(): macrorhinos.marmosurus { var x: macrorhinos.marmosurus; () => { var y = this; }; return x; } } } -module quasiater { +namespace quasiater { export class wattsi { lagotis(): lavali.xanthognathus { var x: lavali.xanthognathus; () => { var y = this; }; return x; } hussoni(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } @@ -821,9 +821,9 @@ module quasiater { cabrerae(): lavali.lepturus { var x: lavali.lepturus; () => { var y = this; }; return x; } } } -module butleri { +namespace butleri { } -module petrophilus { +namespace petrophilus { export class sodyi extends quasiater.bobrinskoi { saundersiae(): samarensis.pallidus { var x: samarensis.pallidus; () => { var y = this; }; return x; } imberbis(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } @@ -836,7 +836,7 @@ module petrophilus { bairdii(): lavali.beisa { var x: lavali.beisa; () => { var y = this; }; return x; } } } -module caurinus { +namespace caurinus { export class megaphyllus extends imperfecta.lasiurus> { montana(): argurus.oreas { var x: argurus.oreas; () => { var y = this; }; return x; } amatus(): lutreolus.schlegeli { var x: lutreolus.schlegeli; () => { var y = this; }; return x; } @@ -848,14 +848,14 @@ module caurinus { cirrhosus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } } } -module minutus { +namespace minutus { export class portoricensis { relictus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } aequatorianus(): gabriellae.klossii { var x: gabriellae.klossii; () => { var y = this; }; return x; } rhinogradoides(): samarensis.cahirinus { var x: samarensis.cahirinus; () => { var y = this; }; return x; } } } -module lutreolus { +namespace lutreolus { export class foina { tarfayensis(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } Promethium(): samarensis.pelurus { var x: samarensis.pelurus; () => { var y = this; }; return x; } @@ -872,7 +872,7 @@ module lutreolus { argentiventer(): trivirgatus.mixtus { var x: trivirgatus.mixtus; () => { var y = this; }; return x; } } } -module lutreolus { +namespace lutreolus { export class cor extends panglima.fundatus, lavali.beisa>, dammermani.melanops> { antinorii(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } voi(): caurinus.johorensis { var x: caurinus.johorensis; () => { var y = this; }; return x; } @@ -886,19 +886,19 @@ module lutreolus { castroviejoi(): Lanthanum.jugularis { var x: Lanthanum.jugularis; () => { var y = this; }; return x; } } } -module howi { +namespace howi { export class coludo { bernhardi(): lutreolus.punicus { var x: lutreolus.punicus; () => { var y = this; }; return x; } isseli(): argurus.germaini { var x: argurus.germaini; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class germaini extends gabriellae.amicus { sharpei(): lavali.wilsoni { var x: lavali.wilsoni; () => { var y = this; }; return x; } palmarum(): macrorhinos.marmosurus { var x: macrorhinos.marmosurus; () => { var y = this; }; return x; } } } -module sagitta { +namespace sagitta { export class stolzmanni { riparius(): nigra.dolichurus { var x: nigra.dolichurus; () => { var y = this; }; return x; } dhofarensis(): lutreolus.foina { var x: lutreolus.foina; () => { var y = this; }; return x; } @@ -913,7 +913,7 @@ module sagitta { florium(): rendalli.zuluensis { var x: rendalli.zuluensis; () => { var y = this; }; return x; } } } -module dammermani { +namespace dammermani { export class melanops extends minutus.inez { blarina(): dammermani.melanops { var x: dammermani.melanops; () => { var y = this; }; return x; } harwoodi(): rionegrensis.veraecrucis, lavali.wilsoni> { var x: rionegrensis.veraecrucis, lavali.wilsoni>; () => { var y = this; }; return x; } @@ -930,7 +930,7 @@ module dammermani { bocagei(): julianae.albidens { var x: julianae.albidens; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class peninsulae extends patas.uralensis { aitkeni(): trivirgatus.mixtus, panglima.amphibius> { var x: trivirgatus.mixtus, panglima.amphibius>; () => { var y = this; }; return x; } novaeangliae(): lavali.xanthognathus { var x: lavali.xanthognathus; () => { var y = this; }; return x; } @@ -942,7 +942,7 @@ module argurus { cavernarum(): minutus.inez { var x: minutus.inez; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class netscheri { gravis(): nigra.caucasica, dogramacii.kaiseri> { var x: nigra.caucasica, dogramacii.kaiseri>; () => { var y = this; }; return x; } ruschii(): imperfecta.lasiurus> { var x: imperfecta.lasiurus>; () => { var y = this; }; return x; } @@ -959,7 +959,7 @@ module argurus { ruemmleri(): panglima.amphibius, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum> { var x: panglima.amphibius, gabriellae.echinatus>, dogramacii.aurata>, imperfecta.ciliolabrum>; () => { var y = this; }; return x; } } } -module ruatanica { +namespace ruatanica { export class Praseodymium extends ruatanica.hector { clara(): panglima.amphibius, argurus.dauricus> { var x: panglima.amphibius, argurus.dauricus>; () => { var y = this; }; return x; } spectabilis(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } @@ -976,17 +976,17 @@ module ruatanica { soricinus(): quasiater.carolinensis { var x: quasiater.carolinensis; () => { var y = this; }; return x; } } } -module caurinus { +namespace caurinus { export class johorensis extends lutreolus.punicus { maini(): ruatanica.Praseodymium { var x: ruatanica.Praseodymium; () => { var y = this; }; return x; } } } -module argurus { +namespace argurus { export class luctuosa { loriae(): rendalli.moojeni, gabriellae.echinatus>, sagitta.stolzmanni>, lutreolus.punicus> { var x: rendalli.moojeni, gabriellae.echinatus>, sagitta.stolzmanni>, lutreolus.punicus>; () => { var y = this; }; return x; } } } -module panamensis { +namespace panamensis { export class setulosus { duthieae(): caurinus.mahaganus, dogramacii.aurata> { var x: caurinus.mahaganus, dogramacii.aurata>; () => { var y = this; }; return x; } guereza(): howi.coludo { var x: howi.coludo; () => { var y = this; }; return x; } @@ -998,7 +998,7 @@ module panamensis { vampyrus(): julianae.oralis { var x: julianae.oralis; () => { var y = this; }; return x; } } } -module petrophilus { +namespace petrophilus { export class rosalia { palmeri(): panglima.amphibius>, trivirgatus.mixtus, panglima.amphibius>> { var x: panglima.amphibius>, trivirgatus.mixtus, panglima.amphibius>>; () => { var y = this; }; return x; } baeops(): Lanthanum.nitidus { var x: Lanthanum.nitidus; () => { var y = this; }; return x; } @@ -1007,7 +1007,7 @@ module petrophilus { montivaga(): panamensis.setulosus> { var x: panamensis.setulosus>; () => { var y = this; }; return x; } } } -module caurinus { +namespace caurinus { export class psilurus extends lutreolus.punicus { socialis(): panglima.amphibius { var x: panglima.amphibius; () => { var y = this; }; return x; } lundi(): petrophilus.sodyi { var x: petrophilus.sodyi; () => { var y = this; }; return x; } diff --git a/tests/cases/compiler/returnTypeParameterWithModules.ts b/tests/cases/compiler/returnTypeParameterWithModules.ts index 113d45c6df8..3b934b6b604 100644 --- a/tests/cases/compiler/returnTypeParameterWithModules.ts +++ b/tests/cases/compiler/returnTypeParameterWithModules.ts @@ -1,9 +1,9 @@ -module M1 { +namespace M1 { export function reduce(ar, f, e?): Array { return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); }; }; -module M2 { +namespace M2 { import A = M1 export function compose() { A.reduce(arguments, compose2); diff --git a/tests/cases/compiler/reuseInnerModuleMember.ts b/tests/cases/compiler/reuseInnerModuleMember.ts index e2f9900e73f..64b5859b5fc 100644 --- a/tests/cases/compiler/reuseInnerModuleMember.ts +++ b/tests/cases/compiler/reuseInnerModuleMember.ts @@ -9,6 +9,6 @@ declare module bar { } import f = require('./reuseInnerModuleMember_0'); -module bar { +namespace bar { var x: alpha; } diff --git a/tests/cases/compiler/selfRef.ts b/tests/cases/compiler/selfRef.ts index 1f8a079789c..1dd2b09907e 100644 --- a/tests/cases/compiler/selfRef.ts +++ b/tests/cases/compiler/selfRef.ts @@ -1,5 +1,5 @@ // @lib: es5 -module M +namespace M { export class Test { diff --git a/tests/cases/compiler/separate1-2.ts b/tests/cases/compiler/separate1-2.ts index e649b3efbea..504f2330a15 100644 --- a/tests/cases/compiler/separate1-2.ts +++ b/tests/cases/compiler/separate1-2.ts @@ -1,3 +1,3 @@ -module X { +namespace X { export function f() { } } \ No newline at end of file diff --git a/tests/cases/compiler/sourceMap-FileWithComments.ts b/tests/cases/compiler/sourceMap-FileWithComments.ts index 5dcf602c3de..6d2e940de85 100644 --- a/tests/cases/compiler/sourceMap-FileWithComments.ts +++ b/tests/cases/compiler/sourceMap-FileWithComments.ts @@ -7,7 +7,7 @@ interface IPoint { } // Module -module Shapes { +namespace Shapes { // Class export class Point implements IPoint { diff --git a/tests/cases/compiler/sourceMap-StringLiteralWithNewLine.ts b/tests/cases/compiler/sourceMap-StringLiteralWithNewLine.ts index a4103a0b62c..1f800cf995a 100644 --- a/tests/cases/compiler/sourceMap-StringLiteralWithNewLine.ts +++ b/tests/cases/compiler/sourceMap-StringLiteralWithNewLine.ts @@ -9,7 +9,7 @@ interface Window { } declare var window: Window; -module Foo { +namespace Foo { var x = "test1"; var y = "test 2\ isn't this a lot of fun"; diff --git a/tests/cases/compiler/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.ts b/tests/cases/compiler/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.ts index d12e894b0a9..707fec23b70 100644 --- a/tests/cases/compiler/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.ts +++ b/tests/cases/compiler/sourceMapForFunctionInInternalModuleWithCommentPrecedingStatement01.ts @@ -1,5 +1,5 @@ //@sourceMap: true -module Q { +namespace Q { function P() { // Test this var a = 1; diff --git a/tests/cases/compiler/sourceMapValidationModule.ts b/tests/cases/compiler/sourceMapValidationModule.ts index 8617d26a5b2..2ec0311b18a 100644 --- a/tests/cases/compiler/sourceMapValidationModule.ts +++ b/tests/cases/compiler/sourceMapValidationModule.ts @@ -1,10 +1,10 @@ // @sourcemap: true -module m2 { +namespace m2 { var a = 10; a++; } -module m3 { - module m4 { +namespace m3 { + namespace m4 { export var x = 30; } diff --git a/tests/cases/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.ts b/tests/cases/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.ts index 3705ade75c7..26f56667016 100644 --- a/tests/cases/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.ts +++ b/tests/cases/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.ts @@ -1,7 +1,7 @@ // @outFile: fooResult.js // @sourcemap: true // @Filename: a.ts -module M { +namespace M { export var X = 1; } interface Navigator { @@ -12,7 +12,7 @@ interface Navigator { } // @Filename: b.ts -module m1 { +namespace m1 { export class c1 { } } diff --git a/tests/cases/compiler/sourcemapValidationDuplicateNames.ts b/tests/cases/compiler/sourcemapValidationDuplicateNames.ts index 7d928054a2d..f2949f46be1 100644 --- a/tests/cases/compiler/sourcemapValidationDuplicateNames.ts +++ b/tests/cases/compiler/sourcemapValidationDuplicateNames.ts @@ -1,9 +1,9 @@ // @sourcemap: true -module m1 { +namespace m1 { var x = 10; export class c { } } -module m1 { +namespace m1 { var b = new m1.c(); } \ No newline at end of file diff --git a/tests/cases/compiler/specializationOfExportedClass.ts b/tests/cases/compiler/specializationOfExportedClass.ts index 8efe07276c1..3e4bff61302 100644 --- a/tests/cases/compiler/specializationOfExportedClass.ts +++ b/tests/cases/compiler/specializationOfExportedClass.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C { } diff --git a/tests/cases/compiler/staticMemberExportAccess.ts b/tests/cases/compiler/staticMemberExportAccess.ts index bdb26427efb..e508d10b7fe 100644 --- a/tests/cases/compiler/staticMemberExportAccess.ts +++ b/tests/cases/compiler/staticMemberExportAccess.ts @@ -4,7 +4,7 @@ class Sammy { return -1; } } -module Sammy { +namespace Sammy { export var x = 1; } interface JQueryStatic { diff --git a/tests/cases/compiler/staticMethodReferencingTypeArgument1.ts b/tests/cases/compiler/staticMethodReferencingTypeArgument1.ts index 9c68687c71c..f81238170c9 100644 --- a/tests/cases/compiler/staticMethodReferencingTypeArgument1.ts +++ b/tests/cases/compiler/staticMethodReferencingTypeArgument1.ts @@ -1,4 +1,4 @@ -module Editor { +namespace Editor { export class List { next: List; prev: List; diff --git a/tests/cases/compiler/statics.ts b/tests/cases/compiler/statics.ts index 5d87a6832f1..ffb0b195fd0 100644 --- a/tests/cases/compiler/statics.ts +++ b/tests/cases/compiler/statics.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C { x: number; constructor(public c1: number, public c2: number, c3: number) { diff --git a/tests/cases/compiler/staticsNotInScopeInClodule.ts b/tests/cases/compiler/staticsNotInScopeInClodule.ts index dc7143f5565..a5f0fba75db 100644 --- a/tests/cases/compiler/staticsNotInScopeInClodule.ts +++ b/tests/cases/compiler/staticsNotInScopeInClodule.ts @@ -2,6 +2,6 @@ class Clod { static x = 10; } -module Clod { +namespace Clod { var p = x; // x isn't in scope here } \ No newline at end of file diff --git a/tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts b/tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts index 24c4b7d6177..55245970e65 100644 --- a/tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts +++ b/tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts @@ -1,6 +1,6 @@ "use strict" -module public { } -module private { } +namespace public { } +namespace private { } module public.whatever { } module private.public.foo { } \ No newline at end of file diff --git a/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts b/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts index 2d88a86f791..9752f928c48 100644 --- a/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts +++ b/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts @@ -1,4 +1,4 @@ // @declaration: true -module m1 { +namespace m1 { export var n = { 'foo bar': 4 }; } diff --git a/tests/cases/compiler/structural1.ts b/tests/cases/compiler/structural1.ts index b07c2f2252c..c4417057140 100644 --- a/tests/cases/compiler/structural1.ts +++ b/tests/cases/compiler/structural1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export interface I { salt:number; pepper:number; diff --git a/tests/cases/compiler/structuralTypeInDeclareFileForModule.ts b/tests/cases/compiler/structuralTypeInDeclareFileForModule.ts index abc833d839a..12aec8fedfc 100644 --- a/tests/cases/compiler/structuralTypeInDeclareFileForModule.ts +++ b/tests/cases/compiler/structuralTypeInDeclareFileForModule.ts @@ -1,4 +1,4 @@ // @declaration: true -module M { export var x; } +namespace M { export var x; } var m = M; \ No newline at end of file diff --git a/tests/cases/compiler/super1.ts b/tests/cases/compiler/super1.ts index f4b509a9cb7..c982bc89e69 100644 --- a/tests/cases/compiler/super1.ts +++ b/tests/cases/compiler/super1.ts @@ -44,7 +44,7 @@ class SubE3 extends Base3 { } // Case 4 -module Base4 { +namespace Base4 { class Sub4 { public x(){ return "hello"; diff --git a/tests/cases/compiler/superAccessInFatArrow1.ts b/tests/cases/compiler/superAccessInFatArrow1.ts index 077a9659a25..a0125ad58e9 100644 --- a/tests/cases/compiler/superAccessInFatArrow1.ts +++ b/tests/cases/compiler/superAccessInFatArrow1.ts @@ -1,4 +1,4 @@ -module test { +namespace test { export class A { foo() { } diff --git a/tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts b/tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts index f472736c35f..b585ef890c7 100644 --- a/tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts +++ b/tests/cases/compiler/super_inside-object-literal-getters-and-setters.ts @@ -1,4 +1,4 @@ -module ObjectLiteral { +namespace ObjectLiteral { var ThisInObjectLiteral = { _foo: '1', get foo(): string { diff --git a/tests/cases/compiler/systemModuleConstEnums.ts b/tests/cases/compiler/systemModuleConstEnums.ts index 6ad7f31ef91..c3e37e3dbcc 100644 --- a/tests/cases/compiler/systemModuleConstEnums.ts +++ b/tests/cases/compiler/systemModuleConstEnums.ts @@ -8,6 +8,6 @@ export function foo() { use(M.NonTopLevelConstEnum.X); } -module M { +namespace M { export const enum NonTopLevelConstEnum { X } } \ No newline at end of file diff --git a/tests/cases/compiler/systemModuleConstEnumsSeparateCompilation.ts b/tests/cases/compiler/systemModuleConstEnumsSeparateCompilation.ts index 3813017639f..0a50934847c 100644 --- a/tests/cases/compiler/systemModuleConstEnumsSeparateCompilation.ts +++ b/tests/cases/compiler/systemModuleConstEnumsSeparateCompilation.ts @@ -9,6 +9,6 @@ export function foo() { use(M.NonTopLevelConstEnum.X); } -module M { +namespace M { export const enum NonTopLevelConstEnum { X } } \ No newline at end of file diff --git a/tests/cases/compiler/testContainerList.ts b/tests/cases/compiler/testContainerList.ts index 29a4fbd206c..f1ff9e72a0e 100644 --- a/tests/cases/compiler/testContainerList.ts +++ b/tests/cases/compiler/testContainerList.ts @@ -1,5 +1,5 @@ // Regression test for #325 -module A { +namespace A { class C { constructor(public d: {}) { } } diff --git a/tests/cases/compiler/thisAssignmentInNamespaceDeclaration1.ts b/tests/cases/compiler/thisAssignmentInNamespaceDeclaration1.ts index 4f17a3432d4..46cd5bb19ad 100644 --- a/tests/cases/compiler/thisAssignmentInNamespaceDeclaration1.ts +++ b/tests/cases/compiler/thisAssignmentInNamespaceDeclaration1.ts @@ -2,7 +2,7 @@ // @outDir: out/ // @filename: a.js -module foo { +namespace foo { this.bar = 4; } diff --git a/tests/cases/compiler/thisBinding.ts b/tests/cases/compiler/thisBinding.ts index 3381694d4df..86a5bc89aa0 100644 --- a/tests/cases/compiler/thisBinding.ts +++ b/tests/cases/compiler/thisBinding.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export interface I { z; } diff --git a/tests/cases/compiler/thisInModule.ts b/tests/cases/compiler/thisInModule.ts index 5d89fae1ca1..a96a674edcb 100644 --- a/tests/cases/compiler/thisInModule.ts +++ b/tests/cases/compiler/thisInModule.ts @@ -1,4 +1,4 @@ -module myMod { +namespace myMod { var x; this.x = 5; } \ No newline at end of file diff --git a/tests/cases/compiler/thisInModuleFunction1.ts b/tests/cases/compiler/thisInModuleFunction1.ts index a265cd80a56..8568f1c84e5 100644 --- a/tests/cases/compiler/thisInModuleFunction1.ts +++ b/tests/cases/compiler/thisInModuleFunction1.ts @@ -1,4 +1,4 @@ -module bar { +namespace bar { export function bar() { return this; } diff --git a/tests/cases/compiler/thisKeyword.ts b/tests/cases/compiler/thisKeyword.ts index cb0a4a4cc84..c625fe8776b 100644 --- a/tests/cases/compiler/thisKeyword.ts +++ b/tests/cases/compiler/thisKeyword.ts @@ -1,3 +1,3 @@ -module foo { +namespace foo { this.bar = 4; } \ No newline at end of file diff --git a/tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts b/tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts index e47e0d885eb..4dff237959e 100644 --- a/tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts +++ b/tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts @@ -2,7 +2,7 @@ enum TopLevelEnum { ThisWasAllowedButShouldNotBe = this // Should not be allowed } -module ModuleEnum { +namespace ModuleEnum { enum EnumInModule { WasADifferentError = this // this was handled as if this was in a module } diff --git a/tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts b/tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts index d23c2e5745f..18fc3e6ac18 100644 --- a/tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts +++ b/tests/cases/compiler/this_inside-object-literal-getters-and-setters.ts @@ -1,4 +1,4 @@ -module ObjectLiteral { +namespace ObjectLiteral { var ThisInObjectLiteral = { _foo: '1', get foo(): string { diff --git a/tests/cases/compiler/topLevel.ts b/tests/cases/compiler/topLevel.ts index 8a755a1dfba..f65df62a850 100644 --- a/tests/cases/compiler/topLevel.ts +++ b/tests/cases/compiler/topLevel.ts @@ -18,7 +18,7 @@ class Point implements IPoint { var result=""; result+=(new Point(3,4).move(2,2)); -module M { +namespace M { export var origin=new Point(0,0); } diff --git a/tests/cases/compiler/topLevelLambda.ts b/tests/cases/compiler/topLevelLambda.ts index c7d5945066f..32172be6cd1 100644 --- a/tests/cases/compiler/topLevelLambda.ts +++ b/tests/cases/compiler/topLevelLambda.ts @@ -1,3 +1,3 @@ -module M { +namespace M { var f = () => {this.window;} } diff --git a/tests/cases/compiler/typeResolution.ts b/tests/cases/compiler/typeResolution.ts index 8c87c0cdfe2..f0854468804 100644 --- a/tests/cases/compiler/typeResolution.ts +++ b/tests/cases/compiler/typeResolution.ts @@ -96,12 +96,12 @@ export module TopLevelModule1 { YisIn1(); } - module NotExportedModule { + namespace NotExportedModule { export class ClassA { } } } -module TopLevelModule2 { +namespace TopLevelModule2 { export module SubModule3 { export class ClassA { public AisIn2_3() { } diff --git a/tests/cases/compiler/typeValueConflict1.ts b/tests/cases/compiler/typeValueConflict1.ts index 96be66ded04..bc60a91a395 100644 --- a/tests/cases/compiler/typeValueConflict1.ts +++ b/tests/cases/compiler/typeValueConflict1.ts @@ -1,8 +1,8 @@ -module M1 { +namespace M1 { export class A { } } -module M2 { +namespace M2 { var M1 = 0; // Should error. M1 should bind to the variable, not to the module. class B extends M1.A { diff --git a/tests/cases/compiler/typeValueConflict2.ts b/tests/cases/compiler/typeValueConflict2.ts index 67c149bed55..83c6e3cd659 100644 --- a/tests/cases/compiler/typeValueConflict2.ts +++ b/tests/cases/compiler/typeValueConflict2.ts @@ -1,16 +1,16 @@ -module M1 { +namespace M1 { export class A { constructor(a: T) { } } } -module M2 { +namespace M2 { var M1 = 0; // Should error. M1 should bind to the variable, not to the module. class B extends M1.A { } } -module M3 { +namespace M3 { // Shouldn't error class B extends M1.A { } diff --git a/tests/cases/compiler/typeofInternalModules.ts b/tests/cases/compiler/typeofInternalModules.ts index b7f7508b7af..e08daa0c290 100644 --- a/tests/cases/compiler/typeofInternalModules.ts +++ b/tests/cases/compiler/typeofInternalModules.ts @@ -1,4 +1,4 @@ -module Outer { +namespace Outer { export module instantiated { export class C { } } diff --git a/tests/cases/compiler/undeclaredBase.ts b/tests/cases/compiler/undeclaredBase.ts index 8852a5b4355..ad07d58f575 100644 --- a/tests/cases/compiler/undeclaredBase.ts +++ b/tests/cases/compiler/undeclaredBase.ts @@ -1,2 +1,2 @@ -module M { export class C extends M.I { } } +namespace M { export class C extends M.I { } } diff --git a/tests/cases/compiler/undeclaredMethod.ts b/tests/cases/compiler/undeclaredMethod.ts index 184102087a8..8b1b486266b 100644 --- a/tests/cases/compiler/undeclaredMethod.ts +++ b/tests/cases/compiler/undeclaredMethod.ts @@ -1,5 +1,5 @@ -module M { +namespace M { export class C { public salt() {} } diff --git a/tests/cases/compiler/underscoreTest1.ts b/tests/cases/compiler/underscoreTest1.ts index dfe10cf02e2..92e16788e02 100644 --- a/tests/cases/compiler/underscoreTest1.ts +++ b/tests/cases/compiler/underscoreTest1.ts @@ -29,7 +29,7 @@ interface Tuple4 extends Array { 3: T3; } -module Underscore { +namespace Underscore { export interface WrappedObject { keys(): string[]; values(): any[]; diff --git a/tests/cases/compiler/unexportedInstanceClassVariables.ts b/tests/cases/compiler/unexportedInstanceClassVariables.ts index 1a45b5c0211..1d09e27b676 100644 --- a/tests/cases/compiler/unexportedInstanceClassVariables.ts +++ b/tests/cases/compiler/unexportedInstanceClassVariables.ts @@ -1,10 +1,10 @@ -module M{ +namespace M{ class A{ constructor(val:string){} } } -module M{ +namespace M{ class A {} var a = new A(); diff --git a/tests/cases/compiler/unknownSymbols2.ts b/tests/cases/compiler/unknownSymbols2.ts index 1568863652b..73b1706ec70 100644 --- a/tests/cases/compiler/unknownSymbols2.ts +++ b/tests/cases/compiler/unknownSymbols2.ts @@ -1,4 +1,4 @@ -module M { +namespace M { var x: asdf; var y = x + asdf; var z = x; // should be an error @@ -22,7 +22,7 @@ module M { var a = () => asdf; var b = (asdf) => { return qwerty }; - module N { + namespace N { var x = 1; } import c = N; diff --git a/tests/cases/compiler/unspecializedConstraints.ts b/tests/cases/compiler/unspecializedConstraints.ts index dd67a6f0013..f2d927acea4 100644 --- a/tests/cases/compiler/unspecializedConstraints.ts +++ b/tests/cases/compiler/unspecializedConstraints.ts @@ -1,4 +1,4 @@ -module ts { +namespace ts { interface Map { [index: string]: T; } diff --git a/tests/cases/compiler/unusedClassesinModule1.ts b/tests/cases/compiler/unusedClassesinModule1.ts index 0efc4966388..37e5c65c522 100644 --- a/tests/cases/compiler/unusedClassesinModule1.ts +++ b/tests/cases/compiler/unusedClassesinModule1.ts @@ -1,7 +1,7 @@ //@noUnusedLocals:true //@noUnusedParameters:true -module A { +namespace A { class Calculator { public handelChar() { } diff --git a/tests/cases/compiler/unusedImports10.ts b/tests/cases/compiler/unusedImports10.ts index 1cccfbd38bb..f7470e29d8d 100644 --- a/tests/cases/compiler/unusedImports10.ts +++ b/tests/cases/compiler/unusedImports10.ts @@ -1,13 +1,13 @@ //@noUnusedLocals:true //@noUnusedParameters:true -module A { +namespace A { export class Calculator { public handelChar() { } } } -module B { +namespace B { import a = A; } \ No newline at end of file diff --git a/tests/cases/compiler/unusedModuleInModule.ts b/tests/cases/compiler/unusedModuleInModule.ts index dc5f55398a7..2a6a98b900a 100644 --- a/tests/cases/compiler/unusedModuleInModule.ts +++ b/tests/cases/compiler/unusedModuleInModule.ts @@ -1,6 +1,6 @@ //@noUnusedLocals:true //@noUnusedParameters:true -module A { - module B {} +namespace A { + namespace B {} } \ No newline at end of file diff --git a/tests/cases/compiler/unusedNamespaceInModule.ts b/tests/cases/compiler/unusedNamespaceInModule.ts index adca8a84187..8de3768a201 100644 --- a/tests/cases/compiler/unusedNamespaceInModule.ts +++ b/tests/cases/compiler/unusedNamespaceInModule.ts @@ -1,7 +1,7 @@ //@noUnusedLocals:true //@noUnusedParameters:true -module A { +namespace A { namespace B { } export namespace C {} } \ No newline at end of file diff --git a/tests/cases/compiler/usingModuleWithExportImportInValuePosition.ts b/tests/cases/compiler/usingModuleWithExportImportInValuePosition.ts index 6a8c3680254..9f941127a24 100644 --- a/tests/cases/compiler/usingModuleWithExportImportInValuePosition.ts +++ b/tests/cases/compiler/usingModuleWithExportImportInValuePosition.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export var x = 'hello world' export class Point { constructor(public x: number, public y: number) { } @@ -9,7 +9,7 @@ export class Point { } } } -module C { +namespace C { export import a = A; } diff --git a/tests/cases/compiler/varBlock.ts b/tests/cases/compiler/varBlock.ts index 50ca1986333..c1bea788323 100644 --- a/tests/cases/compiler/varBlock.ts +++ b/tests/cases/compiler/varBlock.ts @@ -1,4 +1,4 @@ -module m2 { +namespace m2 { export var a, b2: number = 10, b; } @@ -21,7 +21,7 @@ declare var a2, b2, c2; declare var da = 10; declare var d3, d4 = 10; -module m3 { +namespace m3 { declare var d = 10; declare var d2, d3 = 10, d4 = 10; export declare var dE = 10; diff --git a/tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts b/tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts index 45d68eb17f4..7f240962a00 100644 --- a/tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts +++ b/tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts @@ -1,7 +1,7 @@ -module M1 { +namespace M1 { export var q = 5; export var s = ''; } -module M1 { +namespace M1 { export import q = M1.s; // Should be an error but isn't } \ No newline at end of file diff --git a/tests/cases/compiler/vararg.ts b/tests/cases/compiler/vararg.ts index 327b7fac2c3..f1da4b9f1fd 100644 --- a/tests/cases/compiler/vararg.ts +++ b/tests/cases/compiler/vararg.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C { public f(x:string,...rest:number[]) { var sum=0; diff --git a/tests/cases/compiler/vardecl.ts b/tests/cases/compiler/vardecl.ts index e5b96d6ef6d..8cdb4c8df22 100644 --- a/tests/cases/compiler/vardecl.ts +++ b/tests/cases/compiler/vardecl.ts @@ -59,7 +59,7 @@ var d4: { }; } -module m2 { +namespace m2 { export var a, b2: number = 10, b; var m1; diff --git a/tests/cases/compiler/variableDeclaratorResolvedDuringContextualTyping.ts b/tests/cases/compiler/variableDeclaratorResolvedDuringContextualTyping.ts index e794087e01e..af0f7338379 100644 --- a/tests/cases/compiler/variableDeclaratorResolvedDuringContextualTyping.ts +++ b/tests/cases/compiler/variableDeclaratorResolvedDuringContextualTyping.ts @@ -1,5 +1,5 @@ // @lib: es5 -module WinJS { +namespace WinJS { export interface ValueCallback { (value: any): any; } @@ -64,7 +64,7 @@ module WinJS { } } -module Services { +namespace Services { export interface IRequestService { /** * Returns the URL that can be used to access the provided service. The optional second argument can @@ -82,14 +82,14 @@ module Services { } } -module Errors { +namespace Errors { export class ConnectionError /* extends Error */ { constructor(request: XMLHttpRequest) { } } } -module Files { +namespace Files { export interface IUploadResult { stat: string; isNew: boolean; diff --git a/tests/cases/compiler/visSyntax.ts b/tests/cases/compiler/visSyntax.ts index 8dda6f91366..7c2686e00f7 100644 --- a/tests/cases/compiler/visSyntax.ts +++ b/tests/cases/compiler/visSyntax.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export class C { } diff --git a/tests/cases/compiler/withExportDecl.ts b/tests/cases/compiler/withExportDecl.ts index f3c926ad707..1745d4c49f3 100644 --- a/tests/cases/compiler/withExportDecl.ts +++ b/tests/cases/compiler/withExportDecl.ts @@ -37,7 +37,7 @@ export function exportedFunction() { return simpleFunction(); } -module m1 { +namespace m1 { export function foo() { return "Hello"; } diff --git a/tests/cases/compiler/withImportDecl.ts b/tests/cases/compiler/withImportDecl.ts index fa21d3f2315..5da2eb17be2 100644 --- a/tests/cases/compiler/withImportDecl.ts +++ b/tests/cases/compiler/withImportDecl.ts @@ -32,7 +32,7 @@ function simpleFunction() { }; } -module m1 { +namespace m1 { export function foo() { return "Hello"; } diff --git a/tests/cases/compiler/withStatementErrors.ts b/tests/cases/compiler/withStatementErrors.ts index 163424548c0..cf7440822e2 100644 --- a/tests/cases/compiler/withStatementErrors.ts +++ b/tests/cases/compiler/withStatementErrors.ts @@ -12,6 +12,6 @@ with (ooo.eee.oo.ah_ah.ting.tang.walla.walla) { // error interface I {} // error - module M {} // error + namespace M {} // error } diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts index 6bfce5fc58d..58dfe448013 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts @@ -1,5 +1,5 @@ //@target: ES5 -module M { +namespace M { var Symbol: any; export class C { diff --git a/tests/cases/conformance/ambient/ambientErrors.ts b/tests/cases/conformance/ambient/ambientErrors.ts index 81ee57c6ec9..78ffbd7136c 100644 --- a/tests/cases/conformance/ambient/ambientErrors.ts +++ b/tests/cases/conformance/ambient/ambientErrors.ts @@ -43,7 +43,7 @@ declare module M1 { } // Ambient external module not in the global module -module M2 { +namespace M2 { declare module 'nope' { } } diff --git a/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts b/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts index e2f24113c94..2705db43316 100644 --- a/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts +++ b/tests/cases/conformance/ambient/ambientInsideNonAmbient.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export declare var x; export declare function f(); export declare class C { } @@ -6,7 +6,7 @@ module M { export declare module M { } } -module M2 { +namespace M2 { declare var x; declare function f(); declare class C { } diff --git a/tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts b/tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts index c0ab4838f70..506f233bc94 100644 --- a/tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts +++ b/tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts @@ -36,6 +36,6 @@ class C { static async m6(): MyPromise { } } -module M { +namespace M { export async function f1() { } } \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncAwait_es2017.ts b/tests/cases/conformance/async/es2017/asyncAwait_es2017.ts index 7256762788b..49ad54f8c51 100644 --- a/tests/cases/conformance/async/es2017/asyncAwait_es2017.ts +++ b/tests/cases/conformance/async/es2017/asyncAwait_es2017.ts @@ -35,7 +35,7 @@ class C { static async m6(): MyPromise { } } -module M { +namespace M { export async function f1() { } } diff --git a/tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts b/tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts index 4ee04b2b3e9..3f62db28915 100644 --- a/tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts +++ b/tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts @@ -37,6 +37,6 @@ class C { static async m6(): MyPromise { } } -module M { +namespace M { export async function f1() { } } \ No newline at end of file diff --git a/tests/cases/conformance/async/es5/asyncAwait_es5.ts b/tests/cases/conformance/async/es5/asyncAwait_es5.ts index 5c33a42ab74..0254869bfd1 100644 --- a/tests/cases/conformance/async/es5/asyncAwait_es5.ts +++ b/tests/cases/conformance/async/es5/asyncAwait_es5.ts @@ -36,7 +36,7 @@ class C { static async m6(): MyPromise { } } -module M { +namespace M { export async function f1() { } } diff --git a/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts index 8e2cfd8c6c5..9033ec0478c 100644 --- a/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts +++ b/tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts @@ -36,6 +36,6 @@ class C { static async m6(): MyPromise { } } -module M { +namespace M { export async function f1() { } } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/asyncAwait_es6.ts b/tests/cases/conformance/async/es6/asyncAwait_es6.ts index 203d748e114..e462305f0ab 100644 --- a/tests/cases/conformance/async/es6/asyncAwait_es6.ts +++ b/tests/cases/conformance/async/es6/asyncAwait_es6.ts @@ -35,7 +35,7 @@ class C { static async m6(): MyPromise { } } -module M { +namespace M { export async function f1() { } } diff --git a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts index 165a3d7a2e6..fa3adef4ac6 100644 --- a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts +++ b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractImportInstantiation.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export abstract class A {} new A; diff --git a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInAModule.ts b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInAModule.ts index f31dd41436e..47beda288b6 100644 --- a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInAModule.ts +++ b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInAModule.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export abstract class A {} export class B extends A {} } diff --git a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts index 6e5686feb25..71dd571925a 100644 --- a/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts +++ b/tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMergedDeclaration.ts @@ -1,7 +1,7 @@ abstract class CM {} -module CM {} +namespace CM {} -module MC {} +namespace MC {} abstract class MC {} abstract class CI {} diff --git a/tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts b/tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts index 27ea77644a6..2f64647e608 100644 --- a/tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts +++ b/tests/cases/conformance/classes/classDeclarations/classAndInterfaceWithSameName.ts @@ -1,7 +1,7 @@ class C { foo: string; } interface C { foo: string; } -module M { +namespace M { class D { bar: string; } diff --git a/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts b/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts index cd42d742101..f0cb739e3c8 100644 --- a/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts +++ b/tests/cases/conformance/classes/classDeclarations/classAndVariableWithSameName.ts @@ -1,7 +1,7 @@ class C { foo: string; } // error var C = ''; // error -module M { +namespace M { class D { // error bar: string; } diff --git a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts index a7250cd1330..f2eef7c7ce1 100644 --- a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts +++ b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts @@ -7,7 +7,7 @@ class C2 extends { foo: string; } { } // error var x: { foo: string; } class C3 extends x { } // error -module M { export var x = 1; } +namespace M { export var x = 1; } class C4 extends M { } // error function foo() { } diff --git a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts index 2806b30a185..548d0d6e8ff 100644 --- a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts +++ b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsItselfIndirectly2.ts @@ -1,22 +1,22 @@ class C extends N.E { foo: string; } // error -module M { +namespace M { export class D extends C { bar: string; } } -module N { +namespace N { export class E extends M.D { baz: number; } } -module O { +namespace O { class C2 extends Q.E2 { foo: T; } // error - module P { + namespace P { export class D2 extends C2 { bar: T; } } - module Q { + namespace Q { export class E2 extends P.D2 { baz: T; } } } \ No newline at end of file diff --git a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts index c30f3fceab6..011da17831c 100644 --- a/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts +++ b/tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsShadowedConstructorFunction.ts @@ -1,6 +1,6 @@ class C { foo: string; } -module M { +namespace M { var C = 1; class D extends C { // error, C must evaluate to constructor function bar: string; diff --git a/tests/cases/conformance/classes/classDeclarations/mergeClassInterfaceAndModule.ts b/tests/cases/conformance/classes/classDeclarations/mergeClassInterfaceAndModule.ts index d39c56ed07e..19033bcef01 100644 --- a/tests/cases/conformance/classes/classDeclarations/mergeClassInterfaceAndModule.ts +++ b/tests/cases/conformance/classes/classDeclarations/mergeClassInterfaceAndModule.ts @@ -1,16 +1,16 @@ interface C1 {} declare class C1 {} -module C1 {} +namespace C1 {} declare class C2 {} interface C2 {} -module C2 {} +namespace C2 {} declare class C3 {} -module C3 {} +namespace C3 {} interface C3 {} -module C4 {} +namespace C4 {} declare class C4 {} // error -- class declaration must precede module declaration interface C4 {} \ No newline at end of file diff --git a/tests/cases/conformance/classes/classExpression.ts b/tests/cases/conformance/classes/classExpression.ts index 31d234bf136..8264dc3b169 100644 --- a/tests/cases/conformance/classes/classExpression.ts +++ b/tests/cases/conformance/classes/classExpression.ts @@ -6,7 +6,7 @@ var y = { } } -module M { +namespace M { var z = class C4 { } } \ No newline at end of file diff --git a/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts b/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts index 1c9a801429d..a958d9923fb 100644 --- a/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts +++ b/tests/cases/conformance/classes/constructorDeclarations/classConstructorAccessibility.ts @@ -16,7 +16,7 @@ var c = new C(1); var d = new D(1); // error var e = new E(1); // error -module Generic { +namespace Generic { class C { public constructor(public x: T) { } } diff --git a/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts b/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts index 876c71630f3..180e20b8829 100644 --- a/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts +++ b/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule.ts @@ -5,6 +5,6 @@ class C { private static bar: string; } -module C { +namespace C { export var y = C.bar; // error } \ No newline at end of file diff --git a/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts b/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts index ac054d51c26..0a306041b8f 100644 --- a/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts +++ b/tests/cases/conformance/classes/members/accessibility/privateStaticNotAccessibleInClodule2.ts @@ -9,6 +9,6 @@ class D extends C { baz: number; } -module D { +namespace D { export var y = D.bar; // error } \ No newline at end of file diff --git a/tests/cases/conformance/classes/members/accessibility/protectedStaticNotAccessibleInClodule.ts b/tests/cases/conformance/classes/members/accessibility/protectedStaticNotAccessibleInClodule.ts index 10b1e586996..ec8dd63e4dc 100644 --- a/tests/cases/conformance/classes/members/accessibility/protectedStaticNotAccessibleInClodule.ts +++ b/tests/cases/conformance/classes/members/accessibility/protectedStaticNotAccessibleInClodule.ts @@ -5,7 +5,7 @@ class C { protected static bar: string; } -module C { +namespace C { export var f = C.foo; // OK export var b = C.bar; // error } \ No newline at end of file diff --git a/tests/cases/conformance/classes/members/classTypes/genericSetterInClassType.ts b/tests/cases/conformance/classes/members/classTypes/genericSetterInClassType.ts index ce695924992..bcf138e2db6 100644 --- a/tests/cases/conformance/classes/members/classTypes/genericSetterInClassType.ts +++ b/tests/cases/conformance/classes/members/classTypes/genericSetterInClassType.ts @@ -1,6 +1,6 @@ // @target: esnext -module Generic { +namespace Generic { class C { get y(): T { return 1 as never; diff --git a/tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts b/tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts index 050729d4d47..c83805b73f2 100644 --- a/tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts +++ b/tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts @@ -1,4 +1,4 @@ -module NonGeneric { +namespace NonGeneric { class C { x: string; get y() { @@ -20,7 +20,7 @@ module NonGeneric { } -module Generic { +namespace Generic { class C { x: T; get y() { diff --git a/tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts b/tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts index c0c0c2572ef..43f250f2498 100644 --- a/tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts +++ b/tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts @@ -1,4 +1,4 @@ -module NonGeneric { +namespace NonGeneric { class C { x: string; get y() { @@ -18,7 +18,7 @@ module NonGeneric { } -module Generic { +namespace Generic { class C { x: T; get y() { diff --git a/tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts b/tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts index ce8203f58a5..4f0eb44fcbc 100644 --- a/tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts +++ b/tests/cases/conformance/classes/members/classTypes/staticPropertyNotInClassType.ts @@ -1,4 +1,4 @@ -module NonGeneric { +namespace NonGeneric { class C { fn() { return this; } static get x() { return 1; } @@ -7,7 +7,7 @@ module NonGeneric { static foo: string; // not reflected in class type } - module C { + namespace C { export var bar = ''; // not reflected in class type } @@ -18,7 +18,7 @@ module NonGeneric { var r6 = c.x; // error } -module Generic { +namespace Generic { class C { fn() { return this; } static get x() { return 1; } @@ -27,7 +27,7 @@ module Generic { static foo: T; // not reflected in class type } - module C { + namespace C { export var bar = ''; // not reflected in class type } diff --git a/tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts b/tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts index 5444dcd6845..c401c60c986 100644 --- a/tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts +++ b/tests/cases/conformance/classes/members/constructorFunctionTypes/classWithConstructors.ts @@ -1,4 +1,4 @@ -module NonGeneric { +namespace NonGeneric { class C { constructor(x: string) { } } @@ -23,7 +23,7 @@ module NonGeneric { var d3 = new D(''); // ok } -module Generics { +namespace Generics { class C { constructor(x: T) { } } diff --git a/tests/cases/conformance/classes/members/constructorFunctionTypes/constructorHasPrototypeProperty.ts b/tests/cases/conformance/classes/members/constructorFunctionTypes/constructorHasPrototypeProperty.ts index 11c5124d28d..5532872d535 100644 --- a/tests/cases/conformance/classes/members/constructorFunctionTypes/constructorHasPrototypeProperty.ts +++ b/tests/cases/conformance/classes/members/constructorFunctionTypes/constructorHasPrototypeProperty.ts @@ -1,4 +1,4 @@ -module NonGeneric { +namespace NonGeneric { class C { foo: string; } @@ -13,7 +13,7 @@ module NonGeneric { r2.bar; } -module Generic { +namespace Generic { class C { foo: T; bar: U; diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts index 71096e7b8f3..1ecd80f7b0d 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts @@ -226,7 +226,7 @@ var StaticArgumentsFn_Anonymous2 = class { // === Static properties on default exported classes === // name -module TestOnDefaultExportedClass_1 { +namespace TestOnDefaultExportedClass_1 { class StaticName { static name: number; // error without useDefineForClassFields name: string; // ok @@ -238,7 +238,7 @@ export class ExportedStaticName { [FunctionPropertyNames.name]: string; // ok } -module TestOnDefaultExportedClass_2 { +namespace TestOnDefaultExportedClass_2 { class StaticNameFn { static name() {} // error without useDefineForClassFields name() {} // ok @@ -251,7 +251,7 @@ export class ExportedStaticNameFn { } // length -module TestOnDefaultExportedClass_3 { +namespace TestOnDefaultExportedClass_3 { export default class StaticLength { static length: number; // error without useDefineForClassFields length: string; // ok @@ -263,7 +263,7 @@ export class ExportedStaticLength { [FunctionPropertyNames.length]: string; // ok } -module TestOnDefaultExportedClass_4 { +namespace TestOnDefaultExportedClass_4 { export default class StaticLengthFn { static length() {} // error without useDefineForClassFields length() {} // ok @@ -276,7 +276,7 @@ export class ExportedStaticLengthFn { } // prototype -module TestOnDefaultExportedClass_5 { +namespace TestOnDefaultExportedClass_5 { export default class StaticPrototype { static prototype: number; // always an error prototype: string; // ok @@ -288,7 +288,7 @@ export class ExportedStaticPrototype { [FunctionPropertyNames.prototype]: string; // ok } -module TestOnDefaultExportedClass_6 { +namespace TestOnDefaultExportedClass_6 { export default class StaticPrototypeFn { static prototype() {} // always an error prototype() {} // ok @@ -301,7 +301,7 @@ export class ExportedStaticPrototypeFn { } // caller -module TestOnDefaultExportedClass_7 { +namespace TestOnDefaultExportedClass_7 { export default class StaticCaller { static caller: number; // error without useDefineForClassFields caller: string; // ok @@ -313,7 +313,7 @@ export class ExportedStaticCaller { [FunctionPropertyNames.caller]: string; // ok } -module TestOnDefaultExportedClass_8 { +namespace TestOnDefaultExportedClass_8 { export default class StaticCallerFn { static caller() {} // error without useDefineForClassFields caller() {} // ok @@ -326,7 +326,7 @@ export class ExportedStaticCallerFn { } // arguments -module TestOnDefaultExportedClass_9 { +namespace TestOnDefaultExportedClass_9 { export default class StaticArguments { static arguments: number; // error without useDefineForClassFields arguments: string; // ok @@ -338,7 +338,7 @@ export class ExportedStaticArguments { [FunctionPropertyNames.arguments]: string; // ok } -module TestOnDefaultExportedClass_10 { +namespace TestOnDefaultExportedClass_10 { export default class StaticArgumentsFn { static arguments() {} // error without useDefineForClassFields arguments() {} // ok diff --git a/tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts b/tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts index 4f0e9f7f4e5..e8c55518382 100644 --- a/tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts +++ b/tests/cases/conformance/declarationEmit/classDoesNotDependOnPrivateMember.ts @@ -1,5 +1,5 @@ //@declaration: true -module M { +namespace M { interface I { } export class C { private x: I; diff --git a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts index 26a01cb855b..991c2fab49b 100644 --- a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts +++ b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod11.ts @@ -1,6 +1,6 @@ // @target: ES5 // @experimentaldecorators: true -module M { +namespace M { class C { decorator(target: Object, key: string): void { } diff --git a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod12.ts b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod12.ts index e353d0db587..a2df01509fb 100644 --- a/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod12.ts +++ b/tests/cases/conformance/decorators/class/method/decoratorOnClassMethod12.ts @@ -1,6 +1,6 @@ // @target: ES5 // @experimentaldecorators: true -module M { +namespace M { class S { decorator(target: Object, key: string): void { } } diff --git a/tests/cases/conformance/decorators/invalid/decoratorOnImportEquals1.ts b/tests/cases/conformance/decorators/invalid/decoratorOnImportEquals1.ts index b5990252355..c5558fcb07b 100644 --- a/tests/cases/conformance/decorators/invalid/decoratorOnImportEquals1.ts +++ b/tests/cases/conformance/decorators/invalid/decoratorOnImportEquals1.ts @@ -1,10 +1,10 @@ declare function dec(target: T): T; -module M1 { +namespace M1 { export var X: number; } -module M2 { +namespace M2 { @dec import X = M1.X; } \ No newline at end of file diff --git a/tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts b/tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts index 3f7c57b6ae9..03970473c87 100644 --- a/tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts +++ b/tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts @@ -1,6 +1,6 @@ declare function dec(target: T): T; @dec -module M { +namespace M { } \ No newline at end of file diff --git a/tests/cases/conformance/enums/enumMerging.ts b/tests/cases/conformance/enums/enumMerging.ts index 6f1061c338f..51ed3d4757a 100644 --- a/tests/cases/conformance/enums/enumMerging.ts +++ b/tests/cases/conformance/enums/enumMerging.ts @@ -1,6 +1,6 @@ // Enum with only constant members across 2 declarations with the same root module // Enum with initializer in all declarations with constant members with the same root module -module M1 { +namespace M1 { enum EImpl1 { A, B, C } @@ -21,7 +21,7 @@ module M1 { } // Enum with only computed members across 2 declarations with the same root module -module M2 { +namespace M2 { export enum EComp2 { A = 'foo'.length, B = 'foo'.length, C = 'foo'.length } @@ -34,7 +34,7 @@ module M2 { } // Enum with initializer in only one of two declarations with constant members with the same root module -module M3 { +namespace M3 { enum EInit { A, B @@ -46,17 +46,17 @@ module M3 { } // Enums with same name but different root module -module M4 { +namespace M4 { export enum Color { Red, Green, Blue } } -module M5 { +namespace M5 { export enum Color { Red, Green, Blue } } module M6.A { export enum Color { Red, Green, Blue } } -module M6 { +namespace M6 { export module A { export enum Color { Yellow = 1 } } diff --git a/tests/cases/conformance/enums/enumMergingErrors.ts b/tests/cases/conformance/enums/enumMergingErrors.ts index 6904b14da33..995058556fb 100644 --- a/tests/cases/conformance/enums/enumMergingErrors.ts +++ b/tests/cases/conformance/enums/enumMergingErrors.ts @@ -1,40 +1,40 @@ // Enum with constant, computed, constant members split across 3 declarations with the same root module -module M { +namespace M { export enum E1 { A = 0 } export enum E2 { C } export enum E3 { A = 0 } } -module M { +namespace M { export enum E1 { B = 'foo'.length } export enum E2 { B = 'foo'.length } export enum E3 { C } } -module M { +namespace M { export enum E1 { C } export enum E2 { A = 0 } export enum E3 { B = 'foo'.length } } // Enum with no initializer in either declaration with constant members with the same root module -module M1 { +namespace M1 { export enum E1 { A = 0 } } -module M1 { +namespace M1 { export enum E1 { B } } -module M1 { +namespace M1 { export enum E1 { C } } // Enum with initializer in only one of three declarations with constant members with the same root module -module M2 { +namespace M2 { export enum E1 { A } } -module M2 { +namespace M2 { export enum E1 { B = 0 } } -module M2 { +namespace M2 { export enum E1 { C } } diff --git a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts index 8422b1ec016..4205cf198f9 100644 --- a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts +++ b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts @@ -1,6 +1,6 @@ //@target: ES6 //@declaration: true -module M { +namespace M { interface I { } export class C { [Symbol.iterator]: I; diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty48.ts b/tests/cases/conformance/es6/Symbols/symbolProperty48.ts index 77ce9303b44..b8d63f74fe8 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty48.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty48.ts @@ -1,5 +1,5 @@ //@target: ES6 -module M { +namespace M { var Symbol; class C { diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty49.ts b/tests/cases/conformance/es6/Symbols/symbolProperty49.ts index bc34e146f2c..aa1ae1290c9 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty49.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty49.ts @@ -1,5 +1,5 @@ //@target: ES6 -module M { +namespace M { export var Symbol; class C { diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty50.ts b/tests/cases/conformance/es6/Symbols/symbolProperty50.ts index 8bcf25fab29..1d42bd4ef31 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty50.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty50.ts @@ -1,5 +1,5 @@ //@target: ES6 -module M { +namespace M { interface Symbol { } class C { diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty51.ts b/tests/cases/conformance/es6/Symbols/symbolProperty51.ts index 3da5d45bf84..523083d2370 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty51.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty51.ts @@ -1,6 +1,6 @@ //@target: ES6 -module M { - module Symbol { } +namespace M { + namespace Symbol { } class C { [Symbol.iterator]() { } diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty55.ts b/tests/cases/conformance/es6/Symbols/symbolProperty55.ts index 3c6ceb69b0e..03b368be884 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty55.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty55.ts @@ -3,7 +3,7 @@ var obj = { [Symbol.iterator]: 0 }; -module M { +namespace M { var Symbol: SymbolConstructor; // The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator, // the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol. diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty56.ts b/tests/cases/conformance/es6/Symbols/symbolProperty56.ts index ae9e5232b9b..a77c88a5637 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty56.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty56.ts @@ -3,7 +3,7 @@ var obj = { [Symbol.iterator]: 0 }; -module M { +namespace M { var Symbol: {}; // The following should be of type 'any'. This is because even though obj has a property keyed by Symbol.iterator, // the key passed in here is the *wrong* Symbol.iterator. It is not the iterator property of the global Symbol. diff --git a/tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts b/tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts index bd984ba4da0..6b932ded440 100644 --- a/tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts +++ b/tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts @@ -53,7 +53,7 @@ foo(() foo(() => { return false; }); -module m { +namespace m { class City { constructor(x: number, thing = () => 100) { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts index 87a1bf81178..1b924d4f8d7 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES5.ts @@ -1,5 +1,5 @@ // @target: es5 -module M { +namespace M { var obj = { [this.bar]: 0 } diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts index 3dbf97d7f7a..0dacc40f0fc 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames19_ES6.ts @@ -1,5 +1,5 @@ // @target: es6 -module M { +namespace M { var obj = { [this.bar]: 0 } diff --git a/tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts b/tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts index 9167239cefd..a5e663640fb 100644 --- a/tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts +++ b/tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts @@ -105,7 +105,7 @@ f14([2, ["abc", { x: 0, y: true }]]); f14([2, ["abc", { x: 0 }]]); f14([2, ["abc", { y: false }]]); // Error, no x -module M { +namespace M { export var [a, b] = [1, 2]; } diff --git a/tests/cases/conformance/es6/modules/exportsAndImports1-amd.ts b/tests/cases/conformance/es6/modules/exportsAndImports1-amd.ts index e688c0467ba..a1d005c8fa9 100644 --- a/tests/cases/conformance/es6/modules/exportsAndImports1-amd.ts +++ b/tests/cases/conformance/es6/modules/exportsAndImports1-amd.ts @@ -14,10 +14,10 @@ enum E { const enum D { A, B, C } -module M { +namespace M { export var x; } -module N { +namespace N { export interface I { } } diff --git a/tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts b/tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts index 16d8f2addf4..7e29bc0b79e 100644 --- a/tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts +++ b/tests/cases/conformance/es6/modules/exportsAndImports1-es6.ts @@ -14,10 +14,10 @@ enum E { const enum D { A, B, C } -module M { +namespace M { export var x; } -module N { +namespace N { export interface I { } } diff --git a/tests/cases/conformance/es6/modules/exportsAndImports1.ts b/tests/cases/conformance/es6/modules/exportsAndImports1.ts index 5b91d1d6ccd..7775a425b2e 100644 --- a/tests/cases/conformance/es6/modules/exportsAndImports1.ts +++ b/tests/cases/conformance/es6/modules/exportsAndImports1.ts @@ -13,10 +13,10 @@ enum E { const enum D { A, B, C } -module M { +namespace M { export var x; } -module N { +namespace N { export interface I { } } diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts index 7da6e7b0c70..8d69d1efdb2 100644 --- a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesErrorWithModule.ts @@ -1,10 +1,10 @@ // module export var x = "Foo"; -module m { +namespace m { export var x; } -module n { +namespace n { var z = 10000; export var y = { m.x // error diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModule.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModule.ts index 005885bb901..e5c14eb4bc5 100644 --- a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModule.ts +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModule.ts @@ -1,10 +1,10 @@ // module export -module m { +namespace m { export var x; } -module m { +namespace m { var z = x; var y = { a: x, diff --git a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModuleES6.ts b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModuleES6.ts index f8937625afe..0fb20b3a15a 100644 --- a/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModuleES6.ts +++ b/tests/cases/conformance/es6/shorthandPropertyAssignment/objectLiteralShorthandPropertiesWithModuleES6.ts @@ -1,10 +1,10 @@ // @target: es6 -module m { +namespace m { export var x; } -module m { +namespace m { var z = x; var y = { a: x, diff --git a/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext6.ts b/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext6.ts index fb7c358f189..4d939cecd13 100644 --- a/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext6.ts +++ b/tests/cases/conformance/es6/yieldExpressions/generatorInAmbientContext6.ts @@ -1,5 +1,5 @@ //@target: ES6 //@declaration: true -module M { +namespace M { export function *generator(): any { } } \ No newline at end of file diff --git a/tests/cases/conformance/es6/yieldExpressions/generatorOverloads1.ts b/tests/cases/conformance/es6/yieldExpressions/generatorOverloads1.ts index c21ecea7826..8efc62152d5 100644 --- a/tests/cases/conformance/es6/yieldExpressions/generatorOverloads1.ts +++ b/tests/cases/conformance/es6/yieldExpressions/generatorOverloads1.ts @@ -1,5 +1,5 @@ //@target: ES6 -module M { +namespace M { function* f(s: string): Iterable; function* f(s: number): Iterable; function* f(s: any): Iterable { } diff --git a/tests/cases/conformance/es6/yieldExpressions/generatorOverloads5.ts b/tests/cases/conformance/es6/yieldExpressions/generatorOverloads5.ts index 1efa9af0839..4c18b288ab4 100644 --- a/tests/cases/conformance/es6/yieldExpressions/generatorOverloads5.ts +++ b/tests/cases/conformance/es6/yieldExpressions/generatorOverloads5.ts @@ -1,5 +1,5 @@ //@target: ES6 -module M { +namespace M { function f(s: string): Iterable; function f(s: number): Iterable; function* f(s: any): Iterable { } diff --git a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts index 2964561dc63..14bbc3c4be7 100644 --- a/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts +++ b/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts @@ -22,7 +22,7 @@ function foo() { this **= value; // identifiers: module, class, enum, function -module M { export var a; } +namespace M { export var a; } M **= value; C **= value; diff --git a/tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts b/tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts index 30b8df4268a..47c6ab7ccda 100644 --- a/tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts +++ b/tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts @@ -13,7 +13,7 @@ function foo() { this = value; } this = value; // identifiers: module, class, enum, function -module M { export var a; } +namespace M { export var a; } M = value; C = value; diff --git a/tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts b/tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts index 8eb50d2f64a..e91216d959a 100644 --- a/tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts +++ b/tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts @@ -28,7 +28,7 @@ this *= value; this += value; // identifiers: module, class, enum, function -module M { export var a; } +namespace M { export var a; } M *= value; M += value; diff --git a/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts b/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts index 87e2d134bf7..cf4e0b44b88 100644 --- a/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts +++ b/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithAnyAndEveryType.ts @@ -4,7 +4,7 @@ class C { static foo() { } } enum E { a, b, c } -module M { export var a } +namespace M { export var a } var a: any; var b: boolean; diff --git a/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts b/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts index 910ec6674dd..59153b0a33c 100644 --- a/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts +++ b/tests/cases/conformance/expressions/binaryOperators/additionOperator/additionOperatorWithInvalidOperands.ts @@ -4,7 +4,7 @@ class C { static foo() { } } enum E { a, b, c } -module M { export var a } +namespace M { export var a } var a: boolean; var b: number; diff --git a/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts b/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts index d6bfd84fd9a..5900614debb 100644 --- a/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts +++ b/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts @@ -185,30 +185,30 @@ var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; -module x181 { var t: () => Base[] = () => [d1, d2]; } -module x182 { var t: () => Base[] = function() { return [d1, d2] }; } -module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } -module x184 { var t: { (): Base[]; } = () => [d1, d2]; } -module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } -module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } -module x187 { var t: Base[] = [d1, d2]; } -module x188 { var t: Array = [d1, d2]; } -module x189 { var t: { [n: number]: Base; } = [d1, d2]; } -module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } -module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } -module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } -module x193 { export var t: () => Base[] = () => [d1, d2]; } -module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } -module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } -module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } -module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } -module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } -module x199 { export var t: Base[] = [d1, d2]; } -module x200 { export var t: Array = [d1, d2]; } -module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } -module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } -module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } -module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } +namespace x181 { var t: () => Base[] = () => [d1, d2]; } +namespace x182 { var t: () => Base[] = function() { return [d1, d2] }; } +namespace x183 { var t: () => Base[] = function named() { return [d1, d2] }; } +namespace x184 { var t: { (): Base[]; } = () => [d1, d2]; } +namespace x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } +namespace x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } +namespace x187 { var t: Base[] = [d1, d2]; } +namespace x188 { var t: Array = [d1, d2]; } +namespace x189 { var t: { [n: number]: Base; } = [d1, d2]; } +namespace x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } +namespace x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } +namespace x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } +namespace x193 { export var t: () => Base[] = () => [d1, d2]; } +namespace x194 { export var t: () => Base[] = function() { return [d1, d2] }; } +namespace x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } +namespace x196 { export var t: { (): Base[]; } = () => [d1, d2]; } +namespace x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } +namespace x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } +namespace x199 { export var t: Base[] = [d1, d2]; } +namespace x200 { export var t: Array = [d1, d2]; } +namespace x201 { export var t: { [n: number]: Base; } = [d1, d2]; } +namespace x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } +namespace x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } +namespace x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } var x206 = <() => Base[]>function() { return [d1, d2] }; var x207 = <() => Base[]>function named() { return [d1, d2] }; var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; diff --git a/tests/cases/conformance/expressions/functionCalls/forgottenNew.ts b/tests/cases/conformance/expressions/functionCalls/forgottenNew.ts index 9b7f2e695f7..a0147c9263e 100644 --- a/tests/cases/conformance/expressions/functionCalls/forgottenNew.ts +++ b/tests/cases/conformance/expressions/functionCalls/forgottenNew.ts @@ -1,4 +1,4 @@ -module Tools { +namespace Tools { export class NullLogger { } } diff --git a/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts b/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts index 811beec796b..a3aa4eafc07 100644 --- a/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts +++ b/tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts @@ -33,13 +33,13 @@ enum E { } // Arrow function as module variable initializer -module M { +namespace M { export var a = (s) => ''; var b = (s) => s; } // Repeat above for module members that are functions? (necessary to redo all of them?) -module M2 { +namespace M2 { // Arrow function used in with statement with (window) { var p = () => this; @@ -74,7 +74,7 @@ module M2 { } // Arrow function as module variable initializer - module M { + namespace M { export var a = (s) => ''; var b = (s) => s; } diff --git a/tests/cases/conformance/expressions/functions/typeOfThisInFunctionExpression.ts b/tests/cases/conformance/expressions/functions/typeOfThisInFunctionExpression.ts index 846b833f3a1..f9604531152 100644 --- a/tests/cases/conformance/expressions/functions/typeOfThisInFunctionExpression.ts +++ b/tests/cases/conformance/expressions/functions/typeOfThisInFunctionExpression.ts @@ -26,7 +26,7 @@ class C { } } -module M { +namespace M { function fn() { var p = this; var p: any; diff --git a/tests/cases/conformance/expressions/identifiers/scopeResolutionIdentifiers.ts b/tests/cases/conformance/expressions/identifiers/scopeResolutionIdentifiers.ts index 8b0a1d48939..cfaf6a17788 100644 --- a/tests/cases/conformance/expressions/identifiers/scopeResolutionIdentifiers.ts +++ b/tests/cases/conformance/expressions/identifiers/scopeResolutionIdentifiers.ts @@ -1,13 +1,13 @@ // EveryType used in a nested scope of a different EveryType with the same name, type of the identifier is the one defined in the inner scope var s: string; -module M1 { +namespace M1 { export var s: number; var n = s; var n: number; } -module M2 { +namespace M2 { var s: number; var n = s; var n: number; @@ -28,9 +28,9 @@ class C { } } -module M3 { +namespace M3 { var s: any; - module M4 { + namespace M4 { var n = s; var n: any; } diff --git a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts index fdcb9c410b4..3d408c1af33 100644 --- a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts +++ b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts @@ -18,7 +18,7 @@ class ClassWithInitializer extends BaseErrClass { } } -module M { +namespace M { //'this' in module variable var x = this; // Error } diff --git a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts index 7791be14650..bf017ea7084 100644 --- a/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts +++ b/tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts @@ -18,7 +18,7 @@ class ClassWithInitializer extends BaseErrClass { } } -module M { +namespace M { //'this' in module variable var x = this; // Error } diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts index f1ba854394b..f73a2672d44 100644 --- a/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInFunctionAndModuleBlock.ts @@ -49,9 +49,9 @@ function foo5(x: number | string | boolean) { } } } -module m { +namespace m { var x: number | string | boolean; - module m2 { + namespace m2 { var b = x; // new scope - number | boolean | string var y: string; if (typeof x === "string") { @@ -63,7 +63,7 @@ module m { } } } -module m1 { +namespace m1 { var x: number | string | boolean; module m2.m3 { var b = x; // new scope - number | boolean | string diff --git a/tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts b/tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts index fd5f432ebdb..dc0ab5dfdd3 100644 --- a/tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts +++ b/tests/cases/conformance/expressions/typeGuards/typeGuardsInModule.ts @@ -6,7 +6,7 @@ var num: number; var strOrNum: string | number; var var1: string | number; // Inside module -module m1 { +namespace m1 { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string @@ -29,10 +29,10 @@ module m1 { } } // local module -module m2 { +namespace m2 { var var2: string | number; export var var3: string | number; - module m3 { + namespace m3 { // global vars in function declaration num = typeof var1 === "string" && var1.length; // string diff --git a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts index 115706d5d37..b7b63b1371d 100644 --- a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithAnyOtherType.ts @@ -19,7 +19,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts index 3235901d622..449c0079c21 100644 --- a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithBooleanType.ts @@ -9,7 +9,7 @@ class A { public a: boolean; static foo() { return false; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts index b41a114503d..f80a73f7c59 100644 --- a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithNumberType.ts @@ -10,7 +10,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts index 0b60c73ef94..e0b261cf484 100644 --- a/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/bitwiseNotOperator/bitwiseNotOperatorWithStringType.ts @@ -10,7 +10,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherType.ts index f8efeb81ecb..b6562299cb7 100644 --- a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherType.ts @@ -7,7 +7,7 @@ var obj = {x:1,y:null}; class A { public a: any; } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts index d5dd62de442..610fea7443c 100644 --- a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts +++ b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts @@ -15,7 +15,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberType.ts index 45a2d1fc4a9..7cbccbcf0cc 100644 --- a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberType.ts @@ -5,7 +5,7 @@ var NUMBER1: number[] = [1, 2]; class A { public a: number; } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts index 833646b0dfa..1e9d96107c8 100644 --- a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts +++ b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithNumberTypeInvalidOperations.ts @@ -8,7 +8,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts index 7bc8d827bda..617417c7252 100644 --- a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedBooleanType.ts @@ -7,7 +7,7 @@ class A { public a: boolean; static foo() { return true; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts index f9a990f2b49..4b9658a2077 100644 --- a/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithUnsupportedStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts index c39523913a9..3954f64481f 100644 --- a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts @@ -16,7 +16,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts index 36fd43f5ed0..c5744459543 100644 --- a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts @@ -7,7 +7,7 @@ class A { public a: boolean; static foo() { return false; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts index 457ce8cc302..8ce9862705d 100644 --- a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts @@ -8,7 +8,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts index 0d404d4f510..90a2a9bc3a9 100644 --- a/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherType.ts index 09f272442e1..c36cd5ca480 100644 --- a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherType.ts @@ -7,7 +7,7 @@ var obj = {x:1,y:null}; class A { public a: any; } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts index 397024d45d6..c5df5cb53a0 100644 --- a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts +++ b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithAnyOtherTypeInvalidOperations.ts @@ -15,7 +15,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberType.ts index 0c5464b879b..b0c39836ae0 100644 --- a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberType.ts @@ -5,7 +5,7 @@ var NUMBER1: number[] = [1, 2]; class A { public a: number; } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts index acc2d50b477..6485392c3e4 100644 --- a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts +++ b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithNumberTypeInvalidOperations.ts @@ -8,7 +8,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts index c4988e55214..7985957cee9 100644 --- a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedBooleanType.ts @@ -7,7 +7,7 @@ class A { public a: boolean; static foo() { return true; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts index b2342e6d90e..af73a815238 100644 --- a/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/incrementOperator/incrementOperatorWithUnsupportedStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts index 6a80c443afd..a82a6e9625d 100644 --- a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts @@ -16,7 +16,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithBooleanType.ts index d89d2e47445..f8e530b3485 100644 --- a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithBooleanType.ts @@ -7,7 +7,7 @@ class A { public a: boolean; static foo() { return false; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithNumberType.ts index dd1d402c5ce..492d06084dc 100644 --- a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithNumberType.ts @@ -8,7 +8,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithStringType.ts index 5726610921f..84c311fcfff 100644 --- a/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts index d29b1a845eb..1bc646fc84d 100644 --- a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithAnyOtherType.ts @@ -17,7 +17,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithBooleanType.ts index c2c556320c1..9f2a6a21c2a 100644 --- a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithBooleanType.ts @@ -7,7 +7,7 @@ class A { public a: boolean; static foo() { return false; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithNumberType.ts index 0560035d1e6..681b71e87bb 100644 --- a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithNumberType.ts @@ -8,7 +8,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithStringType.ts index 858819dd73d..d2f4480689b 100644 --- a/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorWithStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts index ec90e29f50a..0f858adad60 100644 --- a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithAnyOtherType.ts @@ -17,7 +17,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithBooleanType.ts index dc8c1f97557..f636ee849fd 100644 --- a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithBooleanType.ts @@ -7,7 +7,7 @@ class A { public a: boolean; static foo() { return false; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithNumberType.ts index 9ab553d5453..eae2f4a373f 100644 --- a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithNumberType.ts @@ -8,7 +8,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithStringType.ts index 7d64596ad56..2ba0f993c0f 100644 --- a/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/plusOperator/plusOperatorWithStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts index 3ff53d71dc7..1914d968045 100644 --- a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts @@ -17,7 +17,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts index c22ed94087b..5a4bf1abe9e 100644 --- a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithBooleanType.ts @@ -9,7 +9,7 @@ class A { public a: boolean; static foo() { return false; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts index 81687e4f860..eec41e9ba6c 100644 --- a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithNumberType.ts @@ -9,7 +9,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts index 38e57e1ec55..4e9a19464fb 100644 --- a/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithAnyOtherType.ts b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithAnyOtherType.ts index 761c22b9252..2a0057158e3 100644 --- a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithAnyOtherType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithAnyOtherType.ts @@ -17,7 +17,7 @@ class A { return a; } } -module M { +namespace M { export var n: any; } var objA = new A(); diff --git a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithBooleanType.ts b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithBooleanType.ts index bbdd7187e0a..ffbe615132f 100644 --- a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithBooleanType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithBooleanType.ts @@ -7,7 +7,7 @@ class A { public a: boolean; static foo() { return false; } } -module M { +namespace M { export var n: boolean; } diff --git a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithNumberType.ts b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithNumberType.ts index 52f57b8d870..aad5daf7586 100644 --- a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithNumberType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithNumberType.ts @@ -8,7 +8,7 @@ class A { public a: number; static foo() { return 1; } } -module M { +namespace M { export var n: number; } diff --git a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithStringType.ts b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithStringType.ts index 858e9d38907..fe4d83149a7 100644 --- a/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithStringType.ts +++ b/tests/cases/conformance/expressions/unaryOperators/voidOperator/voidOperatorWithStringType.ts @@ -8,7 +8,7 @@ class A { public a: string; static foo() { return ""; } } -module M { +namespace M { export var n: string; } diff --git a/tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts b/tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts index 38b52a2c70b..b5326a56f57 100644 --- a/tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts +++ b/tests/cases/conformance/expressions/valuesAndReferences/assignmentToParenthesizedIdentifiers.ts @@ -4,7 +4,7 @@ x = 3; // OK x = ''; // Error (x) = ''; // Error -module M { +namespace M { export var y: number; } M.y = 3; // OK @@ -17,7 +17,7 @@ M.y = ''; // Error M = { y: 3 }; // Error (M) = { y: 3 }; // Error -module M2 { +namespace M2 { export module M3 { export var x: number; } diff --git a/tests/cases/conformance/expressions/valuesAndReferences/assignments.ts b/tests/cases/conformance/expressions/valuesAndReferences/assignments.ts index c50a541523c..5746716b106 100644 --- a/tests/cases/conformance/expressions/valuesAndReferences/assignments.ts +++ b/tests/cases/conformance/expressions/valuesAndReferences/assignments.ts @@ -7,7 +7,7 @@ // Assign to a parameter // Assign to an interface -module M { } +namespace M { } M = null; // Error class C { } diff --git a/tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts b/tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts index ba0b2d48d62..27dbe165960 100644 --- a/tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts +++ b/tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts @@ -2,7 +2,7 @@ var declare: number; var module: string; -module container { +namespace container { declare // this is the identifier 'declare' module // this is the identifier 'module' "my external module" // this is just a string diff --git a/tests/cases/conformance/externalModules/duplicateExportAssignments.ts b/tests/cases/conformance/externalModules/duplicateExportAssignments.ts index 5d9cb441435..a34fc806b2e 100644 --- a/tests/cases/conformance/externalModules/duplicateExportAssignments.ts +++ b/tests/cases/conformance/externalModules/duplicateExportAssignments.ts @@ -11,7 +11,7 @@ export = x; export = y; // @Filename: foo3.ts -module x { +namespace x { export var x = 10; } class y { diff --git a/tests/cases/conformance/externalModules/exportAssignmentCircularModules.ts b/tests/cases/conformance/externalModules/exportAssignmentCircularModules.ts index 1863fb83d63..025e4f93c98 100644 --- a/tests/cases/conformance/externalModules/exportAssignmentCircularModules.ts +++ b/tests/cases/conformance/externalModules/exportAssignmentCircularModules.ts @@ -1,21 +1,21 @@ // @module: amd // @Filename: foo_0.ts import foo1 = require('./foo_1'); -module Foo { +namespace Foo { export var x = foo1.x; } export = Foo; // @Filename: foo_1.ts import foo2 = require("./foo_2"); -module Foo { +namespace Foo { export var x = foo2.x; } export = Foo; // @Filename: foo_2.ts import foo0 = require("./foo_0"); -module Foo { +namespace Foo { export var x = foo0.x; } export = Foo; diff --git a/tests/cases/conformance/externalModules/exportAssignmentMergedModule.ts b/tests/cases/conformance/externalModules/exportAssignmentMergedModule.ts index 123b4251cdc..e8c29ed04db 100644 --- a/tests/cases/conformance/externalModules/exportAssignmentMergedModule.ts +++ b/tests/cases/conformance/externalModules/exportAssignmentMergedModule.ts @@ -1,12 +1,12 @@ // @module: commonjs // @Filename: foo_0.ts -module Foo { +namespace Foo { export function a(){ return 5; } export var b = true; } -module Foo { +namespace Foo { export function c(a: number){ return a; } diff --git a/tests/cases/conformance/externalModules/exportAssignmentTopLevelClodule.ts b/tests/cases/conformance/externalModules/exportAssignmentTopLevelClodule.ts index 66e3286a730..db57293cf32 100644 --- a/tests/cases/conformance/externalModules/exportAssignmentTopLevelClodule.ts +++ b/tests/cases/conformance/externalModules/exportAssignmentTopLevelClodule.ts @@ -3,7 +3,7 @@ class Foo { test = "test"; } -module Foo { +namespace Foo { export var answer = 42; } export = Foo; diff --git a/tests/cases/conformance/externalModules/exportAssignmentTopLevelEnumdule.ts b/tests/cases/conformance/externalModules/exportAssignmentTopLevelEnumdule.ts index 10d9f64bdd9..e34e50f50e9 100644 --- a/tests/cases/conformance/externalModules/exportAssignmentTopLevelEnumdule.ts +++ b/tests/cases/conformance/externalModules/exportAssignmentTopLevelEnumdule.ts @@ -3,7 +3,7 @@ enum foo { red, green, blue } -module foo { +namespace foo { export var answer = 42; } export = foo; diff --git a/tests/cases/conformance/externalModules/exportAssignmentTopLevelFundule.ts b/tests/cases/conformance/externalModules/exportAssignmentTopLevelFundule.ts index 2df3e7cd52d..bf97c490170 100644 --- a/tests/cases/conformance/externalModules/exportAssignmentTopLevelFundule.ts +++ b/tests/cases/conformance/externalModules/exportAssignmentTopLevelFundule.ts @@ -3,7 +3,7 @@ function foo() { return "test"; } -module foo { +namespace foo { export var answer = 42; } export = foo; diff --git a/tests/cases/conformance/externalModules/exportAssignmentTopLevelIdentifier.ts b/tests/cases/conformance/externalModules/exportAssignmentTopLevelIdentifier.ts index 684b7a10c62..85f759962f4 100644 --- a/tests/cases/conformance/externalModules/exportAssignmentTopLevelIdentifier.ts +++ b/tests/cases/conformance/externalModules/exportAssignmentTopLevelIdentifier.ts @@ -1,6 +1,6 @@ // @module: amd // @Filename: foo_0.ts -module Foo { +namespace Foo { export var answer = 42; } export = Foo; diff --git a/tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts b/tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts index f6ad233d4f6..4875a908424 100644 --- a/tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts +++ b/tests/cases/conformance/externalModules/exportNonInitializedVariablesAMD.ts @@ -17,7 +17,7 @@ namespace B { export let x, y, z; } -module C { +namespace C { export var a = 1, b, c = 2; export var x, y, z; } diff --git a/tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts b/tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts index dd43474972c..a4a9bbc997d 100644 --- a/tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts +++ b/tests/cases/conformance/externalModules/exportNonInitializedVariablesCommonJS.ts @@ -17,7 +17,7 @@ namespace B { export let x, y, z; } -module C { +namespace C { export var a = 1, b, c = 2; export var x, y, z; } diff --git a/tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts b/tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts index 86319311f96..0daf3e422d7 100644 --- a/tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts +++ b/tests/cases/conformance/externalModules/exportNonInitializedVariablesES6.ts @@ -17,7 +17,7 @@ namespace B { export let x, y, z; } -module C { +namespace C { export var a = 1, b, c = 2; export var x, y, z; } diff --git a/tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts b/tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts index 2105dd61b1c..a10175975e5 100644 --- a/tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts +++ b/tests/cases/conformance/externalModules/exportNonInitializedVariablesSystem.ts @@ -17,7 +17,7 @@ namespace B { export let x, y, z; } -module C { +namespace C { export var a = 1, b, c = 2; export var x, y, z; } diff --git a/tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts b/tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts index b4d767a223c..c92632defd8 100644 --- a/tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts +++ b/tests/cases/conformance/externalModules/exportNonInitializedVariablesUMD.ts @@ -17,7 +17,7 @@ namespace B { export let x, y, z; } -module C { +namespace C { export var a = 1, b, c = 2; export var x, y, z; } diff --git a/tests/cases/conformance/externalModules/importNonExternalModule.ts b/tests/cases/conformance/externalModules/importNonExternalModule.ts index 5e7d43f0ef8..c0df030aa94 100644 --- a/tests/cases/conformance/externalModules/importNonExternalModule.ts +++ b/tests/cases/conformance/externalModules/importNonExternalModule.ts @@ -1,6 +1,6 @@ // @module: amd // @Filename: foo_0.ts -module foo { +namespace foo { export var answer = 42; } diff --git a/tests/cases/conformance/functions/functionNameConflicts.ts b/tests/cases/conformance/functions/functionNameConflicts.ts index b9560baca29..0b12a231fb7 100644 --- a/tests/cases/conformance/functions/functionNameConflicts.ts +++ b/tests/cases/conformance/functions/functionNameConflicts.ts @@ -1,7 +1,7 @@ //Function and variable of the same name in same declaration space //Function overload with different name from implementation signature -module M { +namespace M { function fn1() { } var fn1; diff --git a/tests/cases/conformance/functions/functionOverloadErrors.ts b/tests/cases/conformance/functions/functionOverloadErrors.ts index cf323163aa3..1f917b17fa2 100644 --- a/tests/cases/conformance/functions/functionOverloadErrors.ts +++ b/tests/cases/conformance/functions/functionOverloadErrors.ts @@ -71,7 +71,7 @@ class cls { } //Function overloads with differing export -module M { +namespace M { export function fn1(); function fn1(n: string); function fn1() { } diff --git a/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts b/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts index e5aa617adb8..d9ff11cdc74 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName.ts @@ -8,7 +8,7 @@ interface A { // error bar: T; } -module M { +namespace M { interface A { bar: T; } @@ -18,25 +18,25 @@ module M { } } -module M2 { +namespace M2 { interface A { foo: string; } } -module M2 { +namespace M2 { interface A { // ok, different declaration space than other M2 bar: T; } } -module M3 { +namespace M3 { export interface A { foo: string; } } -module M3 { +namespace M3 { export interface A { // error bar: T; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName2.ts b/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName2.ts index 8a3ba591776..f2e38faa75f 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/genericAndNonGenericInterfaceWithTheSameName2.ts @@ -1,25 +1,25 @@ // generic and non-generic interfaces with the same name do not merge -module M { +namespace M { interface A { bar: T; } } -module M2 { +namespace M2 { interface A { // ok foo: string; } } -module N { - module M { +namespace N { + namespace M { interface A { bar: T; } } - module M2 { + namespace M2 { interface A { // ok foo: string; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces.ts b/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces.ts index cd545ed1c6b..3c2aa75593b 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces.ts @@ -37,7 +37,7 @@ var r5 = b.bar; var r6 = b.baz; // basic non-generic and generic case inside a module -module M { +namespace M { interface A { foo: string; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces2.ts b/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces2.ts index 6eb10b9ce01..505ce5624e1 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergeThreeInterfaces2.ts @@ -1,7 +1,7 @@ // two interfaces with the same root module should merge // root module now multiple module declarations -module M2 { +namespace M2 { export interface A { foo: string; } @@ -11,7 +11,7 @@ module M2 { var r2 = a.bar; } -module M2 { +namespace M2 { export interface A { bar: number; } @@ -27,7 +27,7 @@ module M2 { } // same as above but with an additional level of nesting and third module declaration -module M2 { +namespace M2 { export module M3 { export interface A { foo: string; @@ -39,7 +39,7 @@ module M2 { } } -module M2 { +namespace M2 { export module M3 { export interface A { bar: number; @@ -53,7 +53,7 @@ module M2 { } } -module M2 { +namespace M2 { export module M3 { export interface A { baz: boolean; diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces.ts b/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces.ts index 60b01ac3787..52e2908285b 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces.ts @@ -28,7 +28,7 @@ var r3 = b.foo var r4 = b.bar; // basic non-generic and generic case inside a module -module M { +namespace M { interface A { foo: string; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces2.ts b/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces2.ts index 3b8840ece04..98e288fa527 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergeTwoInterfaces2.ts @@ -1,7 +1,7 @@ // two interfaces with the same root module should merge // root module now multiple module declarations -module M2 { +namespace M2 { export interface A { foo: string; } @@ -11,7 +11,7 @@ module M2 { var r2 = a.bar; } -module M2 { +namespace M2 { export interface A { bar: number; } @@ -22,7 +22,7 @@ module M2 { } // same as above but with an additional level of nesting -module M2 { +namespace M2 { export module M3 { export interface A { foo: string; @@ -34,7 +34,7 @@ module M2 { } } -module M2 { +namespace M2 { export module M3 { export interface A { bar: number; diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts index 6b0d65770f9..c3f470a93be 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames.ts @@ -6,7 +6,7 @@ interface A { x: number; } -module M { +namespace M { interface A { x: T; } @@ -16,25 +16,25 @@ module M { } } -module M2 { +namespace M2 { interface A { x: T; } } -module M2 { +namespace M2 { interface A { x: number; // ok, different declaration space than other M2 } } -module M3 { +namespace M3 { export interface A { x: T; } } -module M3 { +namespace M3 { export interface A { x: number; // error } diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts index 00d35e64c34..9040cd2b90c 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithConflictingPropertyNames2.ts @@ -6,7 +6,7 @@ interface A { x: string; // error } -module M { +namespace M { interface A { x: T; } @@ -16,25 +16,25 @@ module M { } } -module M2 { +namespace M2 { interface A { x: T; } } -module M2 { +namespace M2 { interface A { x: T; // ok, different declaration space than other M2 } } -module M3 { +namespace M3 { export interface A { x: T; } } -module M3 { +namespace M3 { export interface A { x: T; // error } diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts index 56295627fe3..4216860e782 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates3.ts @@ -19,7 +19,7 @@ class D extends C implements A { // error z: string; } -module M { +namespace M { class C { private x: string; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases.ts b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases.ts index b58360babac..f12b7adc3ba 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases.ts @@ -28,7 +28,7 @@ var a: A; var r = a.a; // generic interfaces in a module -module M { +namespace M { class C { a: T; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases2.ts b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases2.ts index 3b830f11705..e3e21915e84 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithMultipleBases2.ts @@ -39,7 +39,7 @@ var a: A; var r = a.a; // generic interfaces in a module -module M { +namespace M { class C { a: T; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts index 61695c0f869..90148256982 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts @@ -16,7 +16,7 @@ interface B { // error y: V; } -module M { +namespace M { interface A { x: T; } @@ -34,25 +34,25 @@ module M { } } -module M2 { +namespace M2 { interface B { x: U; } } -module M2 { +namespace M2 { interface B { // ok, different declaration space than other M2 y: V; } } -module M3 { +namespace M3 { export interface B { x: U; } } -module M3 { +namespace M3 { export interface B { // error y: V; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts index 8f2639a2e11..1a3913bc205 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName2.ts @@ -8,7 +8,7 @@ interface B { // error y: V; } -module M { +namespace M { interface B { x: U; } @@ -18,25 +18,25 @@ module M { } } -module M2 { +namespace M2 { interface B { x: U; } } -module M2 { +namespace M2 { interface B { // ok, different declaration space than other M2 y: T; } } -module M3 { +namespace M3 { export interface B { x: U; } } -module M3 { +namespace M3 { export interface B { // error y: T; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts index 6963277915a..e5901942e75 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithDifferentConstraints.ts @@ -6,7 +6,7 @@ interface A { // error y: T; } -module M { +namespace M { interface B> { x: T; } @@ -16,25 +16,25 @@ module M { } } -module M2 { +namespace M2 { interface A { x: T; } } -module M2 { +namespace M2 { interface A { // ok, different declaration space from other M2.A y: T; } } -module M3 { +namespace M3 { export interface A { x: T; } } -module M3 { +namespace M3 { export interface A { // error y: T; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts index cfaa1c04d3b..888d21be751 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesWithTheSameNameButDifferentArity.ts @@ -6,7 +6,7 @@ interface A { // error y: T; } -module M { +namespace M { interface A { x: T; } @@ -16,25 +16,25 @@ module M { } } -module M2 { +namespace M2 { interface A { x: T; } } -module M2 { +namespace M2 { interface A { // ok, different declaration space than other M2 y: T; } } -module M3 { +namespace M3 { export interface A { x: T; } } -module M3 { +namespace M3 { export interface A { // error y: T; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule.ts b/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule.ts index 36d5ea4f66c..d827c65d503 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule.ts @@ -1,6 +1,6 @@ // two interfaces with different root modules should not merge -module M { +namespace M { export interface A { foo: string; } @@ -10,7 +10,7 @@ module M { } } -module M2 { +namespace M2 { export interface A { bar: number; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule2.ts b/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule2.ts index 49159a0aecd..1ff42181224 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/twoInterfacesDifferentRootModule2.ts @@ -1,6 +1,6 @@ // two interfaces with different root modules should not merge -module M { +namespace M { export interface A { foo: string; } @@ -9,7 +9,7 @@ module M { foo: T; } - module M2 { + namespace M2 { export interface A { bar: number; } diff --git a/tests/cases/conformance/interfaces/declarationMerging/twoMergedInterfacesWithDifferingOverloads2.ts b/tests/cases/conformance/interfaces/declarationMerging/twoMergedInterfacesWithDifferingOverloads2.ts index 63700a2230e..0cdcccf19d3 100644 --- a/tests/cases/conformance/interfaces/declarationMerging/twoMergedInterfacesWithDifferingOverloads2.ts +++ b/tests/cases/conformance/interfaces/declarationMerging/twoMergedInterfacesWithDifferingOverloads2.ts @@ -12,7 +12,7 @@ var r = a(); var r2 = a(1); var r3 = a(1, 2); -module G { +namespace G { interface A { (): string; (x: T): T; diff --git a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts index 6febcc798cc..1b6a5241c0c 100644 --- a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts +++ b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceThatIndirectlyInheritsFromItself.ts @@ -10,7 +10,7 @@ interface Derived2 extends Derived { z: string; } -module Generic { +namespace Generic { interface Base extends Derived2 { // error x: string; } diff --git a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts index 2ad1b2bbfe7..8ad61657b5a 100644 --- a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts +++ b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithMultipleBaseTypes.ts @@ -24,7 +24,7 @@ interface Derived2 extends Base1, Base2 { // error } } -module Generic { +namespace Generic { interface Base1 { x: { a: T; diff --git a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts index 6979b405798..e82d41ae20e 100644 --- a/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts +++ b/tests/cases/conformance/interfaces/interfaceDeclarations/interfaceWithPropertyOfEveryType.ts @@ -1,6 +1,6 @@ class C { foo: string; } function f1() { } -module M { +namespace M { export var y = 1; } enum E { A } diff --git a/tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts b/tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts index f1935e00631..79ebfd94dd6 100644 --- a/tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts +++ b/tests/cases/conformance/interfaces/interfacesExtendingClasses/implementingAnInterfaceExtendingClassWithPrivates2.ts @@ -21,7 +21,7 @@ class Bar3 extends Foo implements I { // error } // another level of indirection -module M { +namespace M { class Foo { private x: string; } @@ -51,7 +51,7 @@ module M { } // two levels of privates -module M2 { +namespace M2 { class Foo { private x: string; } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts index e923f1f002d..f1f638c725b 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.ts @@ -9,7 +9,7 @@ declare module A { } // @filename: classPoint.ts -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts index 596eae2500c..e568f407123 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.ts @@ -6,7 +6,7 @@ class clodule1{ value: T; } -module clodule1 { +namespace clodule1 { function f(x: T) { } } @@ -16,7 +16,7 @@ class clodule2{ value: T; } -module clodule2 { +namespace clodule2 { var x: T; class D{ @@ -31,7 +31,7 @@ class clodule3{ value: T; } -module clodule3 { +namespace clodule3 { export var y = { id: T }; } @@ -41,7 +41,7 @@ class clodule4{ value: T; } -module clodule4 { +namespace clodule4 { class D { name: T; } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts index 95667d95f8d..0276c30cc63 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.ts @@ -5,7 +5,7 @@ class clodule { static fn(id: U) { } } -module clodule { +namespace clodule { // error: duplicate identifier expected export function fn(x: T, y: T): T { return x; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts index 6779d4af7fd..7e81a08988c 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.ts @@ -5,7 +5,7 @@ class clodule { static fn(id: string) { } } -module clodule { +namespace clodule { // error: duplicate identifier expected export function fn(x: T, y: T): T { return x; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts index 73427682178..2441be116dd 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.ts @@ -5,7 +5,7 @@ class clodule { private static sfn(id: string) { return 42; } } -module clodule { +namespace clodule { // error: duplicate identifier expected export function fn(x: T, y: T): number { return clodule.sfn('a'); diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts index 2d19c355e15..a46ffc7a560 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.ts @@ -4,12 +4,12 @@ class Point { static Origin(): Point { return { x: 0, y: 0 }; } // unexpected error here bug 840246 } -module Point { +namespace Point { export function Origin() { return null; } //expected duplicate identifier error } -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts index d285d9b4225..32e5f0cfb68 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.ts @@ -4,12 +4,12 @@ class Point { static Origin(): Point { return { x: 0, y: 0 }; } } -module Point { +namespace Point { function Origin() { return ""; }// not an error, since not exported } -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts index 3d70bc65d8d..f2fe8dc94ff 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.ts @@ -4,12 +4,12 @@ class Point { static Origin: Point = { x: 0, y: 0 }; } -module Point { +namespace Point { export var Origin = ""; //expected duplicate identifier error } -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts index 6de64190c97..8e355649b7c 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.ts @@ -4,12 +4,12 @@ class Point { static Origin: Point = { x: 0, y: 0 }; } -module Point { +namespace Point { var Origin = ""; // not an error, since not exported } -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts index 37ebf3b64c1..5e6974b6a80 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRoot.ts @@ -28,7 +28,7 @@ class A { id: string; } -module A { +namespace A { export var Instance = new A(); } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts index 3827c06dff0..d935e894e9e 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ClassAndModuleWithSameNameAndCommonRootES6.ts @@ -29,7 +29,7 @@ class A { id: string; } -module A { +namespace A { export var Instance = new A(); } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts index dbb83f27cb7..08e86bf0585 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/EnumAndModuleWithSameNameAndCommonRoot.ts @@ -2,7 +2,7 @@ enum enumdule { Red, Blue } -module enumdule { +namespace enumdule { export class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts index ff496cc50cd..b73da83d339 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndCommonRoot.ts @@ -1,12 +1,12 @@ // @filename: function.ts -module A { +namespace A { export function Point() { return { x: 0, y: 0 }; } } // @filename: module.ts -module A { +namespace A { export module Point { export var Origin = { x: 0, y: 0 }; } @@ -22,7 +22,7 @@ var cl = A.Point.Origin; // not expected to be an error. // @filename: simple.ts -module B { +namespace B { export function Point() { return { x: 0, y: 0 }; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts index 48776f7ec52..8fb0872091e 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/FunctionAndModuleWithSameNameAndDifferentCommonRoot.ts @@ -1,12 +1,12 @@ // @filename: function.ts -module A { +namespace A { export function Point() { return { x: 0, y: 0 }; } } // @filename: module.ts -module B { +namespace B { export module Point { export var Origin = { x: 0, y: 0 }; } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts index a08eeecaa57..3d84339a42a 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndClassWithSameNameAndCommonRoot.ts @@ -19,7 +19,7 @@ module X.Y { } // @Filename: simple.ts -module A { +namespace A { export var Instance = new A(); } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts index 8b7ff083f03..97ff6717770 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndEnumWithSameNameAndCommonRoot.ts @@ -1,4 +1,4 @@ -module enumdule { +namespace enumdule { export class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts index 162a9ea5a92..e41ea1f25b7 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/ModuleAndFunctionWithSameNameAndCommonRoot.ts @@ -1,12 +1,12 @@ // @filename: module.ts -module A { +namespace A { export module Point { export var Origin = { x: 0, y: 0 }; } } // @filename: function.ts -module A { +namespace A { // duplicate identifier error export function Point() { return { x: 0, y: 0 }; @@ -14,7 +14,7 @@ module A { } // @filename: simple.ts -module B { +namespace B { export module Point { export var Origin = { x: 0, y: 0 }; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts index 7d88bf62922..48b2b4f8a64 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.ts @@ -1,11 +1,11 @@ -module A { +namespace A { export class Point { x: number; y: number; } } -module A { +namespace A { class Point { fromCarthesian(p: A.Point) { return { x: p.x, y: p.y }; @@ -23,7 +23,7 @@ module X.Y.Z { } } -module X { +namespace X { export module Y { export module Z { class Line { diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts index 6ab72d626d9..cf559af81d5 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface Point { x: number; y: number; @@ -6,7 +6,7 @@ module A { } } -module A { +namespace A { interface Point { fromCarth(): Point; } @@ -22,7 +22,7 @@ module X.Y.Z { } } -module X { +namespace X { export module Y.Z { interface Line { start: A.Point; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts index d3cad2e424d..3f92d298855 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.ts @@ -1,5 +1,5 @@ //@filename: part1.ts -module A { +namespace A { export interface Point { x: number; y: number; @@ -14,7 +14,7 @@ module A { } //@filename: part2.ts -module A { +namespace A { // not a collision, since we don't export var Origin: string = "0,0"; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts index ab793b91bfa..042b395c730 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedClassesOfTheSameName.ts @@ -1,11 +1,11 @@ -module A { +namespace A { export class Point { x: number; y: number; } } -module A{ +namespace A{ // expected error export class Point { origin: number; @@ -19,7 +19,7 @@ module X.Y.Z { } } -module X { +namespace X { export module Y { export module Z { // expected error diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts index d82f9d92186..73ae7921160 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface Point { x: number; y: number; @@ -6,7 +6,7 @@ module A { } } -module A { +namespace A { export interface Point { fromCarth(): Point; } @@ -22,7 +22,7 @@ module X.Y.Z { } } -module X { +namespace X { export module Y.Z { export interface Line { start: A.Point; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts index 449e6e76a27..74f4195379e 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.ts @@ -2,8 +2,8 @@ module A.B { export var x: number; } -module A{ - module B { +namespace A{ + namespace B { export var x: string; } } @@ -18,9 +18,9 @@ module X.Y.Z { } } -module X { +namespace X { export module Y { - module Z { + namespace Z { export class Line { name: string; } diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts index 11210453649..363c2a24d2b 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.ts @@ -1,5 +1,5 @@ //@filename: part1.ts -module Root { +namespace Root { export module A { export interface Point { x: number; @@ -15,7 +15,7 @@ module Root { } //@filename: part2.ts -module otherRoot { +namespace otherRoot { export module A { // have to be fully qualified since in different root export var Origin: Root.A.Point = { x: 0, y: 0 }; diff --git a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts index 6f75c9c4d06..3e476465c20 100644 --- a/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts +++ b/tests/cases/conformance/internalModules/DeclarationMerging/TwoInternalModulesWithTheSameNameAndSameCommonRoot.ts @@ -1,5 +1,5 @@ //@filename: part1.ts -module A { +namespace A { export interface Point { x: number; y: number; @@ -13,7 +13,7 @@ module A { } //@filename: part2.ts -module A { +namespace A { export var Origin: Point = { x: 0, y: 0 }; export module Utils { diff --git a/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts b/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts index 02398acbbbf..6494bed0329 100644 --- a/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts +++ b/tests/cases/conformance/internalModules/codeGeneration/exportCodeGen.ts @@ -1,7 +1,7 @@ // should replace all refs to 'x' in the body, // with fully qualified -module A { +namespace A { export var x = 12; function lt12() { return x < 12; @@ -9,7 +9,7 @@ module A { } // should not fully qualify 'x' -module B { +namespace B { var x = 12; function lt12() { return x < 12; @@ -17,21 +17,21 @@ module B { } // not copied, since not exported -module C { +namespace C { function no() { return false; } } // copies, since exported -module D { +namespace D { export function yes() { return true; } } // validate all exportable statements -module E { +namespace E { export enum Color { Red } export function fn() { } export interface I { id: number } @@ -43,12 +43,12 @@ module E { // validate all exportable statements, // which are not exported -module F { +namespace F { enum Color { Red } function fn() { } interface I { id: number } class C { name: string } - module M { + namespace M { var x = 42; } } \ No newline at end of file diff --git a/tests/cases/conformance/internalModules/codeGeneration/importStatements.ts b/tests/cases/conformance/internalModules/codeGeneration/importStatements.ts index c984379a15a..a4d97172147 100644 --- a/tests/cases/conformance/internalModules/codeGeneration/importStatements.ts +++ b/tests/cases/conformance/internalModules/codeGeneration/importStatements.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } } @@ -7,12 +7,12 @@ module A { } // no code gen expected -module B { +namespace B { import a = A; //Error generates 'var = ;' } // no code gen expected -module C { +namespace C { import a = A; //Error generates 'var = ;' var m: typeof a; var p: a.Point; @@ -20,13 +20,13 @@ module C { } // code gen expected -module D { +namespace D { import a = A; var p = new a.Point(1, 1); } -module E { +namespace E { import a = A; export function xDist(x: a.Point) { return (a.Origin.x - x.x); diff --git a/tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts b/tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts index 34195045b2d..a4c8ab3c3e3 100644 --- a/tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts +++ b/tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface Point { x: number; y: number; @@ -12,12 +12,12 @@ module A { } // no code gen expected -module B { +namespace B { import a = A; } // no code gen expected -module C { +namespace C { import a = A; import b = a.inA; var m: typeof a; @@ -26,14 +26,14 @@ module C { } // no code gen expected -module D { +namespace D { import a = A; var p : a.Point; } // no code gen expected -module E { +namespace E { import a = A.inA; export function xDist(x: a.Point3D) { return 0 - x.x; diff --git a/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts b/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts index aef48103cd5..02f234868bc 100644 --- a/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts +++ b/tests/cases/conformance/internalModules/codeGeneration/nameCollision.ts @@ -1,15 +1,15 @@ -module A { +namespace A { // these 2 statements force an underscore before the 'A' // in the generated function call. var A = 12; var _A = ''; } -module B { +namespace B { var A = 12; } -module B { +namespace B { // re-opened module with colliding name // this should add an underscore. class B { @@ -17,7 +17,7 @@ module B { } } -module X { +namespace X { var X = 13; export module Y { var Y = 13; @@ -37,7 +37,7 @@ module Y.Y { // no collision, since interface doesn't // generate code. -module D { +namespace D { export interface D { id: number; } diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts index 171541d51b5..c02b073123d 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWhichExtendsInterfaceWithInaccessibleType.ts @@ -1,4 +1,4 @@ -module A { +namespace A { interface Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts index 8713205555b..470179f7b05 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts index f20a1893e82..74ac344f7b5 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInIndexerTypeAnnotations.ts @@ -1,4 +1,4 @@ -module A { +namespace A { class Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts index b75b3703523..5f71851e88e 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportClassWithInaccessibleTypeInTypeParameterConstraint.ts @@ -1,4 +1,4 @@ -module A { +namespace A { class Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts index 21b8419972a..703fb89fb26 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithAccessibleTypesInParameterAndReturnTypeAnnotation.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts index cf0fb9e32fb..8a53b131c0d 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInParameterTypeAnnotation.ts @@ -1,4 +1,4 @@ -module A { +namespace A { class Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts index b58588cc4fb..5c9dc054424 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportFunctionWithInaccessibleTypesInReturnTypeAnnotation.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts index e3d1f23f109..7cd7cf2315b 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts index 72581982bbd..8c47b587ec9 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.ts @@ -1,4 +1,4 @@ -module A { +namespace A { interface Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts index 0a96f0e7320..f6c4feb4c3c 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.ts @@ -1,4 +1,4 @@ -module A { +namespace A { interface Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts index a96c9020c75..c2ae7bfba26 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportModuleWithAccessibleTypesOnItsExportedMembers.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts index ef5c2f365ce..e4ae3d0eebb 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInMemberTypeAnnotations.ts @@ -1,4 +1,4 @@ -module A { +namespace A { class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts index 75c854053a7..eeb277af2c3 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.ts @@ -1,4 +1,4 @@ -module A { +namespace A { class Point { constructor(public x: number, public y: number) { } diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts index 5e1252025ba..5263cfbd28f 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.ts @@ -1,4 +1,4 @@ -module A { +namespace A { class B { id: number; } diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts index e98615a4160..7407806ccdd 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithAccessibleTypeInTypeAnnotation.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts b/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts index 0767ec74250..394a5e8f39c 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ExportVariableWithInaccessibleTypeInTypeAnnotation.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface Point { x: number; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts index 23000e84088..1dc04dbb435 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedClasses.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export class A { id: number; name: string; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts index c384ccff96a..c72c939daee 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedEnums.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export enum Color { Red, Blue } enum Day { Monday, Tuesday } } diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts index 3954f58f6f4..3d527c30c7b 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export function fn(s: string) { return true; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts index fe1ecca6914..6961a4f1ae2 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedImportAlias.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export interface Point { x: number; y: number; @@ -9,13 +9,13 @@ module A { } } -module B { +namespace B { export class Line { constructor(public start: A.Point, public end: A.Point) { } } } -module Geometry { +namespace Geometry { export import Points = A; import Lines = B; diff --git a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts index 64bd95348ad..c2366a56040 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedVariables.ts @@ -1,4 +1,4 @@ -module A { +namespace A { export var x = 'hello world' var y = 12; } diff --git a/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts b/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts index cd08ae00041..73e29590d63 100644 --- a/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts +++ b/tests/cases/conformance/internalModules/exportDeclarations/NonInitializedExportInInternalModule.ts @@ -1,5 +1,5 @@ -module Inner { +namespace Inner { var; let; const; @@ -17,7 +17,7 @@ module Inner { export let x, y, z; } - module C { + namespace C { export var a = 1, b, c = 2; export var x, y, z; } diff --git a/tests/cases/conformance/internalModules/importDeclarations/circularImportAlias.ts b/tests/cases/conformance/internalModules/importDeclarations/circularImportAlias.ts index 0c748c6d831..3c81fdcafd0 100644 --- a/tests/cases/conformance/internalModules/importDeclarations/circularImportAlias.ts +++ b/tests/cases/conformance/internalModules/importDeclarations/circularImportAlias.ts @@ -1,13 +1,13 @@ // expected no error -module B { +namespace B { export import a = A; export class D extends a.C { id: number; } } -module A { +namespace A { export class C { name: string } export import b = B; } diff --git a/tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts b/tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts index f9d64deed79..f69f221fbca 100644 --- a/tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts +++ b/tests/cases/conformance/internalModules/importDeclarations/exportImportAlias.ts @@ -1,6 +1,6 @@ // expect no errors here -module A { +namespace A { export var x = 'hello world' export class Point { @@ -13,7 +13,7 @@ module A { } } -module C { +namespace C { export import a = A; } @@ -22,7 +22,7 @@ var b: { x: number; y: number; } = new C.a.Point(0, 0); var c: { name: string }; var c: C.a.B.Id; -module X { +namespace X { export function Y() { return 42; } @@ -34,7 +34,7 @@ module X { } } -module Z { +namespace Z { // 'y' should be a fundule here export import y = X.Y; @@ -43,7 +43,7 @@ module Z { var m: number = Z.y(); var n: { x: number; y: number; } = new Z.y.Point(0, 0); -module K { +namespace K { export class L { constructor(public name: string) { } } @@ -57,7 +57,7 @@ module K { } } -module M { +namespace M { export import D = K.L; } diff --git a/tests/cases/conformance/internalModules/importDeclarations/importAliasIdentifiers.ts b/tests/cases/conformance/internalModules/importDeclarations/importAliasIdentifiers.ts index 6d5723c1355..1ee0ca0384f 100644 --- a/tests/cases/conformance/internalModules/importDeclarations/importAliasIdentifiers.ts +++ b/tests/cases/conformance/internalModules/importDeclarations/importAliasIdentifiers.ts @@ -1,4 +1,4 @@ -module moduleA { +namespace moduleA { export class Point { constructor(public x: number, public y: number) { } } @@ -14,7 +14,7 @@ class clodule { name: string; } -module clodule { +namespace clodule { export interface Point { x: number; y: number; } @@ -32,7 +32,7 @@ function fundule() { return { x: 0, y: 0 }; } -module fundule { +namespace fundule { export interface Point { x: number; y: number; } diff --git a/tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts b/tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts index a2c9738455b..4e064edffa4 100644 --- a/tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts +++ b/tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts @@ -1,6 +1,6 @@ // all errors imported modules conflict with local variables -module A { +namespace A { export var Point = { x: 0, y: 0 } export interface Point { x: number; @@ -8,12 +8,12 @@ module A { } } -module B { +namespace B { var A = { x: 0, y: 0 }; import Point = A; } -module X { +namespace X { export module Y { export interface Point{ x: number; @@ -26,7 +26,7 @@ module X { } } -module Z { +namespace Z { import Y = X.Y; var Y = 12; @@ -34,31 +34,31 @@ module Z { // -module a { +namespace a { export type A = number; } -module b { +namespace b { export import A = a.A; export module A {} } -module c { +namespace c { import any = b.A; } // -module q { +namespace q { export const Q = {}; } -module r { +namespace r { export import Q = q.Q; export type Q = number; } -module s { +namespace s { import Q = r.Q; const Q = 0; } diff --git a/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts b/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts index d16105b19e2..68e46cf6149 100644 --- a/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts +++ b/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithStatementsOfEveryKind.ts @@ -1,6 +1,6 @@ // All of these should be an error -module Y { +namespace Y { public class A { s: string } public class BB extends A { @@ -8,24 +8,24 @@ module Y { } } -module Y2 { +namespace Y2 { public class AA { s: T } public interface I { id: number } public class B extends AA implements I { id: number } } -module Y3 { +namespace Y3 { public module Module { class A { s: string } } } -module Y4 { +namespace Y4 { public enum Color { Blue, Red } } -module YY { +namespace YY { private class A { s: string } private class BB extends A { @@ -33,25 +33,25 @@ module YY { } } -module YY2 { +namespace YY2 { private class AA { s: T } private interface I { id: number } private class B extends AA implements I { id: number } } -module YY3 { +namespace YY3 { private module Module { class A { s: string } } } -module YY4 { +namespace YY4 { private enum Color { Blue, Red } } -module YYY { +namespace YYY { static class A { s: string } static class BB extends A { @@ -59,19 +59,19 @@ module YYY { } } -module YYY2 { +namespace YYY2 { static class AA { s: T } static interface I { id: number } static class B extends AA implements I { id: number } } -module YYY3 { +namespace YYY3 { static module Module { class A { s: string } } } -module YYY4 { +namespace YYY4 { static enum Color { Blue, Red } } diff --git a/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts b/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts index 8d40f964222..4106b752add 100644 --- a/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts +++ b/tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts @@ -1,26 +1,26 @@ // All of these should be an error -module Y { +namespace Y { public var x: number = 0; } -module Y2 { +namespace Y2 { public function fn(x: string) { } } -module Y4 { +namespace Y4 { static var x: number = 0; } -module YY { +namespace YY { static function fn(x: string) { } } -module YY2 { +namespace YY2 { private var x: number = 0; } -module YY3 { +namespace YY3 { private function fn(x: string) { } } diff --git a/tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts b/tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts index 6991795b26c..ec0d7d149d5 100644 --- a/tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts +++ b/tests/cases/conformance/internalModules/moduleBody/moduleWithStatementsOfEveryKind.ts @@ -1,4 +1,4 @@ -module A { +namespace A { class A { s: string } class AA { s: T } interface I { id: number } @@ -8,7 +8,7 @@ module A { id: number; } - module Module { + namespace Module { class A { s: string } } enum Color { Blue, Red } @@ -27,7 +27,7 @@ module A { } } -module Y { +namespace Y { export class A { s: string } export class AA { s: T } export interface I { id: number } diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts b/tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts index 230806f9563..031a65646fd 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/InvalidNonInstantiatedModule.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export interface Point { x: number; y: number } } diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts b/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts index 03021576ea5..594844cf38d 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts @@ -1,3 +1,3 @@ let module = 10; -module in {} \ No newline at end of file +namespace in {} \ No newline at end of file diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/instantiatedModule.ts b/tests/cases/conformance/internalModules/moduleDeclarations/instantiatedModule.ts index 3d19aef7376..a7db090d18a 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/instantiatedModule.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/instantiatedModule.ts @@ -1,6 +1,6 @@ // adding the var makes this an instantiated module -module M { +namespace M { export interface Point { x: number; y: number } export var Point = 1; } @@ -18,7 +18,7 @@ var p1: M.Point; // making the point a class instead of an interface // makes this an instantiated mmodule -module M2 { +namespace M2 { export class Point { x: number; y: number; @@ -42,7 +42,7 @@ var p2: M2.Point; var p2 = new m2.Point(); var p2 = new M2.Point(); -module M3 { +namespace M3 { export enum Color { Blue, Red } } diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts b/tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts index eee2d0cfd3a..e996bf66ff4 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/invalidInstantiatedModule.ts @@ -1,9 +1,9 @@ -module M { +namespace M { export class Point { x: number; y: number } export var Point = 1; // Error } -module M2 { +namespace M2 { export interface Point { x: number; y: number } export var Point = 1; } diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts b/tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts index 18b190df5bf..b32ea16a728 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts @@ -5,7 +5,7 @@ module A.B.C { } } -module A { +namespace A { export module B { export class C { // Error name: string; @@ -19,7 +19,7 @@ module M2.X { } } -module M2 { +namespace M2 { export module X { export var Point: number; // Error } diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/nestedModules.ts b/tests/cases/conformance/internalModules/moduleDeclarations/nestedModules.ts index a91cfd1a723..2066d434a96 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/nestedModules.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/nestedModules.ts @@ -5,7 +5,7 @@ module A.B.C { } } -module A { +namespace A { export module B { var Point: C.Point = { x: 0, y: 0 }; // bug 832088: could not find module 'C' } @@ -17,7 +17,7 @@ module M2.X { } } -module M2 { +namespace M2 { export module X { export var Point: number; } diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/nonInstantiatedModule.ts b/tests/cases/conformance/internalModules/moduleDeclarations/nonInstantiatedModule.ts index 44f78652dbc..5a478467bd0 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/nonInstantiatedModule.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/nonInstantiatedModule.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export interface Point { x: number; y: number } export var a = 1; } @@ -13,7 +13,7 @@ var a1 = M.a; var a2: number; var a2 = m.a; -module M2 { +namespace M2 { export module Point { export function Origin(): Point { return { x: 0, y: 0 }; @@ -32,7 +32,7 @@ var p: M2.Point; var p2: { Origin() : { x: number; y: number; } }; var p2: typeof M2.Point; -module M3 { +namespace M3 { export module Utils { export interface Point { x: number; y: number; diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement2.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement2.ts index d9896761cab..fb730f6cbc9 100644 --- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement2.ts +++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement2.ts @@ -1,4 +1,4 @@ -module M { +namespace M { class C { enum E { diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement3.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement3.ts index e6c6a2e10b9..ac2c8049883 100644 --- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement3.ts +++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ClassElements/parserErrorRecovery_ClassElement3.ts @@ -1,4 +1,4 @@ -module M { +namespace M { ¬ class C { } diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts index db6859191c1..c65a16e8da6 100644 --- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts +++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts @@ -4,7 +4,7 @@ interface IPoint { } // Module -module Shapes { +namespace Shapes { // Class export class Point implements IPoint { diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts index a1c6c438505..7399b78df85 100644 --- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts +++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts @@ -4,7 +4,7 @@ interface IPoint { } // Module -module Shapes { +namespace Shapes { // Class export class Point implements IPoint { diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantAccessibilityModifierInModule1.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantAccessibilityModifierInModule1.ts index b448c7d4148..f102d6c2d86 100644 --- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantAccessibilityModifierInModule1.ts +++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserErrantAccessibilityModifierInModule1.ts @@ -1,4 +1,4 @@ -module M { +namespace M { var x=10; // variable local to this module body private y=x; // property visible only in module export var z=y; // property visible to any code diff --git a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts index 2982009393f..9a9a90a6328 100644 --- a/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts +++ b/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnfinishedTypeNameBeforeKeyword1.ts @@ -1,3 +1,3 @@ var x: TypeModule1. -module TypeModule2 { +namespace TypeModule2 { } diff --git a/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts b/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts index 67a5a980660..988c5b43bb0 100644 --- a/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts +++ b/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment5.ts @@ -1,3 +1,3 @@ -module M { +namespace M { export = A; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment9.ts b/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment9.ts index dc3aad85335..bca02594993 100644 --- a/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment9.ts +++ b/tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment9.ts @@ -2,6 +2,6 @@ namespace Foo { export default foo; } -module Bar { +namespace Bar { export default bar; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration7.ts b/tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration7.ts index 4a47c5e6736..3684110c82c 100644 --- a/tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration7.ts +++ b/tests/cases/conformance/parser/ecmascript5/FunctionDeclarations/parserFunctionDeclaration7.ts @@ -1,3 +1,3 @@ -module M { +namespace M { function foo(); } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration2.d.ts b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration2.d.ts index f3fda8a6457..914fd82b1dd 100644 --- a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration2.d.ts +++ b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration2.d.ts @@ -1,2 +1,2 @@ -module M { +namespace M { } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts index fd658476e61..92631ed83d3 100644 --- a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts +++ b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.d.ts @@ -1,4 +1,4 @@ -module M { +namespace M { declare module M1 { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.ts b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.ts index e63ed3fcddd..4f95e718eb2 100644 --- a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.ts +++ b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration4.ts @@ -1,6 +1,6 @@ -module M { +namespace M { declare module M1 { - module M2 { + namespace M2 { } } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration5.ts b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration5.ts index 995bfb1e8ae..eae32a13d87 100644 --- a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration5.ts +++ b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration5.ts @@ -1,4 +1,4 @@ -module M1 { +namespace M1 { declare module M2 { declare module M3 { } diff --git a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration6.ts b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration6.ts index 20bd858482e..4eb3f3c4ef2 100644 --- a/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration6.ts +++ b/tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModuleDeclaration6.ts @@ -1,2 +1,2 @@ -module number { +namespace number { } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts b/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts index 4cb9c6cb75d..4418c1bf18e 100644 --- a/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts +++ b/tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts @@ -53,7 +53,7 @@ declare module process { export function on(event: string, listener: Function); } -module Harness { +namespace Harness { // Settings export var userSpecifiedroot = ""; var global = Function("return this").call(null); diff --git a/tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts b/tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts index 6446eeae0fa..50978e05868 100644 --- a/tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts +++ b/tests/cases/conformance/parser/ecmascript5/RealWorld/parserindenter.ts @@ -16,7 +16,7 @@ /// -module Formatting { +namespace Formatting { export class Indenter implements ILineIndenationResolver { private indentationBag: IndentationBag; diff --git a/tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts b/tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts index be6281dcf80..5c520ffe9fd 100644 --- a/tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts +++ b/tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts @@ -1,7 +1,7 @@ foo(): Bar { } function Foo () ¬ { } 4+:5 -module M { +namespace M { function a( : T) { } } diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource1.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource1.ts index d423e3ba247..05239d44898 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource1.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource1.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export module CompilerDiagnostics { export var debug = false; export interface IDiagnosticWriter { diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts index 31f8e145d35..9e0016bd99e 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export enum TokenID { // Keywords Any, diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts index be3de8f8738..e4aff55ca36 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export class ASTSpan { public minChar: number = -1; // -1 = "undefined" or "compiler generated" public limChar: number = -1; // -1 = "undefined" or "compiler generated" diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts index d288dcbc80d..3a50638c3d2 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource12.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export interface IAstWalker { walk(ast: AST, parent: AST): AST; options: AstWalkOptions; @@ -217,7 +217,7 @@ module TypeScript { return globalAstWalkerFactory; } - module ChildrenWalkers { + namespace ChildrenWalkers { export function walkNone(preAst: ASTList, parent: AST, walker: IAstWalker): void { // Nothing to do } diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts index 451bd9754d5..49bb0ad75a3 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export function lastOf(items: any[]): any { return (items === null || items.length === 0) ? null : items[items.length - 1]; } diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts index 8d19dee8c72..a961fceb518 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export function hasFlag(val: number, flag: number) { return (val & flag) != 0; diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts index 6c6a9d8dccb..ca7c81be0c1 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback export enum NodeType { None, diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts index 5c9327a7d27..e2c93f08e17 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource4.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export class BlockIntrinsics { public prototype = undefined; diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts index 32b29e574d2..c1546dc54e1 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { // TODO: refactor indent logic for use in emit export class PrintContext { public builder = ""; diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts index 5e98003f851..6dfc89957f2 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource6.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export class TypeCollectionContext { public script: Script = null; diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts index de8b0ff4cb4..be93b002572 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export class Continuation { public exceptionBlock = -1; constructor (public normalBlock: number) { } diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts index 17e855656ac..94ac52faa9c 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export class AssignScopeContext { constructor (public scopeChain: ScopeChain, diff --git a/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts b/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts index 781a4db90eb..ae26f557656 100644 --- a/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts +++ b/tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts @@ -3,7 +3,7 @@ /// -module TypeScript { +namespace TypeScript { export class Binder { constructor (public checker: TypeChecker) { } public resolveBaseTypeLinks(typeLinks: TypeLink[], scope: SymbolScope) { diff --git a/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInitializer.ts b/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInitializer.ts index 5985dee0614..a7f0580702a 100644 --- a/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInitializer.ts +++ b/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInitializer.ts @@ -14,7 +14,7 @@ class D{ function F(x: string): number { return 42; } -module M { +namespace M { export class A { name: string; } diff --git a/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts b/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts index bc354f99c8d..a1c699d4ad1 100644 --- a/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts +++ b/tests/cases/conformance/statements/VariableStatements/everyTypeWithAnnotationAndInvalidInitializer.ts @@ -15,7 +15,7 @@ class D{ function F(x: string): number { return 42; } function F2(x: number): boolean { return x < 42; } -module M { +namespace M { export class A { name: string; } @@ -23,7 +23,7 @@ module M { export function F2(x: number): string { return x.toString(); } } -module N { +namespace N { export class A { id: number; } diff --git a/tests/cases/conformance/statements/VariableStatements/everyTypeWithInitializer.ts b/tests/cases/conformance/statements/VariableStatements/everyTypeWithInitializer.ts index 94bb301bc54..dda7d3b6c60 100644 --- a/tests/cases/conformance/statements/VariableStatements/everyTypeWithInitializer.ts +++ b/tests/cases/conformance/statements/VariableStatements/everyTypeWithInitializer.ts @@ -14,7 +14,7 @@ class D{ function F(x: string): number { return 42; } -module M { +namespace M { export class A { name: string; } diff --git a/tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts b/tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts index 8a22997661b..9b27072ab59 100644 --- a/tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts +++ b/tests/cases/conformance/statements/VariableStatements/invalidMultipleVariableDeclarations.ts @@ -19,7 +19,7 @@ class D{ function F(x: string): number { return 42; } -module M { +namespace M { export class A { name: string; } diff --git a/tests/cases/conformance/statements/for-inStatements/for-inStatements.ts b/tests/cases/conformance/statements/for-inStatements/for-inStatements.ts index 89cc0314d36..daaeeee0c14 100644 --- a/tests/cases/conformance/statements/for-inStatements/for-inStatements.ts +++ b/tests/cases/conformance/statements/for-inStatements/for-inStatements.ts @@ -64,7 +64,7 @@ var i: I; for (var x in i[42]) { } -module M { +namespace M { export class X { name:string } diff --git a/tests/cases/conformance/statements/forStatements/forStatements.ts b/tests/cases/conformance/statements/forStatements/forStatements.ts index 1e65bdc2932..961aab8ac92 100644 --- a/tests/cases/conformance/statements/forStatements/forStatements.ts +++ b/tests/cases/conformance/statements/forStatements/forStatements.ts @@ -16,7 +16,7 @@ class D{ function F(x: string): number { return 42; } -module M { +namespace M { export class A { name: string; } diff --git a/tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts b/tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts index 64317b23336..1759ea55ae9 100644 --- a/tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts +++ b/tests/cases/conformance/statements/forStatements/forStatementsMultipleInvalidDecl.ts @@ -21,7 +21,7 @@ class D{ function F(x: string): number { return 42; } -module M { +namespace M { export class A { name: string; } diff --git a/tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts b/tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts index 03f042401d8..02c63e85ff5 100644 --- a/tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts +++ b/tests/cases/conformance/statements/ifDoWhileStatements/ifDoWhileStatements.ts @@ -22,7 +22,7 @@ class D{ function F(x: string): number { return 42; } function F2(x: number): boolean { return x < 42; } -module M { +namespace M { export class A { name: string; } @@ -30,7 +30,7 @@ module M { export function F2(x: number): string { return x.toString(); } } -module N { +namespace N { export class A { id: number; } diff --git a/tests/cases/conformance/statements/switchStatements/switchStatements.ts b/tests/cases/conformance/statements/switchStatements/switchStatements.ts index e26d8b76b56..6455d091bd9 100644 --- a/tests/cases/conformance/statements/switchStatements/switchStatements.ts +++ b/tests/cases/conformance/statements/switchStatements/switchStatements.ts @@ -1,4 +1,4 @@ -module M { +namespace M { export function fn(x: number) { return ''; } diff --git a/tests/cases/conformance/statements/throwStatements/throwStatements.ts b/tests/cases/conformance/statements/throwStatements/throwStatements.ts index 07c09da93fc..5825ed6c2e0 100644 --- a/tests/cases/conformance/statements/throwStatements/throwStatements.ts +++ b/tests/cases/conformance/statements/throwStatements/throwStatements.ts @@ -18,7 +18,7 @@ class D{ function F(x: string): number { return 42; } -module M { +namespace M { export class A { name: string; } diff --git a/tests/cases/conformance/types/any/assignAnyToEveryType.ts b/tests/cases/conformance/types/any/assignAnyToEveryType.ts index 0af7d94d7b3..e26cdc01ad8 100644 --- a/tests/cases/conformance/types/any/assignAnyToEveryType.ts +++ b/tests/cases/conformance/types/any/assignAnyToEveryType.ts @@ -34,7 +34,7 @@ var i: I = x; var j: { (): string } = x; var j2: { (x: T): string } = x; -module M { +namespace M { export var foo = 1; } diff --git a/tests/cases/conformance/types/members/duplicateStringIndexers.ts b/tests/cases/conformance/types/members/duplicateStringIndexers.ts index 67e12d88017..6bbc7907369 100644 --- a/tests/cases/conformance/types/members/duplicateStringIndexers.ts +++ b/tests/cases/conformance/types/members/duplicateStringIndexers.ts @@ -1,6 +1,6 @@ // it is an error to have duplicate index signatures of the same kind in a type -module test { +namespace test { interface Number { [x: string]: string; [x: string]: string; diff --git a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts index 1cc499c7d6e..fa3de312729 100644 --- a/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts +++ b/tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignatureWithoutReturnTypeAnnotationInference.ts @@ -73,7 +73,7 @@ function foo10(x: number) { } var r10 = foo10(1); -module M { +namespace M { export var x = 1; export class C { foo: string } } @@ -96,7 +96,7 @@ function foo12() { var r12 = foo12(); function m1() { return 1; } -module m1 { export var y = 2; } +namespace m1 { export var y = 2; } function foo13() { return m1; } @@ -106,7 +106,7 @@ class c1 { foo: string; constructor(x) { } } -module c1 { +namespace c1 { export var x = 1; } function foo14() { @@ -115,7 +115,7 @@ function foo14() { var r14 = foo14(); enum e1 { A } -module e1 { export var y = 1; } +namespace e1 { export var y = 1; } function foo15() { return e1; } diff --git a/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts b/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts index 0075325bda4..71fbcd6d97c 100644 --- a/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts +++ b/tests/cases/conformance/types/objectTypeLiteral/constructSignatures/constructSignaturesWithOverloads2.ts @@ -6,7 +6,7 @@ class C { constructor(x: number, y: string); constructor(x: number) { } } -module C { +namespace C { export var x = 1; } @@ -17,7 +17,7 @@ class C2 { constructor(x: T, y: string); constructor(x: T) { } } -module C2 { +namespace C2 { export var x = 1; } diff --git a/tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts b/tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts index 5d9fe27edbc..5f498843bd1 100644 --- a/tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts +++ b/tests/cases/conformance/types/primitives/boolean/invalidBooleanAssignments.ts @@ -17,7 +17,7 @@ var g: I = x; var h: { (): string } = x; var h2: { toString(): string } = x; // no error -module M { export var a = 1; } +namespace M { export var a = 1; } M = x; function i(a: T) { diff --git a/tests/cases/conformance/types/primitives/null/validNullAssignments.ts b/tests/cases/conformance/types/primitives/null/validNullAssignments.ts index 5fe7fac1944..eab813d531e 100644 --- a/tests/cases/conformance/types/primitives/null/validNullAssignments.ts +++ b/tests/cases/conformance/types/primitives/null/validNullAssignments.ts @@ -19,7 +19,7 @@ var g: I; g = null; // ok I = null; // error -module M { export var x = 1; } +namespace M { export var x = 1; } M = null; // error var h: { f(): void } = null; diff --git a/tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts b/tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts index 443a719be26..74ca77f34c3 100644 --- a/tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts +++ b/tests/cases/conformance/types/primitives/number/invalidNumberAssignments.ts @@ -14,7 +14,7 @@ var f: I = x; var g: { baz: string } = 1; var g2: { 0: number } = 1; -module M { export var x = 1; } +namespace M { export var x = 1; } M = x; function i(a: T) { diff --git a/tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts b/tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts index 0957843f041..8c526bf3e30 100644 --- a/tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts +++ b/tests/cases/conformance/types/primitives/string/invalidStringAssignments.ts @@ -14,7 +14,7 @@ var f: I = x; var g: { baz: string } = 1; var g2: { 0: number } = 1; -module M { export var x = 1; } +namespace M { export var x = 1; } M = x; function i(a: T) { diff --git a/tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts b/tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts index 185e6e6884e..28608c30e3f 100644 --- a/tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts +++ b/tests/cases/conformance/types/primitives/undefined/invalidUndefinedAssignments.ts @@ -13,7 +13,7 @@ var g: I; g = x; I = x; -module M { export var x = 1; } +namespace M { export var x = 1; } M = x; function i(a: T) { } diff --git a/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts b/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts index 58a5a543861..b17f174618d 100644 --- a/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts +++ b/tests/cases/conformance/types/primitives/undefined/invalidUndefinedValues.ts @@ -16,7 +16,7 @@ interface I { foo: string } var c: I; x = c; -module M { export var x = 1; } +namespace M { export var x = 1; } x = M; x = { f() { } } diff --git a/tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts b/tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts index f7792964086..73612df0b8d 100644 --- a/tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts +++ b/tests/cases/conformance/types/primitives/void/invalidAssignmentsToVoid.ts @@ -13,7 +13,7 @@ interface I { foo: string; } var i: I; x = i; -module M { export var x = 1; } +namespace M { export var x = 1; } x = M; function f(a: T) { diff --git a/tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts b/tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts index 35b77268f9f..61e2fbd574d 100644 --- a/tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts +++ b/tests/cases/conformance/types/primitives/void/invalidVoidAssignments.ts @@ -14,7 +14,7 @@ var f: I = x; var g: { baz: string } = 1; var g2: { 0: number } = 1; -module M { export var x = 1; } +namespace M { export var x = 1; } M = x; function i(a: T) { diff --git a/tests/cases/conformance/types/primitives/void/invalidVoidValues.ts b/tests/cases/conformance/types/primitives/void/invalidVoidValues.ts index 4605195f5da..89e6d4ae9b2 100644 --- a/tests/cases/conformance/types/primitives/void/invalidVoidValues.ts +++ b/tests/cases/conformance/types/primitives/void/invalidVoidValues.ts @@ -17,7 +17,7 @@ x = b; x = { f() {} } -module M { export var x = 1; } +namespace M { export var x = 1; } x = M; function f(a: T) { diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts index 0bd76a9ba5d..c7013c1f79a 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts @@ -20,7 +20,7 @@ var i2: I; export var r5: typeof i; export var r5: typeof i2; -module M { +namespace M { export var foo = ''; export class C { foo: string; @@ -42,7 +42,7 @@ export var r11: typeof E.A; export var r12: typeof r12; function foo() { } -module foo { +namespace foo { export var y = 1; export class C { foo: string; diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts index 878885a8a9d..4f7f116b921 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofModuleWithoutExports.ts @@ -1,4 +1,4 @@ -module M { +namespace M { var x = 1; class C { foo: number; diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts index 420604c5507..b922b01fe16 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/typeofThis.ts @@ -50,7 +50,7 @@ namespace Test6 { } } -module Test7 { +namespace Test7 { export let f = () => { let x: typeof this.no = 1; } diff --git a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts index 86f6df5cdfe..c51906a2741 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts @@ -22,7 +22,7 @@ class D extends C { interface I extends C {} -module M { +namespace M { export class E { foo: T } } diff --git a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts index 7f062766cb3..e185ba8d408 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts @@ -22,7 +22,7 @@ class D extends I { interface U extends I {} -module M { +namespace M { export interface E { foo: T } } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts index cc154308a1f..ae927567cce 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts @@ -64,7 +64,7 @@ declare function foo14(x: any): any; var r3 = foo3(a); // any function f() { } -module f { +namespace f { export var bar = 1; } declare function foo15(x: typeof f): typeof f; @@ -72,7 +72,7 @@ declare function foo15(x: any): any; var r3 = foo3(a); // any class CC { baz: string } -module CC { +namespace CC { export var bar = 1; } declare function foo16(x: CC): CC; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts index 26f3eee594d..2f3831196dd 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignableToEveryType2.ts @@ -86,7 +86,7 @@ interface I14 { function f() { } -module f { +namespace f { export var bar = 1; } interface I15 { @@ -96,7 +96,7 @@ interface I15 { class c { baz: string } -module c { +namespace c { export var bar = 1; } interface I16 { diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts index 33f8ea4613e..8d198948990 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts @@ -1,12 +1,12 @@ // These are mostly permitted with the current loose rules. All ok unless otherwise noted. -module Errors { +namespace Errors { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } - module WithNonGenericSignaturesInBaseType { + namespace WithNonGenericSignaturesInBaseType { // target type with non-generic call signatures var a2: (x: number) => string[]; var a7: (x: (arg: Base) => Derived) => (r: Base) => Derived2; @@ -82,7 +82,7 @@ module Errors { b17 = a17; } - module WithGenericSignaturesInBaseType { + namespace WithGenericSignaturesInBaseType { // target type has generic call signature var a2: (x: T) => T[]; var b2: (x: T) => string[]; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts index ef74c1eb633..e63a4131b76 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts @@ -1,12 +1,12 @@ // checking assignment compatibility relations for function types. -module Errors { +namespace Errors { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } - module WithNonGenericSignaturesInBaseType { + namespace WithNonGenericSignaturesInBaseType { // target type with non-generic call signatures var a2: new (x: number) => string[]; var a7: new (x: (arg: Base) => Derived) => (r: Base) => Derived2; @@ -82,7 +82,7 @@ module Errors { b17 = a17; // error } - module WithGenericSignaturesInBaseType { + namespace WithGenericSignaturesInBaseType { // target type has generic call signature var a2: new (x: T) => T[]; var b2: new (x: T) => string[]; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts index 63a6995395f..c5fb6773a95 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.ts @@ -1,6 +1,6 @@ // call signatures in derived types must have the same or fewer optional parameters as the target for assignment -module ClassTypeParam { +namespace ClassTypeParam { class Base { a: () => T; a2: (x?: T) => T; @@ -36,7 +36,7 @@ module ClassTypeParam { } } -module GenericSignaturesInvalid { +namespace GenericSignaturesInvalid { class Base2 { a: () => T; @@ -92,7 +92,7 @@ module GenericSignaturesInvalid { } } -module GenericSignaturesValid { +namespace GenericSignaturesValid { class Base2 { a: () => T; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts index ad19c342656..42a8dee654e 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer.ts @@ -17,7 +17,7 @@ var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error -module Generics { +namespace Generics { class A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts index 8fa330cd6e5..ff0cb4a9319 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer2.ts @@ -17,7 +17,7 @@ var b2: { [x: number]: Derived2; } a = b2; b2 = a; // error -module Generics { +namespace Generics { interface A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts index 53cefaf1286..249e2b8e7ce 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithNumericIndexer3.ts @@ -22,7 +22,7 @@ var b2: { [x: number]: Derived2; }; a = b2; // ok b2 = a; // error -module Generics { +namespace Generics { class A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts index d7a94cc8629..74a2c2e9410 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers.ts @@ -1,7 +1,7 @@ // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // no errors expected -module SimpleTypes { +namespace SimpleTypes { class S { foo: string; } class T { foo: string; } var s: S; @@ -42,7 +42,7 @@ module SimpleTypes { a2 = t; } -module ObjectTypes { +namespace ObjectTypes { class S { foo: S; } class T { foo: T; } var s: S; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts index 26ef9d3a240..e2b127f2231 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers4.ts @@ -1,6 +1,6 @@ // members N and M of types S and T have the same name, same accessibility, same optionality, and N is not assignable M -module OnlyDerived { +namespace OnlyDerived { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Base { baz: string; } @@ -45,7 +45,7 @@ module OnlyDerived { a2 = t; // error } -module WithBase { +namespace WithBase { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Base { baz: string; } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts index c6546722336..b151a2946f0 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersAccessibility.ts @@ -1,6 +1,6 @@ // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M -module TargetIsPublic { +namespace TargetIsPublic { // targets class Base { public foo: string; @@ -53,7 +53,7 @@ module TargetIsPublic { } -module TargetIsPublic { +namespace TargetIsPublic { // targets class Base { private foo: string; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts index 31fb9207286..9af58367a8b 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality.ts @@ -4,7 +4,7 @@ class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } -module TargetHasOptional { +namespace TargetHasOptional { // targets interface C { opt?: Base @@ -46,7 +46,7 @@ module TargetHasOptional { b = c; } -module SourceHasOptional { +namespace SourceHasOptional { // targets interface C { opt: Base diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts index 1f193285681..b34322ce514 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersOptionality2.ts @@ -5,7 +5,7 @@ class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } -module TargetHasOptional { +namespace TargetHasOptional { // targets interface C { opt?: Base @@ -47,7 +47,7 @@ module TargetHasOptional { b = c; } -module SourceHasOptional { +namespace SourceHasOptional { // targets interface C { opt: Base diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts index 5ea0e35b9ca..e767ef94976 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts @@ -1,7 +1,7 @@ // members N and M of types S and T have the same name, same accessibility, same optionality, and N is assignable M // string named numeric properties work correctly, errors below unless otherwise noted -module JustStrings { +namespace JustStrings { class S { '1': string; } class T { '1.': string; } var s: S; @@ -42,7 +42,7 @@ module JustStrings { a2 = t; } -module NumbersAndStrings { +namespace NumbersAndStrings { class S { '1': string; } class T { 1: string; } var s: S; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts index 421ac1c00c6..8c5ffbc9309 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer.ts @@ -18,7 +18,7 @@ var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error -module Generics { +namespace Generics { class A { [x: string]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts index 9827bd425c0..68a37a04162 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer2.ts @@ -18,7 +18,7 @@ var b2: { [x: string]: Derived2; } a = b2; // ok b2 = a; // error -module Generics { +namespace Generics { interface A { [x: string]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts index 74b34313277..6956a47a2ef 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithStringIndexer3.ts @@ -9,7 +9,7 @@ var b1: { [x: string]: string; } a = b1; // error b1 = a; // error -module Generics { +namespace Generics { class A { [x: string]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts index f43557426cc..02aef7aaf41 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance.ts @@ -1,4 +1,4 @@ -module CallSignature { +namespace CallSignature { interface Base { // T // M's (x: number): void; @@ -31,7 +31,7 @@ module CallSignature { } } -module MemberWithCallSignature { +namespace MemberWithCallSignature { interface Base { // T // M's a: (x: number) => void; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts index f729407c9c3..a9afeccfda8 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance3.ts @@ -1,13 +1,13 @@ // checking subtype relations for function types as it relates to contextual signature instantiation // error cases -module Errors { +namespace Errors { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } - module WithNonGenericSignaturesInBaseType { + namespace WithNonGenericSignaturesInBaseType { // base type with non-generic call signatures interface A { a2: (x: number) => string[]; @@ -91,7 +91,7 @@ module Errors { } } - module WithGenericSignaturesInBaseType { + namespace WithGenericSignaturesInBaseType { // base type has generic call signature interface B { a2: (x: T) => T[]; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts index aec5def130f..ac822681356 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance.ts @@ -1,6 +1,6 @@ // Checking basic subtype relations with construct signatures -module ConstructSignature { +namespace ConstructSignature { interface Base { // T // M's new (x: number): void; // BUG 842221 @@ -32,7 +32,7 @@ module ConstructSignature { } } -module MemberWithConstructSignature { +namespace MemberWithConstructSignature { interface Base { // T // M's a: new (x: number) => void; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts index ce655eba975..5e8ff19b4f1 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance3.ts @@ -1,13 +1,13 @@ // checking subtype relations for function types as it relates to contextual signature instantiation // error cases -module Errors { +namespace Errors { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } class OtherDerived extends Base { bing: string; } - module WithNonGenericSignaturesInBaseType { + namespace WithNonGenericSignaturesInBaseType { // base type with non-generic call signatures interface A { a2: new (x: number) => string[]; @@ -77,7 +77,7 @@ module Errors { } } - module WithGenericSignaturesInBaseType { + namespace WithGenericSignaturesInBaseType { // base type has generic call signature interface B { a2: new (x: T) => T[]; diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts index 84d7638375f..13cf313e668 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignability.ts @@ -13,7 +13,7 @@ f = 1; // ok var x: number = e; // ok x = f; // ok -module Others { +namespace Others { var a: any = e; // ok class C { diff --git a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts index 619fec45af9..c04673b29fc 100644 --- a/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts +++ b/tests/cases/conformance/types/typeRelationships/assignmentCompatibility/enumAssignabilityInInheritance.ts @@ -81,7 +81,7 @@ declare function foo13(x: E): E; var r4 = foo13(E.A); function f() { } -module f { +namespace f { export var bar = 1; } declare function foo14(x: typeof f): typeof f; @@ -90,7 +90,7 @@ declare function foo14(x: E): E; var r4 = foo14(E.A); class CC { baz: string } -module CC { +namespace CC { export var bar = 1; } declare function foo15(x: CC): CC; diff --git a/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts b/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts index 0f498c570a7..e9a0121e455 100644 --- a/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts +++ b/tests/cases/conformance/types/typeRelationships/bestCommonType/heterogeneousArrayLiterals.ts @@ -25,7 +25,7 @@ var base: Base; var derived: Derived; var derived2: Derived2; -module Derived { +namespace Derived { var h = [{ foo: base, basear: derived }, { foo: base }]; // {foo: Base}[] var i = [{ foo: base, basear: derived }, { foo: derived }]; // {foo: Derived}[] @@ -39,7 +39,7 @@ module Derived { var q = [[() => derived2], [() => derived]]; // {}[] } -module WithContextualType { +namespace WithContextualType { // no errors var a: Base[] = [derived, derived2]; var b: Derived[] = [null]; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts index 3d76f3f0245..8d312791b64 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/enumIsNotASubtypeOfAnythingButNumber.ts @@ -87,7 +87,7 @@ interface I14 { function f() { } -module f { +namespace f { export var bar = 1; } interface I15 { @@ -97,7 +97,7 @@ interface I15 { class c { baz: string } -module c { +namespace c { export var bar = 1; } interface I16 { diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts index 24f2ab71d41..ec976b62270 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/nullIsSubtypeOfEverythingButUndefined.ts @@ -54,7 +54,7 @@ var r14 = true ? E.A : null; var r14 = true ? null : E.A; function f() { } -module f { +namespace f { export var bar = 1; } var af: typeof f; @@ -62,7 +62,7 @@ var r15 = true ? af : null; var r15 = true ? null : af; class c { baz: string } -module c { +namespace c { export var bar = 1; } var ac: typeof c; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts index 0e5df543199..fc24f4120de 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfAny.ts @@ -86,7 +86,7 @@ interface I14 { function f() { } -module f { +namespace f { export var bar = 1; } interface I15 { @@ -96,7 +96,7 @@ interface I15 { class c { baz: string } -module c { +namespace c { export var bar = 1; } interface I16 { diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts index a731ae60a22..a82066954d2 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameter.ts @@ -18,11 +18,11 @@ class C1 { foo: number; } class C2 { foo: T; } enum E { A } function f() { } -module f { +namespace f { export var bar = 1; } class c { baz: string } -module c { +namespace c { export var bar = 1; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts index 9edf4f5f417..1191383bf90 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints2.ts @@ -39,11 +39,11 @@ class C1 { foo: number; } class C2 { foo: T; } enum E { A } function f() { } -module f { +namespace f { export var bar = 1; } class c { baz: string } -module c { +namespace c { export var bar = 1; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts index f63b63432e5..b535499be89 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithRecursiveConstraints.ts @@ -53,7 +53,7 @@ function f, U extends Foo, V extends Foo>(t: T, u: U, v: var r12 = true ? new Foo() : v; } -module M1 { +namespace M1 { class Base { foo: T; } @@ -105,7 +105,7 @@ module M1 { } -module M2 { +namespace M2 { class Base2 { foo: Foo; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts index c20bafeeabf..188cc9142bb 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypesOfUnion.ts @@ -3,9 +3,9 @@ interface I8 { [x: string]: number[]; } class A { foo: number; } class A2 { foo: T; } function f() { } -module f { export var bar = 1; } +namespace f { export var bar = 1; } class c { baz: string } -module c { export var bar = 1; } +namespace c { export var bar = 1; } // A type T is a subtype of a union type U if T is a subtype of any type in U. interface I1 { diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures.ts index 768007371c3..59069c4849e 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures.ts @@ -1,4 +1,4 @@ -module CallSignature { +namespace CallSignature { declare function foo1(cb: (x: number) => void): typeof cb; declare function foo1(cb: any): any; var r = foo1((x: number) => 1); // ok because base returns void diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts index 505919547f7..b0e644145cb 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignatures3.ts @@ -1,7 +1,7 @@ // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' -module Errors { +namespace Errors { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } @@ -105,7 +105,7 @@ module Errors { var r9 = foo17(r9arg); // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } -module WithGenericSignaturesInBaseType { +namespace WithGenericSignaturesInBaseType { declare function foo2(a2: (x: T) => T[]): typeof a2; declare function foo2(a2: any): any; var r2arg2 = (x: T) => ['']; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts index 25efe0679fd..947f0a84f42 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithCallSignaturesWithSpecializedSignatures.ts @@ -1,6 +1,6 @@ // same as subtypingWithCallSignatures but with additional specialized signatures that should not affect the results -module CallSignature { +namespace CallSignature { interface Base { // T // M's (x: 'a'): void; @@ -35,7 +35,7 @@ module CallSignature { } } -module MemberWithCallSignature { +namespace MemberWithCallSignature { interface Base { // T // M's a: { diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures.ts index cec1cf8b299..206a90a318e 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures.ts @@ -1,4 +1,4 @@ -module ConstructSignature { +namespace ConstructSignature { declare function foo1(cb: new (x: number) => void): typeof cb; declare function foo1(cb: any): any; var rarg1: new (x: number) => number; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts index 215a5d1d4d1..0142def4fb9 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignatures3.ts @@ -1,7 +1,7 @@ // checking subtype relations for function types as it relates to contextual signature instantiation // error cases, so function calls will all result in 'any' -module Errors { +namespace Errors { class Base { foo: string; } class Derived extends Base { bar: string; } class Derived2 extends Derived { baz: string; } @@ -107,7 +107,7 @@ module Errors { var r9 = foo17(r9arg); // // (x: { (a: T): T; (a: T): T; }): any[]; (x: { (a: T): T; (a: T): T; }): any[]; } -module WithGenericSignaturesInBaseType { +namespace WithGenericSignaturesInBaseType { declare function foo2(a2: new (x: T) => T[]): typeof a2; declare function foo2(a2: any): any; var r2arg2: new (x: T) => string[]; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts index b6bade1902a..97f1522393a 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithConstructSignaturesWithSpecializedSignatures.ts @@ -1,6 +1,6 @@ // same as subtypingWithCallSignatures but with additional specialized signatures that should not affect the results -module CallSignature { +namespace CallSignature { interface Base { // T // M's new (x: 'a'): void; @@ -35,7 +35,7 @@ module CallSignature { } } -module MemberWithCallSignature { +namespace MemberWithCallSignature { interface Base { // T // M's a: { diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts index 9bed1ee5ad5..c1b3845f8f4 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericCallSignaturesWithOptionalParameters.ts @@ -1,6 +1,6 @@ // call signatures in derived types must have the same or fewer optional parameters as the base type -module ClassTypeParam { +namespace ClassTypeParam { interface Base { a: () => T; a2: (x?: T) => T; @@ -86,7 +86,7 @@ module ClassTypeParam { } } -module GenericSignaturesInvalid { +namespace GenericSignaturesInvalid { // all of these are errors interface Base2 { @@ -174,7 +174,7 @@ module GenericSignaturesInvalid { } } -module GenericSignaturesValid { +namespace GenericSignaturesValid { interface Base2 { a: () => T; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts index 576e89a7f17..f24f03ae859 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithGenericConstructSignaturesWithOptionalParameters.ts @@ -1,6 +1,6 @@ // call signatures in derived types must have the same or fewer optional parameters as the base type -module ClassTypeParam { +namespace ClassTypeParam { interface Base { a: new () => T; a2: new (x?: T) => T; @@ -86,7 +86,7 @@ module ClassTypeParam { } } -module GenericSignaturesInvalid { +namespace GenericSignaturesInvalid { // all of these are errors interface Base2 { @@ -174,7 +174,7 @@ module GenericSignaturesInvalid { } } -module GenericSignaturesValid { +namespace GenericSignaturesValid { interface Base2 { a: new () => T; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts index ae4d578d55d..87a3058397b 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer.ts @@ -16,7 +16,7 @@ class B2 extends A { [x: number]: Derived2; // ok } -module Generics { +namespace Generics { class A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts index 24437548a3b..2f48ea170c3 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer2.ts @@ -16,7 +16,7 @@ interface B2 extends A { [x: number]: Derived2; // ok } -module Generics { +namespace Generics { interface A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts index a69756c44a7..8f5dc495236 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer3.ts @@ -16,7 +16,7 @@ class B2 extends A { [x: number]: Derived2; // ok } -module Generics { +namespace Generics { class A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts index e86e3e2c594..53150d37283 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer4.ts @@ -12,7 +12,7 @@ class B extends A { [x: number]: string; // error } -module Generics { +namespace Generics { class A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts index 721a203a20f..76f99f99315 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithNumericIndexer5.ts @@ -16,7 +16,7 @@ class B2 implements A { [x: string]: Derived2; // ok } -module Generics { +namespace Generics { interface A { [x: number]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts index 0d901b18f74..6e5cdba8382 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers.ts @@ -34,7 +34,7 @@ class B3 extends A3 { '2.0': string; // error } -module TwoLevels { +namespace TwoLevels { class A { foo: Base; bar: Base; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts index 5dea46670f3..4ff24e8ed68 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers2.ts @@ -8,7 +8,7 @@ interface Derived extends Base { // N and M have the same name, same accessibility, same optionality, and N is a subtype of M // foo properties are valid, bar properties cause errors in the derived class declarations -module NotOptional { +namespace NotOptional { interface A { foo: Base; bar: Base; @@ -41,7 +41,7 @@ module NotOptional { } // same cases as above but with optional -module Optional { +namespace Optional { interface A { foo?: Base; bar?: Base; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts index 423753dbc0c..fb06291f49f 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers3.ts @@ -8,7 +8,7 @@ interface Derived extends Base { // N and M have the same name, same accessibility, same optionality, and N is a subtype of M // foo properties are valid, bar properties cause errors in the derived class declarations -module NotOptional { +namespace NotOptional { interface A { foo: Base; bar: Derived; @@ -40,7 +40,7 @@ module NotOptional { } } -module Optional { +namespace Optional { interface A { foo?: Base; bar?: Derived; diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts index 1095a2183f3..e3d72f00a1a 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers5.ts @@ -8,7 +8,7 @@ interface Derived extends Base { // N and M have the same name, same accessibility, same optionality, and N is a subtype of M // foo properties are valid, bar properties cause errors in the derived class declarations -module NotOptional { +namespace NotOptional { interface A { foo: Base; } @@ -35,7 +35,7 @@ module NotOptional { } // same cases as above but with optional -module Optional { +namespace Optional { interface A { foo?: Base; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts index 921f5fb76b3..a6690713726 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersAccessibility2.ts @@ -8,7 +8,7 @@ class Derived extends Base { bar: string; } -module ExplicitPublic { +namespace ExplicitPublic { class A { private foo: Base; } @@ -34,7 +34,7 @@ module ExplicitPublic { } } -module ImplicitPublic { +namespace ImplicitPublic { class A { private foo: Base; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality.ts index 05a8b071c87..635daca63b4 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembersOptionality.ts @@ -41,7 +41,7 @@ var a: { Foo?: Base; }; var b = { Foo: null }; var r = true ? a : b; -module TwoLevels { +namespace TwoLevels { interface T { Foo?: Base; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts index 78065e03991..2b4d3fbe69d 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer.ts @@ -16,7 +16,7 @@ class B2 extends A { [x: string]: Derived2; // ok } -module Generics { +namespace Generics { class A { [x: string]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts index dba473accde..b88b6362e95 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer2.ts @@ -16,7 +16,7 @@ interface B2 extends A { [x: string]: Derived2; // ok } -module Generics { +namespace Generics { interface A { [x: string]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts index c87937ec7a5..2ba9d981b78 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer3.ts @@ -16,7 +16,7 @@ class B2 extends A { [x: string]: Derived2; // ok } -module Generics { +namespace Generics { class A { [x: string]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts index 08e42144a38..fd26338a5bd 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/subtypingWithStringIndexer4.ts @@ -12,7 +12,7 @@ class B extends A { [x: string]: string; // error } -module Generics { +namespace Generics { class A { [x: string]: T; } diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts index 7ee0906ee29..b32eaddad38 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/undefinedIsSubtypeOfEverything.ts @@ -79,7 +79,7 @@ class D11 extends Base { } function f() { } -module f { +namespace f { export var bar = 1; } class D12 extends Base { @@ -88,7 +88,7 @@ class D12 extends Base { class c { baz: string } -module c { +namespace c { export var bar = 1; } class D13 extends Base { diff --git a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/unionSubtypeIfEveryConstituentTypeIsSubtype.ts b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/unionSubtypeIfEveryConstituentTypeIsSubtype.ts index 7caa26a2959..1004d557cc4 100644 --- a/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/unionSubtypeIfEveryConstituentTypeIsSubtype.ts +++ b/tests/cases/conformance/types/typeRelationships/subtypesAndSuperTypes/unionSubtypeIfEveryConstituentTypeIsSubtype.ts @@ -102,7 +102,7 @@ interface I14 { function f() { } -module f { +namespace f { export var bar = 1; } interface I15 { @@ -113,7 +113,7 @@ interface I15 { class c { baz: string } -module c { +namespace c { export var bar = 1; } interface I16 { diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts index b1db7364ab2..27dad55cf3c 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts @@ -1,5 +1,5 @@ -module m1 { +namespace m1 { interface Promise { then(cb: (x: T) => Promise): Promise; } @@ -12,7 +12,7 @@ module m1 { ////////////////////////////////////// -module m2 { +namespace m2 { interface Promise { then(cb: (x: T) => Promise): Promise; } @@ -26,7 +26,7 @@ module m2 { ////////////////////////////////////// -module m3 { +namespace m3 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; @@ -40,7 +40,7 @@ module m3 { ////////////////////////////////////// -module m4 { +namespace m4 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; @@ -55,7 +55,7 @@ module m4 { ////////////////////////////////////// -module m5 { +namespace m5 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; @@ -71,7 +71,7 @@ module m5 { ////////////////////////////////////// -module m6 { +namespace m6 { interface Promise { then(cb: (x: T) => Promise): Promise; then(cb: (x: T) => Promise, error?: (error: any) => Promise): Promise; diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts index c37b2e31333..ed1ea0b7fb7 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts @@ -1,7 +1,7 @@ // When a function expression is inferentially typed (section 4.9.3) and a type assigned to a parameter in that expression references type parameters for which inferences are being made, // the corresponding inferred type arguments to become fixed and no further candidate inferences are made for them. -module onlyT { +namespace onlyT { function foo(a: (x: T) => T, b: (x: T) => T) { var r: (x: T) => T; return r; @@ -37,7 +37,7 @@ module onlyT { var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error } -module TU { +namespace TU { function foo(a: (x: T) => T, b: (x: U) => U) { var r: (x: T) => T; return r; diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts index 527286e6ee2..3833f433a1d 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts @@ -1,7 +1,7 @@ // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets -module NonGenericParameter { +namespace NonGenericParameter { var a: { new(x: boolean): boolean; new(x: string): string; @@ -16,7 +16,7 @@ module NonGenericParameter { var r2 = foo4(b); } -module GenericParameter { +namespace GenericParameter { function foo5(cb: { new(x: T): string; new(x: number): T }) { return cb; } diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts index c8ce120d357..0041e31ec73 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments2.ts @@ -1,7 +1,7 @@ // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets -module NonGenericParameter { +namespace NonGenericParameter { var a: { new(x: boolean): boolean; new(x: string): string; @@ -15,7 +15,7 @@ module NonGenericParameter { var r3 = foo4(b); // ok } -module GenericParameter { +namespace GenericParameter { function foo5(cb: { new(x: T): string; new(x: number): T }) { return cb; } diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments.ts index b0389698d08..ebe561b60b4 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments.ts @@ -1,7 +1,7 @@ // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets -module NonGenericParameter { +namespace NonGenericParameter { var a: { (x: boolean): boolean; (x: string): string; @@ -16,7 +16,7 @@ module NonGenericParameter { var r4 = foo4(x => x); } -module GenericParameter { +namespace GenericParameter { function foo5(cb: { (x: T): string; (x: number): T }) { return cb; } diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts index 1333f49f833..535a6319511 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedFunctionTypedArguments2.ts @@ -1,7 +1,7 @@ // Function typed arguments with multiple signatures must be passed an implementation that matches all of them // Inferences are made quadratic-pairwise to and from these overload sets -module NonGenericParameter { +namespace NonGenericParameter { var a: { (x: boolean): boolean; (x: string): string; @@ -14,7 +14,7 @@ module NonGenericParameter { var r3 = foo4((x: T) => { var r: U; return r }); // ok } -module GenericParameter { +namespace GenericParameter { function foo5(cb: { (x: T): string; (x: number): T }) { return cb; } diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts index f429cd5169d..b2ab3c3a754 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts @@ -1,7 +1,7 @@ // Generic functions used as arguments for function typed parameters are not used to make inferences from // Using function arguments, no errors expected -module ImmediatelyFix { +namespace ImmediatelyFix { class C { foo(x: (a: T) => T) { return x(null); @@ -24,7 +24,7 @@ module ImmediatelyFix { var r3a = c2.foo(x => 1); // number } -module WithCandidates { +namespace WithCandidates { class C { foo2(x: T, cb: (a: T) => U) { return cb(x); diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts index 1c29b3822b4..07c017d9bfe 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithObjectTypeArgsAndConstraints.ts @@ -14,7 +14,7 @@ class X { x: T; } -module Class { +namespace Class { class G { foo(t: X, t2: X) { var x: T; @@ -39,7 +39,7 @@ module Class { var r2 = g2.foo2(c1, c1); } -module Interface { +namespace Interface { interface G { foo(t: X, t2: X): T; } diff --git a/tests/cases/conformance/types/witness/witness.ts b/tests/cases/conformance/types/witness/witness.ts index ab1ea7fe0fa..0c19b422ebf 100644 --- a/tests/cases/conformance/types/witness/witness.ts +++ b/tests/cases/conformance/types/witness/witness.ts @@ -114,7 +114,7 @@ var propAcc1 = { var propAcc1: { m: any; } // Property access of module member -module M2 { +namespace M2 { export var x = M2.x; var y = x; var y: any; diff --git a/tests/cases/fourslash/formatWithBaseIndent.ts b/tests/cases/fourslash/formatWithBaseIndent.ts index 660131996c9..678fe6bdc3c 100644 --- a/tests/cases/fourslash/formatWithBaseIndent.ts +++ b/tests/cases/fourslash/formatWithBaseIndent.ts @@ -136,7 +136,7 @@ format.setFormatOptions(copy); format.document(); verify.currentFileContentIs(` - module classes { + namespace classes { class Bar { constructor() { @@ -156,7 +156,7 @@ verify.currentFileContentIs(` } - module interfaces { + namespace interfaces { interface Foo { x: number; @@ -166,8 +166,8 @@ verify.currentFileContentIs(` } - module nestedModules { - module Foo2 { + namespace nestedModules { + namespace Foo2 { function f() { } var x: number; @@ -175,7 +175,7 @@ verify.currentFileContentIs(` } - module Enums { + namespace Enums { enum Foo3 { val1, val2, diff --git a/tests/cases/projects/NestedLocalModule-WithRecursiveTypecheck/test1.ts b/tests/cases/projects/NestedLocalModule-WithRecursiveTypecheck/test1.ts index 3b51322fb8a..173d5073aff 100644 --- a/tests/cases/projects/NestedLocalModule-WithRecursiveTypecheck/test1.ts +++ b/tests/cases/projects/NestedLocalModule-WithRecursiveTypecheck/test1.ts @@ -1,4 +1,4 @@ -module myModule { +namespace myModule { import foo = require("test2"); diff --git a/tests/cases/projects/PrologueEmit/__extends.ts b/tests/cases/projects/PrologueEmit/__extends.ts index 415bdec20a4..21d21e69861 100644 --- a/tests/cases/projects/PrologueEmit/__extends.ts +++ b/tests/cases/projects/PrologueEmit/__extends.ts @@ -1,5 +1,5 @@ // class inheritance to ensure __extends is emitted -module m { +namespace m { export class base {} export class child extends base {} } \ No newline at end of file diff --git a/tests/cases/projects/Quote'InName/li'b/class'A.ts b/tests/cases/projects/Quote'InName/li'b/class'A.ts index ea29d5448da..ea558861d41 100644 --- a/tests/cases/projects/Quote'InName/li'b/class'A.ts +++ b/tests/cases/projects/Quote'InName/li'b/class'A.ts @@ -1,4 +1,4 @@ -module test { +namespace test { export class ClassA { public method() { } diff --git a/tests/cases/projects/declarations_ExportNamespace/useModule.ts b/tests/cases/projects/declarations_ExportNamespace/useModule.ts index dc297a5a0ae..050a82e0fdb 100644 --- a/tests/cases/projects/declarations_ExportNamespace/useModule.ts +++ b/tests/cases/projects/declarations_ExportNamespace/useModule.ts @@ -1,4 +1,4 @@ -module moduleB { +namespace moduleB { export interface IUseModuleA { a: moduleA.A; } diff --git a/tests/cases/projects/ext-int-ext/internal.ts b/tests/cases/projects/ext-int-ext/internal.ts index 2c932f72212..863538a972e 100644 --- a/tests/cases/projects/ext-int-ext/internal.ts +++ b/tests/cases/projects/ext-int-ext/internal.ts @@ -1,3 +1,3 @@ -module outer { +namespace outer { export var b = "foo"; } \ No newline at end of file diff --git a/tests/cases/projects/ext-int-ext/internal2.ts b/tests/cases/projects/ext-int-ext/internal2.ts index dda289f0e65..73ccea25b83 100644 --- a/tests/cases/projects/ext-int-ext/internal2.ts +++ b/tests/cases/projects/ext-int-ext/internal2.ts @@ -1,4 +1,4 @@ -module outer { +namespace outer { import g = require("external2") export var a = g.square(5); export var b = "foo"; diff --git a/tests/cases/projects/moduleMergeOrder/a.ts b/tests/cases/projects/moduleMergeOrder/a.ts index aa9b2bd6171..1a4d250150b 100644 --- a/tests/cases/projects/moduleMergeOrder/a.ts +++ b/tests/cases/projects/moduleMergeOrder/a.ts @@ -1,4 +1,4 @@ -module Test { +namespace Test { class A { one: string; two: boolean; diff --git a/tests/cases/projects/moduleMergeOrder/b.ts b/tests/cases/projects/moduleMergeOrder/b.ts index d48afa37dbb..5d920a19036 100644 --- a/tests/cases/projects/moduleMergeOrder/b.ts +++ b/tests/cases/projects/moduleMergeOrder/b.ts @@ -1,2 +1,2 @@ -module Test {} +namespace Test {} diff --git a/tests/cases/projects/privacyCheck-ImportInParent/test.ts b/tests/cases/projects/privacyCheck-ImportInParent/test.ts index ae2ca263f8f..a7fc387d1f5 100644 --- a/tests/cases/projects/privacyCheck-ImportInParent/test.ts +++ b/tests/cases/projects/privacyCheck-ImportInParent/test.ts @@ -1,7 +1,7 @@ export module m2 { export import mExported = require("mExported"); - module Internal_M1 { + namespace Internal_M1 { export var c1 = new mExported.me.class1; export function f1() { return new mExported.me.class1(); @@ -40,7 +40,7 @@ export module m2 { } import mNonExported = require("mNonExported"); - module Internal_M3 { + namespace Internal_M3 { export var c3 = new mNonExported.mne.class1; export function f3() { return new mNonExported.mne.class1(); diff --git a/tests/cases/projects/privacyCheck-InsideModule/test.ts b/tests/cases/projects/privacyCheck-InsideModule/test.ts index 872c0306e17..f33c27a10c5 100644 --- a/tests/cases/projects/privacyCheck-InsideModule/test.ts +++ b/tests/cases/projects/privacyCheck-InsideModule/test.ts @@ -1,7 +1,7 @@ export module m1 { } -module m2 { +namespace m2 { export import mExported = require("mExported"); export var c1 = new mExported.me.class1; export function f1() { diff --git a/tests/cases/projects/privacyCheck-InsideModule/testGlo.ts b/tests/cases/projects/privacyCheck-InsideModule/testGlo.ts index 983c3f764ab..3bdba8d570c 100644 --- a/tests/cases/projects/privacyCheck-InsideModule/testGlo.ts +++ b/tests/cases/projects/privacyCheck-InsideModule/testGlo.ts @@ -1,4 +1,4 @@ -module m2 { +namespace m2 { export import mExported = require("mExported"); export var c1 = new mExported.me.class1; export function f1() { diff --git a/tests/cases/projects/reference-1/lib/classA.ts b/tests/cases/projects/reference-1/lib/classA.ts index ea29d5448da..ea558861d41 100644 --- a/tests/cases/projects/reference-1/lib/classA.ts +++ b/tests/cases/projects/reference-1/lib/classA.ts @@ -1,4 +1,4 @@ -module test { +namespace test { export class ClassA { public method() { } diff --git a/tests/cases/projects/reference-1/lib/classB.ts b/tests/cases/projects/reference-1/lib/classB.ts index e95102a3217..c42258cc035 100644 --- a/tests/cases/projects/reference-1/lib/classB.ts +++ b/tests/cases/projects/reference-1/lib/classB.ts @@ -1,6 +1,6 @@ /// -module test { +namespace test { export class ClassB extends ClassA { } diff --git a/tests/cases/projects/reference-path-static/lib.ts b/tests/cases/projects/reference-path-static/lib.ts index 8d0f3d9c69d..5c4584687aa 100644 --- a/tests/cases/projects/reference-path-static/lib.ts +++ b/tests/cases/projects/reference-path-static/lib.ts @@ -1,3 +1,3 @@ -module Lib { +namespace Lib { export class LibType {} }