Skip to content

[api-extractor] Will strip declare var content after rollup types #5146

Open
@qmhc

Description

@qmhc

Summary

https://stackblitz.com/edit/vitejs-vite-ldof7q7z?file=package.json

Repro steps

Run pnpm run build, then check the declaration file under dist.

Expected result: No type error.

Actual result: Get an error Cannot find name 'obj'.

Details

Will be correct if change var to let.

Standard questions

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

Question Answer
@microsoft/api-extractor version? 7.51.1
Operating system? Linux
API Extractor scenario? rollups
Would you consider contributing a PR? No
TypeScript compiler version? 5.7.2
Node.js version (node -v)? 18.20.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions