Closed samesfahani-tuplehealth closed 1 year ago
I've also found the issue with the Params Decorator Type in tsyringe, while Inversify hasn't encountered any issues yet.
Even though "experimentalDecorators": true has been enabled, there are still issues with backward compatibility for Decorators Type.
I've also found the issue with the Params Decorator Type in tsyringe, while Inversify hasn't encountered any issues yet.
Even though "experimentalDecorators": true has been enabled, there are still issues with backward compatibility for Decorators Type.
Same problem for me !
Describe the bug
The issue: https://github.com/microsoft/TypeScript/issues/52435
In TS 5.0, you will get that error when using any
@inject
since we should allowundefined
for constructor parameter decorating.Expected behavior
https://github.com/microsoft/tsyringe/blob/f738999f3058b223bdb81dada0164a358db2460e/src/decorators/inject.ts#L11
The type of
propertyKey
should bepropertyKey: string | symbol | undefined
. NestJS has already made their fix here: https://github.com/nestjs/nest/pull/10970Version: ^4.5.0