From a0943e2822d56a21a7816382867fca5c6564bb56 Mon Sep 17 00:00:00 2001 From: Sjors Rijsdam Date: Sat, 5 Sep 2026 18:46:42 +0200 Subject: [PATCH 1/2] Accurately reflect return type --- types/tables.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/tables.d.ts b/types/tables.d.ts index a74bee4a..defcb829 100644 --- a/types/tables.d.ts +++ b/types/tables.d.ts @@ -64,9 +64,9 @@ type ArcDBWith = { export type ArcDB = ArcDBWith & { name(name: keyof Tables): string; - reflect(): { + reflect(): Promise<{ [tableName in keyof Tables]: string; - }; + }>; _client: AwsLiteDynamoDB; // _db: DynamoDB; // _doc: DynamoDB.DocumentClient; From c7aff37347323dde47aaed0db79399769ae061b0 Mon Sep 17 00:00:00 2001 From: Sjors Rijsdam Date: Sun, 6 Sep 2026 09:26:38 +0200 Subject: [PATCH 2/2] Update test --- types/index.test-d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.test-d.ts b/types/index.test-d.ts index 7e5b8e57..bd47291f 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -103,7 +103,7 @@ arc.static("/", { stagePath: false }); const dbClient = await arc.tables() expectType(dbClient._client) expectType(dbClient.name('widgets')) -expectType>(dbClient.reflect()) +expectType>>(dbClient.reflect()) const myTable = dbClient.foobar const id42 = await myTable.get({ id: 42 }) await myTable.update({