@livestore/wa-sqlite 1.0.1-dev.2 → 1.0.1-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livestore/wa-sqlite",
3
- "version": "1.0.1-dev.2",
3
+ "version": "1.0.1-dev.4",
4
4
  "type": "module",
5
5
  "main": "src/sqlite-api.js",
6
6
  "types": "src/types/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  * each element converted to a byte); SQLite always returns blob data as
16
16
  * `Uint8Array`
17
17
  */
18
- type SQLiteCompatibleType = number|string|Uint8Array|Array<number>|bigint|null;
18
+ export type SQLiteCompatibleType = number|string|Uint8Array|Array<number>|bigint|null;
19
19
 
20
20
  /**
21
21
  * SQLite Virtual File System object
@@ -33,7 +33,7 @@ type SQLiteCompatibleType = number|string|Uint8Array|Array<number>|bigint|null;
33
33
  * @see https://sqlite.org/vfs.html
34
34
  * @see https://sqlite.org/c3ref/io_methods.html
35
35
  */
36
- declare interface SQLiteVFS {
36
+ export interface SQLiteVFS {
37
37
  /** Maximum length of a file path in UTF-8 bytes (default 64) */
38
38
  mxPathName?: number;
39
39
 
@@ -178,7 +178,7 @@ declare interface SQLitePrepareOptions {
178
178
  *
179
179
  * @see https://sqlite.org/c3ref/funclist.html
180
180
  */
181
- declare interface SQLiteAPI {
181
+ export interface SQLiteAPI {
182
182
  /**
183
183
  * Bind a collection of values to a statement
184
184
  *
@@ -617,9 +617,9 @@ declare interface SQLiteAPI {
617
617
  * Reset a prepared statement object
618
618
  * @see https://www.sqlite.org/c3ref/reset.html
619
619
  * @param stmt prepared statement pointer
620
- * @returns Promise-wrapped `SQLITE_OK` (rejects on error)
620
+ * @returns `SQLITE_OK` (rejects on error)
621
621
  */
622
- reset(stmt: number): Promise<number>;
622
+ reset(stmt: number): number;
623
623
 
624
624
  /**
625
625
  * Convenience function to call `result_*` based of the type of `value`
@@ -746,7 +746,7 @@ declare interface SQLiteAPI {
746
746
  * @param options
747
747
  */
748
748
  // statements(db: number, sql: string, options?: SQLitePrepareOptions): AsyncIterable<number>;
749
- statements(db: number, sql: string, options?: SQLitePrepareOptions): Iterable<number>;
749
+ statements(db: number, sql: string, options?: SQLitePrepareOptions): ReadonlyArray<number>;
750
750
 
751
751
  /**
752
752
  * Evaluate an SQL statement