From f3553645e0b872f8b2778fbc4284b31917c56815 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 10:45:44 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Replace=20'any'=20type=20with=20?= =?UTF-8?q?strong=20typings=20in=20sql.js=20declarations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/declarations.d.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/declarations.d.ts b/src/declarations.d.ts index 679fdbd..6a7c7bc 100644 --- a/src/declarations.d.ts +++ b/src/declarations.d.ts @@ -1,24 +1,26 @@ declare module 'sql.js' { + export type SqlValue = number | string | Uint8Array | null; + export interface Database { - run(sql: string, params?: any[]): void; - exec(sql: string, params?: any[]): QueryResults[]; - prepare(sql: string, params?: any[]): Statement; + run(sql: string, params?: SqlValue[]): void; + exec(sql: string, params?: SqlValue[]): QueryResults[]; + prepare(sql: string, params?: SqlValue[]): Statement; export(): Uint8Array; close(): void; } export interface QueryResults { columns: string[]; - values: any[][]; + values: SqlValue[][]; } export interface Statement { - bind(values: any[]): boolean; + bind(values: SqlValue[]): boolean; step(): boolean; - get(params?: any[]): any[]; + get(params?: SqlValue[]): SqlValue[]; getColumnNames(): string[]; - getAsObject(params?: any[]): any; - run(params?: any[]): void; + getAsObject(params?: SqlValue[]): Record; + run(params?: SqlValue[]): void; free(): void; }