Closed suejon closed 6 months ago
The generated index.d.ts after running npm run gen:config seems to nest a declare inside another declare scope which the typescript compiler plains about with this message: node_modules/bing-translate-api/index.d.ts(247,3): error TS1038: A 'declare' modifier cannot be used in an already ambient context.. https://github.com/microsoft/TypeScript/blob/42bb138173e3b3869b6a6f68d277c7172387a4cf/src/compiler/diagnosticMessages.json#L114-L117
index.d.ts
npm run gen:config
declare
node_modules/bing-translate-api/index.d.ts(247,3): error TS1038: A 'declare' modifier cannot be used in an already ambient context..
This points to an issue inside the generate-config.js. But you might have a better idea of what is happening here.
generate-config.js
My mistake, the fix needed to happen inside index.tpl.d.ts, not index.d.ts
index.tpl.d.ts
Thanks for your contribution!
The generated
index.d.ts
after runningnpm run gen:config
seems to nest adeclare
inside anotherdeclare
scope which the typescript compiler plains about with this message:node_modules/bing-translate-api/index.d.ts(247,3): error TS1038: A 'declare' modifier cannot be used in an already ambient context..
https://github.com/microsoft/TypeScript/blob/42bb138173e3b3869b6a6f68d277c7172387a4cf/src/compiler/diagnosticMessages.json#L114-L117This points to an issue inside the
generate-config.js
. But you might have a better idea of what is happening here.