A code like this:
import { Foo as Foo1 } from "./foo"
export namespace bar {
export type Foo = Foo1
}
generates invalid d.ts:
type Foo = string;
declare namespace bar {
type Foo = Foo; // Type alias 'Foo' circularly references itself. ts(2456)
}
export { bar };
Reproduction: https://stackblitz.com/edit/node-497knk
Run tsup bar.ts --dts
and examine dist/bar.d.ts
.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too