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] .api.md files don't contain generated namespaces #2798

Open
bgotink opened this issue Jul 8, 2021 · 0 comments
Open

[api-extractor] .api.md files don't contain generated namespaces #2798

bgotink opened this issue Jul 8, 2021 · 0 comments

Comments

@bgotink
Copy link
Contributor

bgotink commented Jul 8, 2021

Summary

#1029 introduced support for import * as __ from __ syntax, using namespaces. These namespaces are present in the rolled up .d.ts file, but they are absent (with a warning) in the corresponding .api.md file.

Repro steps

Check out https://github.com/bgotink/api-extractor-repro-20210708, run yarn to install dependencies and yarn api-extractor run to generate the files.

Expected result:

API markdown contains namespaces i1 and i2 that were generated

// from the dist/ .d.ts file

declare namespace i1 {
    export {
        LoremDirective
    }
}

declare namespace i2 {
    export {
        IpsumDirective
    }
}

Actual result:

API markdown doesn't have these namespaces and it contains warnings:

// @public (undocumented)
export class LoremIpsumModule {
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<LoremIpsumModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<LoremIpsumModule>;
    // Warning: (ae-forgotten-export) The symbol "i1" needs to be exported by the entry point index.d.ts
    // Warning: (ae-forgotten-export) The symbol "i2" needs to be exported by the entry point index.d.ts
    //
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<LoremIpsumModule, [typeof i1.LoremDirective, typeof i2.IpsumValidator]>;
}

Details

Standard questions

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

Question Answer
@microsoft/api-extractor version? 7.18.0
Operating system? Mac
API Extractor scenario? reporting (.api.md)
Would you consider contributing a PR? Yes
TypeScript compiler version? 4.3.5
Node.js version (node -v)? v14.15.3
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