Sequelize-typescript: Support for Array types

Created on 4 Apr 2019  路  6Comments  路  Source: RobinBuschmann/sequelize-typescript

If you define a column like:

@Column(DataType.ARRAY(DataType.STRING))
myCol: string[];

You'll get the error saying:

error TS2559: Type 'ArrayDataType<AbstractDataTypeConstructor>' has no properties in common with type 'Partial<ModelAttributeColumnOptions>'.

Most helpful comment

Seems to be a regression in one of the latest releases.

You can workaround it it by doing @Column({ type: DataType.ARRAY(DataType.STRING) }) in the meantime.

All 6 comments

Seems to be a regression in one of the latest releases.

You can workaround it it by doing @Column({ type: DataType.ARRAY(DataType.STRING) }) in the meantime.

@mannol Thanks for bringing this up. Does this happen with sequelize-typescript@canary?

@RobinBuschmann no problem. Thanks for this library!

On your question, I believe I installed the lib via yarn add sequelize-typescript@canary like 2 weeks ago. package.json shows I'm using version "^1.0.0-alpha.9 of this lib with sequelize version ^5.2.9.

@mannol Thanks. I wanted to make sure, that @devoto13's fix solves the issue. Since he made one for sequelize-typescript@1.

@RobinBuschmann sweet! Looks promising :+1:

Closing this, since it was fixed with [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fareshan picture fareshan  路  3Comments

lilling picture lilling  路  4Comments

zebkailash picture zebkailash  路  4Comments

nandox5 picture nandox5  路  3Comments

thestrayed picture thestrayed  路  5Comments