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

[api-extractor] export default of tagged API members are not correctly trimmed from API report variants #4775

Open
Josmithr opened this issue Jun 11, 2024 · 2 comments
Labels
bug Something isn't working as intended effort: easy Probably a quick fix. Want to contribute? :-) help wanted If you're looking to contribute, this issue is a good place to start! repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem

Comments

@Josmithr
Copy link
Contributor

Summary

Given an export pattern like the following:

/** @beta */
export interface Foo { ... }

export default Foo;

The expectation is that Foo exports would only appear in API report variants beta and alpha, but they incorrectly appear in all report variants like the following:

export { Foo }
export default Foo;

I have published a draft PR (#4774) that illustrates the issue by updating test assets.

@Josmithr
Copy link
Contributor Author

@octogonz I'm happy to contribute a fix here, but I'll need some guidance on where to get started.

This seems to be specific to cases where an existing export is also exported via export default. E.g.,

/** @beta */
export interface Foo { ... }
export default Foo;

I was not able to repro it when the declaration is inline with the default export. E.g.,

export default interface Foo { ... };

@iclanton iclanton moved this to Needs triage in Bug Triage Jun 12, 2024
@octogonz
Copy link
Collaborator

octogonz commented Sep 5, 2024

Discussed on 9/5/2024: We think the trimming probably does work correctly for the DtsRollupGenerator, so we just need apply that same logic to the ApiReportGenerator. Therefore I'm guessing it's a relatively easy PR

@octogonz octogonz added bug Something isn't working as intended help wanted If you're looking to contribute, this issue is a good place to start! effort: easy Probably a quick fix. Want to contribute? :-) repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem labels Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended effort: easy Probably a quick fix. Want to contribute? :-) help wanted If you're looking to contribute, this issue is a good place to start! repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem
Projects
Status: Needs triage
Development

No branches or pull requests

2 participants