From 8c53440ac428425586c88b07ef50ac7c553c4068 Mon Sep 17 00:00:00 2001 From: Jesper Haug Karsrud Date: Thu, 15 May 2025 21:38:27 +0200 Subject: [PATCH 1/2] Add TablesOptions type to tables.d.ts --- types/tables.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/types/tables.d.ts b/types/tables.d.ts index daa69ffc..1709ee71 100644 --- a/types/tables.d.ts +++ b/types/tables.d.ts @@ -75,8 +75,22 @@ export type ArcDB = ArcDBWith & { // Permissive by default: allows any table, any inputs, any outputs. type AnyTables = Record; +type TablesOptions = { + awsjsonMarshall?: { + allowImpreciseNumbers?: bool, + convertClassInstanceToMap?: bool, + convertEmptyValues?: bool, + convertTopLevelContainer?: bool, + removeUndefinedValues?: bool + }, + awsjsonUnmarshall?: { + convertWithoutMapWrapper?: bool, + wrapNumbers?: bool | ((value:string) => number | bigint | any) + } +}; + export interface ArcTables { - (): Promise>; + (options?: TablesOptions): Promise>; // legacy methods insert: any; From ebbc3f4bd38db499c5211e467505cc1bdb045cf9 Mon Sep 17 00:00:00 2001 From: Jesper Haug Karsrud Date: Thu, 15 May 2025 23:35:14 +0200 Subject: [PATCH 2/2] Use correct typescript keyword --- types/tables.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/types/tables.d.ts b/types/tables.d.ts index 1709ee71..a74bee4a 100644 --- a/types/tables.d.ts +++ b/types/tables.d.ts @@ -77,19 +77,19 @@ type AnyTables = Record; type TablesOptions = { awsjsonMarshall?: { - allowImpreciseNumbers?: bool, - convertClassInstanceToMap?: bool, - convertEmptyValues?: bool, - convertTopLevelContainer?: bool, - removeUndefinedValues?: bool + allowImpreciseNumbers?: boolean, + convertClassInstanceToMap?: boolean, + convertEmptyValues?: boolean, + convertTopLevelContainer?: boolean, + removeUndefinedValues?: boolean }, awsjsonUnmarshall?: { - convertWithoutMapWrapper?: bool, - wrapNumbers?: bool | ((value:string) => number | bigint | any) + convertWithoutMapWrapper?: boolean, + wrapNumbers?: boolean | ((value:string) => number | bigint | any) } }; -export interface ArcTables { +export interface ArcTables{ (options?: TablesOptions): Promise>; // legacy methods