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

Need to rebuild & republish to npm to get type from nestjs/common. Typescript 5 @InjectModel raises: Argument of type 'undefined' is not assignable to parameter of type 'string | symbol'.ts #1239

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

Comments

@msimon
Copy link

msimon commented Apr 4, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Re-opening this issue as the previous one got closed and locked: #1237

The problem is not that my nestjs/common is outdated locally, is that the code in the nestjs/sequelize in npm was not built against the new nest/common. Hence the type inference for the injectModel function is based on the previous version of common, and therefore does not have the added | undefined required.

Looking at the code here: https://www.npmjs.com/package/@nestjs/sequelize?activeTab=code
@nestjs:sequelize - npm 2023-04-04 14-03-20

  • The file /@nestjs/sequelize/dist/common/sequelize.decorators.d.ts is missing the undefined
  • If I download the nest/squelize github project and build, the sequelize.decorators.d.ts is properly inferred against the last nestjs/common
  • The project needs to be rebuilt and published to npm again.

Minimum reproduction code

N/a

Steps to reproduce

N/A

Expected behavior

N/A

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

My nestJs common is at 9.3.12 (latest version to date)

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

Great catch! Thank you @msimon

Fixed in 9.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants