Skip to content

[api-extractor] Namespace/Module Declaration has {}; at the end #3127

@TanayParikh

Description

@TanayParikh

Summary

In my combined .d.ts file, namespace/module declarations contain a line with {}; at the end (before the closing brace of the namespace/module). This is invalid syntax and produces an error.

Note: I have confirmed the original module/namespace doesn't contain the offending {}; that's present in the rolled up type definition.

Repro steps

Roll-up TS files containing namespaces/modules.

Expected result:

No {}; before end of namespace/module.

Actual result:

image

Details

Standard questions

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

Question Answer
@microsoft/api-extractor version? 7.19.2
Operating system? Linux / Github codespaces
API Extractor scenario? rollups (.d.ts)
Would you consider contributing a PR?
TypeScript compiler version? 4.5.4
Node.js version (node -v)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    AE/AD

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions