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] Empty declaration in API report for unexported element #2808

Open
hiranya911 opened this issue Jul 13, 2021 · 0 comments
Open

Comments

@hiranya911
Copy link
Contributor

Summary

We have an unexported interface declaration in one of our namespaces:

export namespace foo {
  interface Bar {
    name: string;
  }

  export interface BarEx extends Bar {
    score: number;
  }
}

This results in the following API report:

// @public (undocumented)
export namespace foo {
    // (undocumented)
    export interface Bar {
        // (undocumented)
        name: string;
    }
    // (undocumented)
    export interface BarEx extends Bar {
        // (undocumented)
        score: number;
    }
        {};
}

Notice the empty {}; line at the end. Exporting the interface Bar makes it go away.

Repro steps

See above.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? v7.18.x
Operating system? Mac / Linux
API Extractor scenario? reporting (.api.md)
TypeScript compiler version? 3.9.6
Node.js version (node -v)? v10 and up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: AE/AD
Development

No branches or pull requests

1 participant