10.2 Namespace Body

The body of a namespace corresponds to a function that is executed once to initialize the namespace instance.

  NamespaceBody:   NamespaceElementsopt

  NamespaceElements:   NamespaceElement   NamespaceElementsNamespaceElement

  NamespaceElement:   Statement   LexicalDeclaration   FunctionDeclaration   GeneratorDeclaration   ClassDeclaration   InterfaceDeclaration   TypeAliasDeclaration   EnumDeclaration   NamespaceDeclaration   AmbientDeclaration   ImportAliasDeclaration   ExportNamespaceElement

  ExportNamespaceElement:   exportVariableStatement   exportLexicalDeclaration   exportFunctionDeclaration   exportGeneratorDeclaration   exportClassDeclaration   exportInterfaceDeclaration   exportTypeAliasDeclaration   exportEnumDeclaration   exportNamespaceDeclaration   exportAmbientDeclaration   exportImportAliasDeclaration