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
..
2017-06-29 08:09:22 +02:00
2017-06-29 08:16:38 +02:00
2017-06-29 08:10:14 +02:00
2017-06-27 16:01:43 -07:00
2017-06-28 02:08:51 -04:00
2017-06-28 18:27:30 +02:00
2017-06-29 12:48:45 -07:00
2017-06-28 13:27:24 +12:00
2017-06-28 00:15:03 +03:00
2017-06-29 02:04:29 +03:00
2017-06-28 11:58:06 -04:00
2017-06-29 16:55:02 +02:00
2017-06-29 10:15:24 +02:00
2017-06-28 16:09:12 +02:00
2017-06-28 06:21:16 +08:00
2017-06-27 19:30:00 +02:00
2017-06-28 10:09:57 +02:00
2017-06-27 17:27:27 -04:00
2017-06-28 11:38:23 +02:00
2017-06-27 13:36:34 -04:00
2017-06-29 14:42:01 -06:00
2017-06-28 01:13:45 +02:00
2017-06-29 14:25:49 -07:00
2017-06-29 16:16:49 +02:00
2017-06-29 13:40:02 -07:00
2017-06-27 15:03:42 -07:00
2017-06-28 10:22:22 +08:00
2017-06-29 18:13:50 +03:00
2017-06-27 16:44:32 -03:00
2017-06-29 13:10:22 +03:00
2017-06-29 10:54:22 -07:00
2017-06-27 22:55:55 +02:00
2017-06-29 10:52:48 +01:00
2017-07-01 12:34:00 +09:00
2017-06-27 13:00:17 -07:00
2017-06-28 11:46:08 +08:00
2017-06-28 16:41:53 -06:00
2017-06-27 16:27:37 -07:00
2017-06-28 15:00:56 -07:00
2017-06-28 16:28:26 -07:00
2017-06-27 21:00:24 +04:00
2017-06-27 15:34:17 -07:00
2017-06-27 16:54:37 -04:00
2017-07-01 15:25:52 +10:00
2017-06-28 21:34:49 -04:00
2017-06-27 12:59:10 -07:00
2017-06-29 19:19:43 +03:00
2017-06-28 03:03:42 +02:00
2017-06-29 13:38:10 -07:00
2017-07-01 14:15:26 -04:00
2017-06-28 11:48:11 -04:00
2017-06-29 20:49:30 +02:00
2017-06-28 10:43:10 +08:00
2017-06-29 13:44:14 +01:00
2017-06-28 09:50:28 -07:00
2017-06-27 13:45:32 -07:00
2017-06-29 13:32:52 -07:00
2017-06-28 13:51:53 -06:00