Typescript: function returning string | {}?
Why the get return type is string | {} ?
@cesco69 can you provide more details about your environment, ts version, node version, node-redis version, etc..
Hi, I have tried to make a replicable example, but with only node-redis it works, probably it is a third party dependencies...
Ok, closing this for now then
If anyone stumbles upon this in the future, I had the same problem which I narrowed down to tsconfig. I needed to set strict true in order to make this error go away.
FYI @cesco69 @nkaradzhov
// 关闭严格的空值检查(允许 null/undefined 赋值给非空类型,降低开发门槛;严谨项目可设为 true) "strictNullChecks": true,