ioredis-mock icon indicating copy to clipboard operation
ioredis-mock copied to clipboard

feat: Added Typescript definition file.

Open notaphplover opened this issue 4 years ago • 8 comments

Added Typescript definition file. Updated package.json in order to notify Typescript where the types of the module are.

notaphplover avatar Aug 26 '19 14:08 notaphplover

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.

codeclimate[bot] avatar Aug 26 '19 14:08 codeclimate[bot]

I saw one project that started doing it this way: https://github.com/testing-library/react-testing-library/blob/89d11b08c61f3cf5af770c61a03d564b3fdc301c/package.json#L50

stipsan avatar Oct 07 '19 10:10 stipsan

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)

notaphplover avatar Oct 07 '19 10:10 notaphplover

any news on this PR or @types library ?

jogelin avatar Jan 22 '20 17:01 jogelin

any news on this PR or @types library ?

Sry guys, I've been so busy :(, I'll do it this weekend

notaphplover avatar Feb 05 '20 08:02 notaphplover

@jogelin Thank you for the reminder, I really forgot this PR

notaphplover avatar Feb 05 '20 08:02 notaphplover

Is there any update on this PR or types for this in DefinitelyTyped?

squareloop1 avatar Oct 27 '20 11:10 squareloop1

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.

stipsan avatar Oct 28 '20 19:10 stipsan

(Add some info, just found https://www.npmjs.com/package/@types/ioredis-mock which works well for me 😃)

hongbo-miao avatar Nov 12 '22 01:11 hongbo-miao

Use https://www.npmjs.com/package/@types/ioredis-mock for now

stipsan avatar Jan 29 '23 11:01 stipsan