Definitelytyped: Sequelize - Model.update receives incorrect type for values parameter

Created on 1 Aug 2016  路  2Comments  路  Source: DefinitelyTyped/DefinitelyTyped

I tried using the latest sequelize definition file and had problems in Model.update function:
interface Model<TInstance, TAttributes> extends Hooks<TInstance>, Associations update( values : TAttributes, options : UpdateOptions ) : Promise<[number, TInstance[]]>;

I think the values argument should be of type string. We can use this function by sending as values only a subset of TAttributes.' What do you think about that?

Thanks in advanced.

Most helpful comment

What about update( values : Partial<TAttributes>, options : UpdateOptions )

All 2 comments

please send a pull request. I'll review it.

What about update( values : Partial<TAttributes>, options : UpdateOptions )

Was this page helpful?
0 / 5 - 0 ratings