Sequelize-typescript: Error in Model class compiling typescript

Created on 10 Jun 2018  路  2Comments  路  Source: RobinBuschmann/sequelize-typescript

Hey when I'm compiling my project I get this error message from typescript compiler:

 error TS2344: Type 'keyof T' does not satisfy the constraint 'string'.
  Type 'string | number | symbol' is not assignable to type 'string'.
    Type 'number' is not assignable to type 'string'.

It is thrown from the Model class by using Omit. So maybe this error only happens on my PC or it is a general problem.

Any help is welcome.

duplicate

All 2 comments

I'm getting the same thing. Excluding node_modules in tsconfig.json doesn't seem to work either :/

node_modules/sequelize-typescript/lib/utils/types.d.ts:9:16 - error TS2344: Type 'keyof T' does not satisfy the constraint 'string'.
  Type 'string | number | symbol' is not assignable to type 'string'.
    Type 'number' is not assignable to type 'string'.

9     [P in Diff<keyof T, K>]: T[P];

Duplicate of #379

Fixed in sequelize-typescript@next

Was this page helpful?
0 / 5 - 0 ratings