Skip to content

Commit c3c767e

Browse files
fubarsushantdhiman
authored andcommitted
fix(types): add Buffer to WhereValue type (#11499)
1 parent 3a141ac commit c3c767e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

types/lib/model.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ export type WhereValue =
341341
| string // literal value
342342
| number // literal value
343343
| boolean // literal value
344+
| Buffer // literal value
344345
| null
345346
| WhereOperators
346347
| WhereAttributeHash // for JSON columns

types/test/where.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ let where: WhereOptions;
99

1010
// From https://sequelize.org/master/en/v4/docs/querying/
1111

12+
/**
13+
* Literal values
14+
* @see WhereValue
15+
*/
16+
where = {
17+
string: 'foo',
18+
number: 1,
19+
boolean: true,
20+
buffer: Buffer.alloc(0),
21+
null: null,
22+
};
23+
1224
// Operators
1325

1426
const and: AndOperator = {

0 commit comments

Comments
 (0)