Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript compiler imports index.d.ts instead of index.js #59

Open
Vaidaz opened this issue Jun 14, 2021 · 6 comments
Open

Typescript compiler imports index.d.ts instead of index.js #59

Vaidaz opened this issue Jun 14, 2021 · 6 comments

Comments

@Vaidaz
Copy link

Vaidaz commented Jun 14, 2021

Hi!

Thanks for a great module! 馃槉

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:

  1. create a new project
  2. create index.ts
  3. install async-redis
  4. write this line of code: import { createClient } from 'async-redis';
  5. compile index.ts: tsc index.ts

I am using typescript 4.3.2 version.

@amitozalvo
Copy link

Also need this

@joeldn
Copy link

joeldn commented Sep 28, 2021

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.

@tamis-laan
Copy link

tamis-laan commented Nov 28, 2021

Even with @types/async-redis not working for me:
screenshot
But I'm transpiling javascript code with tsc

@slaveofcode
Copy link

Any update on this?

@jamesopti
Copy link

This is biting us now and is quite frustrating. Any updates?

@dylanh724
Copy link

Is this project still alive? Any forks going on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants