From d7175b03aa3baf15d8f84b02b152b171a595097d Mon Sep 17 00:00:00 2001 From: vypxl Date: Thu, 8 Jan 2026 16:52:25 +0100 Subject: [PATCH 1/3] Support objects in value arrays --- src/types.js | 1 + types/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types.js b/src/types.js index 7c7c2b93..aed82610 100644 --- a/src/types.js +++ b/src/types.js @@ -225,6 +225,7 @@ export const inferType = function inferType(x) { (x === true || x === false) ? 16 : typeof x === 'bigint' ? 20 : Array.isArray(x) ? inferType(x[0]) : + typeof x === 'object' && x !== null ? 3802 : 0 ) } diff --git a/types/index.d.ts b/types/index.d.ts index 4b796799..49c3857a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -518,7 +518,7 @@ declare namespace postgres { size(): Promise<[{ position: bigint, size: bigint }]>; } - type EscapableArray = (string | number)[] + type EscapableArray = (string | number | object)[] type Serializable = never | null From 3881262179faf13d49c917756609914d3eed9bc6 Mon Sep 17 00:00:00 2001 From: vypxl Date: Thu, 8 Jan 2026 16:52:32 +0100 Subject: [PATCH 2/3] build --- cf/src/types.js | 1 + cjs/src/types.js | 1 + deno/src/types.js | 1 + deno/types/index.d.ts | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cf/src/types.js b/cf/src/types.js index aa2ead29..fcfb6b9e 100644 --- a/cf/src/types.js +++ b/cf/src/types.js @@ -226,6 +226,7 @@ export const inferType = function inferType(x) { (x === true || x === false) ? 16 : typeof x === 'bigint' ? 20 : Array.isArray(x) ? inferType(x[0]) : + typeof x === 'object' && x !== null ? 3802 : 0 ) } diff --git a/cjs/src/types.js b/cjs/src/types.js index 0578284c..43c555d1 100644 --- a/cjs/src/types.js +++ b/cjs/src/types.js @@ -225,6 +225,7 @@ const inferType = module.exports.inferType = function inferType(x) { (x === true || x === false) ? 16 : typeof x === 'bigint' ? 20 : Array.isArray(x) ? inferType(x[0]) : + typeof x === 'object' && x !== null ? 3802 : 0 ) } diff --git a/deno/src/types.js b/deno/src/types.js index ea0da6a2..e0706cb6 100644 --- a/deno/src/types.js +++ b/deno/src/types.js @@ -226,6 +226,7 @@ export const inferType = function inferType(x) { (x === true || x === false) ? 16 : typeof x === 'bigint' ? 20 : Array.isArray(x) ? inferType(x[0]) : + typeof x === 'object' && x !== null ? 3802 : 0 ) } diff --git a/deno/types/index.d.ts b/deno/types/index.d.ts index c141cfd9..b129c88e 100644 --- a/deno/types/index.d.ts +++ b/deno/types/index.d.ts @@ -520,7 +520,7 @@ declare namespace postgres { size(): Promise<[{ position: bigint, size: bigint }]>; } - type EscapableArray = (string | number)[] + type EscapableArray = (string | number | object)[] type Serializable = never | null From b4d17015192616c53098f3baab8275869b9fdff8 Mon Sep 17 00:00:00 2001 From: vypxl Date: Thu, 22 Jan 2026 11:44:54 +0100 Subject: [PATCH 3/3] fix: use Record instead of type object --- deno/types/index.d.ts | 2 +- types/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno/types/index.d.ts b/deno/types/index.d.ts index b129c88e..efdf9c86 100644 --- a/deno/types/index.d.ts +++ b/deno/types/index.d.ts @@ -520,7 +520,7 @@ declare namespace postgres { size(): Promise<[{ position: bigint, size: bigint }]>; } - type EscapableArray = (string | number | object)[] + type EscapableArray = (string | number | Record)[] type Serializable = never | null diff --git a/types/index.d.ts b/types/index.d.ts index 49c3857a..4a0b15f4 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -518,7 +518,7 @@ declare namespace postgres { size(): Promise<[{ position: bigint, size: bigint }]>; } - type EscapableArray = (string | number | object)[] + type EscapableArray = (string | number | Record)[] type Serializable = never | null