mmkal / handy-redis

A wrapper around node_redis with Promise and TypeScript support.
Apache License 2.0
172 stars 10 forks source link

Fix type declarations for typescript <4 #251

Closed mmkal closed 3 years ago

mmkal commented 3 years ago

Fixes #250

ts-ignore isn't included in d.ts files, so typescript versions that don't support rest elements. This works around by using sed to re-add the // @ts-ignore directive. Probably a better solution would be to use typesVersions, but as far as I can tell that would mean compiling two completely different versions of the types, which seems like overkill for this one small utility that can just use a conditional.