You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a polyfill and I have the following global declaration in my src/index.ts:
declare global {interfaceJSON{parse<Type=any>(text: string,reviver?: ReviverFunc): Type;}}
It augments the JSON interface by extending the parse function signature. This declaration is getting effectively emitted to the index.d.ts generated by tsc. However, the API Extractor removes it from the resulting index.d.ts for some reason.
Repro steps
Expected result:
The declare global declaration should be added to the resulting index.d.ts file.
Actual result:
The declare global declaration is not added to the resulting index.d.ts file.
Details
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Question
Answer
@microsoft/api-extractor version?
7.33.7
Operating system?
Ubuntu Linux
API Extractor scenario?
rollups (.d.ts)
Would you consider contributing a PR?
No
TypeScript compiler version?
4.9.4
Node.js version (node -v)?
18.12.1
The text was updated successfully, but these errors were encountered:
Summary
Hello!
I'm working on a polyfill and I have the following global declaration in my
src/index.ts
:It augments the
JSON
interface by extending theparse
function signature. This declaration is getting effectively emitted to theindex.d.ts
generated bytsc
. However, the API Extractor removes it from the resultingindex.d.ts
for some reason.Repro steps
Expected result:
The
declare global
declaration should be added to the resultingindex.d.ts
file.Actual result:
The
declare global
declaration is not added to the resultingindex.d.ts
file.Details
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?7.33.7
Ubuntu Linux
4.9.4
node -v
)?18.12.1
The text was updated successfully, but these errors were encountered: