microlinkhq / async-ratelimiter

Rate limit made simple, easy, async.
MIT License
320 stars 23 forks source link

TypeScript CompileError #16

Closed kastnerorz closed 5 years ago

kastnerorz commented 5 years ago

Error:

error TS1192: Module "xxx/@types/ioredis/index" has no default export.

Environment:

Node: v10.6.0
npm: v6.4.1
TypeScript: v3.4.1

Fix:

// index.d.ts

import Redis from 'ioredis';  //change to below
import * as Redis from 'ioredis';
kastnerorz commented 5 years ago

It seems that the tsconfig.json file didn't have the key allowSyntheticDefaultImports set for true, now it's fixed. 😛