Define a more generic callback type that returns `unknown` instead of `void`
The package has implicit type for `get`, `all`, etc.
The type of `get` is inferred as:
```ts
(method) RedisStore.get(sid: string, cb?: (_err?: unknown, _data?: any) => void): Promise<void>
```
Whereas based on the implementation the `get` can be awaited and a value can be returned.
A better approach would've been to use generics, but for now a simple change to `unknown` from `void` is more than acceptable.
合并状态:未合并 关闭于 2025-05-09 3 条评论