-
-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
Description
Reproduction link or steps
https://stackblitz.com/edit/github-gkzydqgy?file=src%2Findex.ts
What is expected?
When using as
to import something and re-export in a namespace:
import type {
Socket as ClientSocket,
Manager as ClientManager,
} from 'socket.io-client';
export namespace Hello {
export type Socket = ClientSocket;
export type Manager = ClientManager;
}
The output .d.ts
:
import { Manager, Socket } from "socket.io-client";
//#region src/index.d.ts
declare namespace Hello {
// ❌ It not correct! There is a circular type!
type Socket = Socket;
type Manager = Manager;
}
//#endregion
export { Hello };

The correct output like this:
import { Manager as ClientManager, Socket as ClientSocket } from "socket.io-client";
//#region src/index.d.ts
declare namespace Hello {
type Socket = ClientSocket;
type Manager = ClientManager;
}
//#endregion
export { Hello };
What is actually happening?
Any additional comments?
不要讨厌我的工地英语🥹please(