Skip to content

Commit 8f329a3

Browse files
committed
Support objects in value arrays
1 parent 5c8135f commit 8f329a3

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ export const inferType = function inferType(x) {
225225
(x === true || x === false) ? 16 :
226226
typeof x === 'bigint' ? 20 :
227227
Array.isArray(x) ? inferType(x[0]) :
228+
typeof x === 'object' && x !== null ? 3802 :
228229
0
229230
)
230231
}

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ declare namespace postgres {
518518
size(): Promise<[{ position: bigint, size: bigint }]>;
519519
}
520520

521-
type EscapableArray = (string | number)[]
521+
type EscapableArray = (string | number | object)[]
522522

523523
type Serializable = never
524524
| null

0 commit comments

Comments
 (0)