Skip to content

error TS2303: Circular definition of import alias 'default'. #3018

Closed
@panuhorsmalahti

Description

@panuhorsmalahti

Hi, I'm switching to ES6 modules. The type definition below worked fine in 1.5.0-alpha, but gives an error in 1.5.0-beta

declare var io: SocketIOClientStatic;

declare module 'socket.io-client' {
    export default io;
}

It seems that error TS2303: Circular definition of import alias 'default' is always given when the export default is a variable. At least the error message is misleading. The earlier form 'export = io' is not allowed in ES6 output mode.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions