Closed katzdave closed 7 years ago
Hi, How to reproduce?
$ ./node_modules/typescript/bin/tsc ./typescript_examples/text_request.ts # no errors
$ ./node_modules/typescript/bin/tsc --v
Version 2.1.6
Ah, this seems to only be an issue for me when the package is referenced as a dependency.
I forked to reproduce. https://github.com/katzdave/api-ai-node-js https://github.com/katzdave/api-ai-node-js/commit/bb5443e4f7bc33479640831cec6c4a6ed1e0f7ee
npm install tsc typescript_examples/text_request.ts node_modules/apiai/index.d.ts(25,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
FWIW I get a different error with TypeScript 2.2.1:
node_modules/apiai/index.d.ts(24,16): error TS2649: Cannot augment module 'apiai' with value exports because it resolves to a non-module entity.
@katzdave WTF? You add "apiai" as dependency to "apiai" project? I don't understand what you mean...
I have made example https://github.com/sstepashka/apiai-node-js-example and I've updated library to 4.0.1 version. please update library and try to check for error.
@danvk your error should be fixed with update.
I had it as a dependency in another project, I just forked that one so you could clone and reproduce the error easily.
4.0.1 fixes my issue too, thanks!
With typescript version 2.1.6:
node_modules/apiai/index.d.ts(25,5): error TS2666: Exports and export assignments are not permitted in module augmentations.