diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..aa05d1d --- /dev/null +++ b/index.d.ts @@ -0,0 +1,4 @@ +import { RedisClientType } from 'redis'; + +declare function redisLock(client: RedisClientType, retryDelay?: number): (lockName: string, timeout?: number) => Promise; +export = redisLock; diff --git a/package.json b/package.json index cddc1af..564820f 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "url": "git://github.com/errorception/redis-lock.git" }, "main": "index.js", + "types": "index.d.ts", "engines": { "node": ">=12" },