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

Nested typeof operators lead to incorrect isolatedDeclerations emit #8474

Closed
ericrafalovsky opened this issue Jan 14, 2025 · 1 comment · Fixed by #8476
Closed

Nested typeof operators lead to incorrect isolatedDeclerations emit #8474

ericrafalovsky opened this issue Jan 14, 2025 · 1 comment · Fixed by #8476
Assignees
Labels
A-isolated-declarations Isolated Declarations C-bug Category - Bug

Comments

@ericrafalovsky
Copy link

Nested typeof operators appear to lead to incorrect isolatedDeclerations emit

Source code:

import { CoreModule } from "library/core/module";
import { MixinFunction } from "library/core/mixin";

export const BaseFeature: ReturnType<
    typeof MixinFunction<typeof CoreModule>
> = MixinFunction(a);

Expected:

import { CoreModule } from "library/core/module";
import { MixinFunction } from "library/core/mixin";
export declare const BaseFeature: ReturnType<typeof MixinFunction<typeof CoreModule>>;

Actual:

import { MixinFunction } from "library/core/mixin";
export declare const BaseFeature: ReturnType<typeof MixinFunction<typeof CoreModule>>;

Note the missing CoreModule import, resulting in an invalid .d.ts file


Thanks for your awesome work on this library! ❤️

@Dunqing
Copy link
Member

Dunqing commented Jan 14, 2025

Thank you for trying oxc-isolated-declarations in your project and reporting issues to help us improve it!

Boshen pushed a commit that referenced this issue Jan 14, 2025
…inding is referenced in nested `typeof` (#8476)

close: #8474
@Dunqing Dunqing closed this as completed Jan 14, 2025
@Dunqing Dunqing reopened this Jan 14, 2025
@Dunqing Dunqing closed this as completed Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-isolated-declarations Isolated Declarations C-bug Category - Bug
Projects
None yet
2 participants