Skip to content

Commit

Permalink
Merge pull request #83 from louwers/binding-spec
Browse files Browse the repository at this point in the history
Add `undefined` and `boolean` to `BindingSpec` type
  • Loading branch information
tomayac authored Sep 2, 2024
2 parents 0fa5393 + a061bd2 commit e74c7ab
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ declare type SqlValue =
| Int8Array
| ArrayBuffer;

/** Types of values that can be passed to SQLite. */
declare type BindableValue =
| SqlValue
/** converted to NULL */
| undefined
/** converted to INTEGER */
| boolean;

/** Internal data types supported by SQLite3. */
declare type SQLiteDataType =
| CAPI['SQLITE_INTEGER']
Expand All @@ -18,10 +26,10 @@ declare type SQLiteDataType =

/** Specifies parameter bindings. */
declare type BindingSpec =
| readonly SqlValue[]
| { [paramName: string]: SqlValue }
| readonly BindableValue[]
| { [paramName: string]: BindableValue }
/** Assumed to have binding index `1` */
| SqlValue;
| (SqlValue | boolean);

/**
* Certain WASM-bound APIs, where explicitly noted, have additional string-type
Expand Down

0 comments on commit e74c7ab

Please sign in to comment.