ioredis-mock
ioredis-mock copied to clipboard
feat: Added Typescript definition file.
Added Typescript definition file. Updated package.json in order to notify Typescript where the types of the module are.
Code Climate has analyzed commit cf8f017d and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 100.0% (80% is the threshold).
This pull request will bring the total coverage in the repository to 98.7% (0.0% change).
View more on Code Climate.
I saw one project that started doing it this way: https://github.com/testing-library/react-testing-library/blob/89d11b08c61f3cf5af770c61a03d564b3fdc301c/package.json#L50
Since library definitions that get out of sync can be very painful I think we should consider publishing it on DefinitelyTyped instead of maintaining it on here. We can then add a
@types/ioredis-mock
dependency here so that for TS users you get somewhat the same experience, but fixes to the definitions can be done faster, and if something is wrong it's easier to ignore the@types/ioredis-mock
definitions and just fallback to any. What do you think? 😄
I think it's the best approach, let's do it 😃 (I'll start the process as soon as I can)
any news on this PR or @types library ?
any news on this PR or @types library ?
Sry guys, I've been so busy :(, I'll do it this weekend
@jogelin Thank you for the reminder, I really forgot this PR
Is there any update on this PR or types for this in DefinitelyTyped?
Hi @squareloop1, not really. We'll most likely rewrite this repo to be written in TS and generate the type defs during build. I don't have any timeframe for that though.
(Add some info, just found https://www.npmjs.com/package/@types/ioredis-mock which works well for me 😃)
Use https://www.npmjs.com/package/@types/ioredis-mock for now