Sequelize-typescript: @canary version does not work well with sequelize v5

Created on 13 Feb 2019  路  6Comments  路  Source: RobinBuschmann/sequelize-typescript

errors

node_modules/sequelize-typescript/dist/associations/belongs-to-many/belongs-to-many-association-options.d.ts:1:10 - error TS2305: Module'"../node_modules/sequelize/types"' has no exported member 'AssociationOptionsManyToMany'.

1 import { AssociationForeignKeyOptions, AssociationOptionsManyToMany } from "sequelize";
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.d.ts:8:3 - error TS2305: Module '"../node_modules/sequelize/types"' has no exported member 'DataTypeBigInt'.

8   DataTypeBigInt,
    ~~~~~~~~~~~~~~
...

node_modules/sequelize-typescript/dist/sequelize/sequelize/sequelize.d.ts:289:21 - error TS2304: Cannot find name 'col'.

289   col(col: string): col;
                        ~~~
...
...

dependencies

{
    "sequelize": "^5.0.0-beta.16",
    "sequelize-typescript": "^1.0.0-alpha.7"
}

Most helpful comment

Released [email protected]/sequelize-typescript@canary now, which should work with [email protected]

All 6 comments

Hey @Acathur, this is because sequelize@5 provides its own typings. these typings are loaded prior to the typings from @types/sequelize, which are the ones sequelize-typescript relies on. There is already an issue for this: #529

@RobinBuschmann I got it, so what I can do is wait for the new release?

@Acathur Exactly, but I'm already working on it

Released [email protected]/sequelize-typescript@canary now, which should work with [email protected]

cool!!!

If you found any specific issue with the latest canary release, just open a new issue!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josecolella picture josecolella  路  4Comments

fareshan picture fareshan  路  3Comments

mikew picture mikew  路  4Comments

samanmohamadi picture samanmohamadi  路  5Comments

nandox5 picture nandox5  路  3Comments