Skip to content

Cannot export { ... } interface when --isolatedModules is passed #32662

@rickbutton

Description

@rickbutton

TypeScript Version: 3.5.3

Search Terms: isolatedModules re-export

Code

interface MyInterface {}
export {
    MyInterface
}

Expected behavior:

This should compile regardless of whether --isolatedModules is passed.

OR the error message could indicate that this is not an accepted way to export an interface in an isolated module. (#28481)

Actual behavior:

This fails to compile with the error message:

Cannot re-export a type when the '--isolatedModules' flag is provided.ts(1205)

when --isolatedModules is passed.

Related Issues: #28481

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions