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

Compiler error with typescript@4.8.4, sequelize@6.23.2, sequelize-typescript@2.1.3 #1441

Closed
spinlud opened this issue Oct 1, 2022 · 4 comments · Fixed by #1453
Closed

Compiler error with typescript@4.8.4, sequelize@6.23.2, sequelize-typescript@2.1.3 #1441

spinlud opened this issue Oct 1, 2022 · 4 comments · Fixed by #1453

Comments

@spinlud
Copy link

spinlud commented Oct 1, 2022

Getting compiler error with latest versions of typescript, sequelize and sequelize-typescript:

typescript: 4.8.4
sequelize: 6.23.2
sequelize-typescript: 2.1.3

node_modules/sequelize-typescript/dist/model/model/model.d.ts:7:131 - error TS2344: Type 'TModelAttributes' does not satisfy the constraint '{}'.

7 export declare type ModelType<TCreationAttributes, TModelAttributes> = new (values?: TCreationAttributes, options?: any) => Model<TModelAttributes, TCreationAttributes>;
                                                                                                                                    ~~~~~~~~~~~~~~~~

  node_modules/sequelize-typescript/dist/model/model/model.d.ts:7:52
    7 export declare type ModelType<TCreationAttributes, TModelAttributes> = new (values?: TCreationAttributes, options?: any) => Model<TModelAttributes, TCreationAttributes>;
                                                         ~~~~~~~~~~~~~~~~
    This type parameter might need an `extends {}` constraint.

Found 1 error in node_modules/sequelize-typescript/dist/model/model/model.d.ts:7
@BaschtianXD
Copy link

I got the same error. Same versions of the mentioned dependencies.

@LuckyMutt
Copy link

Same for me currently.

@WikiRik
Copy link
Member

WikiRik commented Oct 12, 2022

The fix will be included in the next release

@WikiRik
Copy link
Member

WikiRik commented Oct 16, 2022

Released in 2.1.4

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

Successfully merging a pull request may close this issue.

4 participants