Closed micalevisk closed 2 years ago
Here:
https://github.com/nest-modules/ioredis/blob/155a77249a95bcee84b8e87ea101e8588d4e93cb/lib/redis.decorators.ts#L4
connection is optional, thus connection could be undefined.
connection
undefined
But here:
https://github.com/nest-modules/ioredis/blob/155a77249a95bcee84b8e87ea101e8588d4e93cb/lib/redis.utils.ts#L13
and here:
https://github.com/nest-modules/ioredis/blob/155a77249a95bcee84b8e87ea101e8588d4e93cb/lib/redis.utils.ts#L9
it's not
Thus, although we can use @InjectRedis(), we can't call getRedisConnectionToken() (when "strictNullChecks": true)
@InjectRedis()
getRedisConnectionToken()
"strictNullChecks": true
DONE
Here:
https://github.com/nest-modules/ioredis/blob/155a77249a95bcee84b8e87ea101e8588d4e93cb/lib/redis.decorators.ts#L4
connection
is optional, thusconnection
could beundefined
.But here:
https://github.com/nest-modules/ioredis/blob/155a77249a95bcee84b8e87ea101e8588d4e93cb/lib/redis.utils.ts#L13
and here:
https://github.com/nest-modules/ioredis/blob/155a77249a95bcee84b8e87ea101e8588d4e93cb/lib/redis.utils.ts#L9
it's not
Thus, although we can use
@InjectRedis()
, we can't callgetRedisConnectionToken()
(when"strictNullChecks": true
)