Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isolatedDeclaration: dropping types used in declare module blocks #5667

Closed
yyx990803 opened this issue Sep 10, 2024 · 0 comments · Fixed by #5680
Closed

isolatedDeclaration: dropping types used in declare module blocks #5667

yyx990803 opened this issue Sep 10, 2024 · 0 comments · Fixed by #5680
Assignees
Labels
C-bug Category - Bug

Comments

@yyx990803
Copy link

yyx990803 commented Sep 10, 2024

When using isolatedDeclaration transform:

In:

import { type X } from './x'

type Y = 1

declare module "foo" {
  interface Foo {
    x: X
    y: Y
  }
}

Out (see that import of X and declaration of Y are both incorrectly removed):

declare module "foo" {
	interface Foo {
		x: X;
		y: Y;
	}
}
export {};
@yyx990803 yyx990803 added the C-bug Category - Bug label Sep 10, 2024
@yyx990803 yyx990803 changed the title transformer: isolatedDeclaration dropping imports used in declare module blocks transformer: isolatedDeclaration dropping types used in declare module blocks Sep 10, 2024
@Dunqing Dunqing self-assigned this Sep 10, 2024
@Dunqing Dunqing changed the title transformer: isolatedDeclaration dropping types used in declare module blocks isolatedDeclaration: dropping types used in declare module blocks Sep 10, 2024
Boshen pushed a commit that referenced this issue Sep 10, 2024
@Dunqing Dunqing closed this as completed Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
2 participants