Closed aminmc closed 5 years ago
Versions
Hello I'm trying to access the transaction function from Sequelize but I get the following exception:
TSError: ⨯ Unable to compile TypeScript: test/model/Form.spec.ts(10,19): error TS2339: Property 'transaction' does not exist on type 'Sequelize'.
The following shows my set up.
import {Sequelize} from "sequelize-typescript"; const sequelize = new Sequelize({ name: db, username: 'root', password: '', }); sequelize.addModels([ModelA, ModelB);
Is there any additional dependencies I need to install?
Any help would be appreciated.
@aminmc thanks for asking. sequelize@5 only works with sequelize-typescript@next. Hope this helps!
Thank you for your quick reply! Will use the appropriate versions. Thanks
Versions
Hello I'm trying to access the transaction function from Sequelize but I get the following exception:
TSError: ⨯ Unable to compile TypeScript: test/model/Form.spec.ts(10,19): error TS2339: Property 'transaction' does not exist on type 'Sequelize'.
The following shows my set up.
Is there any additional dependencies I need to install?
Any help would be appreciated.