Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript 5.0 Support of tighter parameter decorator checking #221

Closed
samesfahani-tuplehealth opened this issue Feb 2, 2023 · 2 comments · Fixed by #226
Closed

TypeScript 5.0 Support of tighter parameter decorator checking #221

samesfahani-tuplehealth opened this issue Feb 2, 2023 · 2 comments · Fixed by #226
Assignees

Comments

@samesfahani-tuplehealth
Copy link

Describe the bug

The issue: microsoft/TypeScript#52435

In TS 5.0, you will get that error when using any @inject since we should allow undefined for constructor parameter decorating.

Expected behavior

): (target: any, propertyKey: string | symbol, parameterIndex: number) => any {

The type of propertyKey should be propertyKey: string | symbol | undefined. NestJS has already made their fix here: nestjs/nest#10970

Version:
^4.5.0

@mildronize
Copy link

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.

CleanShot 2566-03-17 at 12 39 42@2x

@shankiflang
Copy link

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.

CleanShot 2566-03-17 at 12 39 42@2x

Same problem for me !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants