Skip to content

Commit a061bd2

Browse files
committed
Do not allow undefined for standalone bind
1 parent 0636b8f commit a061bd2

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

index.d.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ declare type SqlValue =
88
| Int8Array
99
| ArrayBuffer;
1010

11+
/** Types of values that can be passed to SQLite. */
12+
declare type BindableValue =
13+
| SqlValue
14+
/** converted to NULL */
15+
| undefined
16+
/** converted to INTEGER */
17+
| boolean;
18+
1119
/** Internal data types supported by SQLite3. */
1220
declare type SQLiteDataType =
1321
| CAPI['SQLITE_INTEGER']
@@ -18,12 +26,10 @@ declare type SQLiteDataType =
1826

1927
/** Specifies parameter bindings. */
2028
declare type BindingSpec =
21-
| readonly SqlValue[]
22-
| { [paramName: string]: SqlValue }
29+
| readonly BindableValue[]
30+
| { [paramName: string]: BindableValue }
2331
/** Assumed to have binding index `1` */
24-
| SqlValue
25-
| undefined
26-
| boolean;
32+
| (SqlValue | boolean);
2733

2834
/**
2935
* Certain WASM-bound APIs, where explicitly noted, have additional string-type

0 commit comments

Comments
 (0)