Solvedsequelize typescript Sequelize v5.13.0 not supported


  • sequelize: 5.13.0
  • sequelize-typescript: 1.0.0-beta.3
  • typescript: 3.5.3

I'm submitting a ...

[ x] bug report
[ ] feature request

Actual behavior:

Unable to build project. See below for tsc output...

node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.d.ts:12:5 - error TS2416: Property 'model' in type 'Sequelize' is not assignable to the same property in base type 'Sequelize'.
  Type '(model: string | typeof Model) => typeof Model' is not assignable to type '(modelName: string) => ModelCtor<Model<any, any>>'.
    Type 'typeof Model' is not assignable to type 'ModelCtor<Model<any, any>>'.
      Type 'typeof Model' is not assignable to type 'new () => Model<any, any>'.
        Cannot assign an abstract constructor type to a non-abstract constructor type.

12     model(model: string | typeof Model): typeof Model;

Expected behavior:

I assume this should work. The documentation says sequelize v5 is supported. I have reverted back to sequelize v5.12.3 and all seems happy.

Steps to reproduce:

Upgrade to sequelize v5.13.0 and try to build.

13 Answers

✔️Accepted Answer

Hey @justinlottes, thanks for reporting. Just published a new beta version. (sequelize-typescript@1.0.0-beta.4 or sequelize-typescript@next). Can you confirm that its working with this one?

Other Answers:

It's 23/08/2020 for now I don't have problems with:

"sequelize": "^5.22.3",
"sequelize-typescript": "^1.0.0-beta.4"

More Issues: