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>'.
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]
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.