Skip to content

Re-exporting namespace declarations in ES6 ambient declaration #4336

Open
@jbrantly

Description

@jbrantly

Right now many declaration files take this form:

declare namespace MyLib {

}

declare module 'myLib' {
  export = MyLib;
}

However, there doesn't seem to be an equivalent for ES6 modules:

declare module 'myLib' {
  export default MyLib; // this works for exporting the default, but other exported items in MyLib are not considered to be named exports of the ES6 module
  export * from MyLib; // this is essentially what I'm trying to accomplish
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions