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

bug: experimentalDts generates .d.ts with syntax errors #1153

Open
maxpatiiuk opened this issue Jul 10, 2024 · 0 comments
Open

bug: experimentalDts generates .d.ts with syntax errors #1153

maxpatiiuk opened this issue Jul 10, 2024 · 0 comments

Comments

@maxpatiiuk
Copy link

maxpatiiuk commented Jul 10, 2024

This might be a @microsoft/api-extractor bug, but not sure so opening it here first.

Given this source code:

type A = '';
export declare namespace h {
  export type { A as B };
}
export const a: A = '';

The output dist/_tsup-dts-rollup.d.ts contains a syntax error:

export declare namespace h {
    export declare type { A as B };
}

should instead be:

export declare namespace h {
    export type { A as B };
}

Repository with a minimal reproduction

(note I am using namespaces because I need to provide jsx runtime typings)

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant