async-redis
async-redis copied to clipboard
Typescript compiler imports index.d.ts instead of index.js
Hi!
Thanks for a great module! :blush:
Since version 2.0.0 async-redis is no longer working with typescript. it seems like tsc is loading src/index.d.ts file instead of src/index.js.
Reproducible steps:
- create a new project
- create index.ts
- install async-redis
- write this line of code:
import { createClient } from 'async-redis'; - compile index.ts:
tsc index.ts
I am using typescript 4.3.2 version.
Also need this
Seems like the types that are shipped with the packages are missing a lot of essential type declarations. Only way I got it to work for now (I know it's ugly) is to install the @types/async-redis package and add a post-install hook to my package.json scripts that removes the types that are shipped with the package (like so "postinstall": "rimraf ./node_modules/async-redis/src/index.d.ts"). This way the types from @types/async-redis are loaded instead, which at least makes it workable in a TS project.
Even with @types/async-redis not working for me:
But I'm transpiling javascript code with tsc
Any update on this?
This is biting us now and is quite frustrating. Any updates?
Is this project still alive? Any forks going on?