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 @InjectModel raises: Argument of type 'undefined' is not assignable to parameter of type 'string | symbol'.ts #1237

Closed
2 of 4 tasks
msimon opened this issue Apr 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@msimon
Copy link

msimon commented Apr 3, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

With typescript 5, Any @InjectModel has the following error attached to it:

Unable to resolve signature of parameter decorator when called as an expression.
Argument of type 'undefined' is not assignable to parameter of type 'string | symbol'.ts(1239)

"@nestjs/sequelize": "^9.0.0" > sequelize.decorators.d.ts still has the following:

export declare const InjectModel: (entity: Function, connection?: string) => (target: object, key: string | symbol, index?: number | undefined) => void;

I may need to be re-compiled using the latest nestjs/common and re-deploy to npm, to get this bugfix in: nestjs/nest#10970

Minimum reproduction code

N/a

Steps to reproduce

N/A

Expected behavior

No error

Package version

9.0.0

NestJS version

9.3.12

Node.js version

16.14

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@msimon msimon added the bug Something isn't working label Apr 3, 2023
@kamilmysliwiec
Copy link
Member

Update @nestjs/common to the latest version

@nestjs nestjs locked and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants