DefinitelyTyped/types/sequelize
mmkal 3d3e779a32 feat: use typescript type indexing to make find* functions more helpful.
This turns WhereOptions and FindOptions into generic types, which can then check that you are using the correct column names, in the find* functions (findOne, findAll etc.). In other places where there is no attributes type available, fall back to the old behaviour of allowing any field names (now with types named AnyWhereOptions and AnyFindOptions).

This allows typescript to catch more errors, e.g.

User.findOne({ where: { firstName: 'Bob' } });
vs.
User.findOne({ where: { first_name: 'Bob' } });
2017-07-01 14:15:26 -04:00
..
v3 Add missing boolean to union type. 2017-06-23 09:07:54 -05:00
index.d.ts feat: use typescript type indexing to make find* functions more helpful. 2017-07-01 14:15:26 -04:00
sequelize-tests.ts feat: use typescript type indexing to make find* functions more helpful. 2017-07-01 14:15:26 -04:00
tsconfig.json