Fix TypeScript definitions and add tests to test them#21
Fix TypeScript definitions and add tests to test them#21kriszyp merged 2 commits intokriszyp:masterfrom
Conversation
To run them, use: `npm run test:types`
|
Thank you for the types tests. However, I am getting errors when trying to run the types tests: It seems like it may be tripped up by the import, and I have tried removing it (and changing to node/events), but then it complains that index.d.ts isn't a module. I was wondering if you have a higher level tsconfig.json that you are using to configure these modules? |
|
Hmm that's odd. No I don't have a According to the docs for Could you possibly try to re-install your node-modules and try again? Maybe you have an old version of |
|
I changed the declaration block from a |
|
Tested with v0.9.0 and it looks like it works 👍 Thanks |
Using this module in a project that uses
@types/nodetogether with Node.js 13 or newer, will generate this error:This PR fixes that bug and adds test to ensure that the types are valid.
The types are tested using the tsd tool and you can run them locally using:
Additionally I took the liberty to run them automatically after
npm testso that they will be part of this projects CI - I hope you don't mind 😊