ducjs 4.0.3 → 4.0.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.
Binary file
@@ -1,251 +1,264 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+
4
+ export class DucOpfsDocument {
5
+ private constructor();
6
+ free(): void;
7
+ [Symbol.dispose](): void;
8
+ /**
9
+ * Flush the WAL journal into the main database file.
10
+ *
11
+ * After calling this, the OPFS file backing this document contains
12
+ * all committed data. JavaScript can then read the file directly
13
+ * from OPFS in chunks and gzip-compress it.
14
+ */
15
+ checkpointWal(): void;
16
+ clearCheckpointDataChunks(checkpoint_id: string): void;
17
+ clearDeltaChangesetChunks(delta_id: string): void;
18
+ clearExternalFileRevisionChunks(revision_id: string): void;
19
+ static deleteOpfsDatabase(name: string): Promise<boolean>;
20
+ static deleteOpfsDatabaseInPool(name: string, namespace: string): Promise<boolean>;
21
+ /**
22
+ * Execute an arbitrary SQL batch (e.g. `VACUUM INTO 'export.sqlite'`).
23
+ */
24
+ executeBatch(sql: string): void;
25
+ /**
26
+ * Read a chunk from the SQLite database backing this OPFS document.
27
+ *
28
+ * Call [`checkpointWal`] first so the main database file contains all
29
+ * committed data. JavaScript can gzip successive chunks without loading
30
+ * the whole database into WASM memory.
31
+ */
32
+ exportDbChunk(offset_bytes: number, length: number): Promise<Uint8Array>;
33
+ /**
34
+ * Return the estimated database file size in bytes
35
+ * (`page_count × page_size`). Call [`checkpoint_wal`] first for
36
+ * an accurate value.
37
+ */
38
+ getDbSizeBytes(): number;
39
+ /**
40
+ * Return the filename used to open this document.
41
+ */
42
+ getFilename(): string;
43
+ listExternalFiles(): any;
44
+ static listOpfsDatabases(): Promise<any>;
45
+ static listOpfsDatabasesInPool(namespace: string): Promise<any>;
46
+ listVersions(): any;
47
+ /**
48
+ * Open or create a persistent OPFS-backed DUC SQLite document.
49
+ *
50
+ * This must run from a Dedicated Worker because the OPFS SAH-pool VFS uses
51
+ * FileSystemSyncAccessHandle.
52
+ */
53
+ static open(name: string): Promise<DucOpfsDocument>;
54
+ static openInPool(name: string, namespace: string): Promise<DucOpfsDocument>;
55
+ readCheckpointDataChunk(checkpoint_id: string, chunk_index: number): any;
56
+ readDeltaChangesetChunk(delta_id: string, chunk_index: number): any;
57
+ readDocumentState(): any;
58
+ readExternalFileRevisionChunk(revision_id: string, chunk_index: number): any;
59
+ /**
60
+ * Read a bounded batch of external-file chunks with one SQL query and one
61
+ * JS/WASM call. Batches are capped at 4 chunks to bound peak memory.
62
+ */
63
+ readExternalFileRevisionChunks(revision_id: string, start_chunk_index: number, max_chunks: number): Array<any>;
64
+ /**
65
+ * Read a bounded byte range, including from legacy one-row BLOB revisions.
66
+ */
67
+ readExternalFileRevisionRange(revision_id: string, offset_bytes: number, length_bytes: number): any;
68
+ readVersionGraph(): any;
69
+ writeCheckpointDataChunk(checkpoint_id: string, chunk_index: number, offset_bytes: number, data: Uint8Array): void;
70
+ writeDeltaChangesetChunk(delta_id: string, chunk_index: number, offset_bytes: number, data: Uint8Array): void;
71
+ writeDocumentState(data: any): void;
72
+ writeExternalFileRevisionChunk(revision_id: string, chunk_index: number, offset_bytes: number, data: Uint8Array): void;
73
+ }
74
+
3
75
  /**
4
- * Parse a `.duc` file (Uint8Array) into a JS object (ExportedDataState).
76
+ * Incrementally replaces one OPFS database without retaining the imported
77
+ * SQLite payload in WASM memory.
5
78
  */
6
- export function parseDuc(buf: Uint8Array): any;
79
+ export class DucOpfsImporter {
80
+ private constructor();
81
+ free(): void;
82
+ [Symbol.dispose](): void;
83
+ /**
84
+ * Delete a partial import. Safe to call after a failed stream read.
85
+ */
86
+ abort(): boolean;
87
+ /**
88
+ * Begin replacing `name`. Any prior database with the same closed name is
89
+ * released back to the SAH pool before the new import claims a slot.
90
+ */
91
+ static begin(name: string): Promise<DucOpfsImporter>;
92
+ static beginInPool(name: string, namespace: string): Promise<DucOpfsImporter>;
93
+ /**
94
+ * Flush the imported database and make it ready for SQLite to open.
95
+ */
96
+ finish(): number;
97
+ getBytesWritten(): number;
98
+ /**
99
+ * Write the next decompressed SQLite chunk.
100
+ */
101
+ writeChunk(data: Uint8Array): void;
102
+ }
103
+
7
104
  /**
8
- * Serialize a JS object (ExportedDataState) into `.duc` bytes (Uint8Array).
105
+ * Apply a changeset to reconstruct document state.
106
+ *
107
+ * `base_state` must be the exact checkpoint data used when the changeset
108
+ * was created. Returns the full document state as `Uint8Array`.
109
+ *
110
+ * Handles all changeset formats transparently:
111
+ * - v3 (bsdiff), v2 (XOR diff), v1 (gzip full snapshot)
9
112
  */
10
- export function serializeDuc(data: any): Uint8Array;
113
+ export function applyDeltaChangeset(base_state: Uint8Array, changeset: Uint8Array): Uint8Array;
114
+
11
115
  /**
12
- * Restore the document state at `version_number` from a `.duc` file buffer.
116
+ * Compute a checkpoint-relative binary diff changeset using bsdiff.
117
+ *
118
+ * `base_state` is the checkpoint's full data blob.
119
+ * `current_state` is the full document state at the new version.
120
+ *
121
+ * Returns an encoded changeset (`Uint8Array`) ready for storage in a
122
+ * `Delta.payload`. bsdiff finds matching blocks even when they shift
123
+ * offsets, which is critical for SQLite databases.
13
124
  */
14
- export function restoreVersion(duc_buf: Uint8Array, version_number: number): any;
125
+ export function createDeltaChangeset(base_state: Uint8Array, current_state: Uint8Array): Uint8Array;
126
+
15
127
  /**
16
- * Restore a specific checkpoint by its ID from a `.duc` file buffer.
128
+ * Returns the current version-control schema version defined in Rust.
129
+ *
130
+ * TypeScript should use this as the source of truth instead of hardcoding
131
+ * its own constant. When this value is bumped in Rust, the version control
132
+ * system will automatically handle migration bookkeeping (closing old chains,
133
+ * recording migrations) the next time a checkpoint or delta is created.
17
134
  */
18
- export function restoreCheckpoint(duc_buf: Uint8Array, checkpoint_id: string): any;
135
+ export function getCurrentSchemaVersion(): number;
136
+
19
137
  /**
20
138
  * List all versions (checkpoints + deltas) from a `.duc` file buffer.
21
139
  */
22
140
  export function listVersions(duc_buf: Uint8Array): any;
141
+
23
142
  /**
24
- * Read the full VersionGraph from a `.duc` file buffer.
143
+ * Parse a `.duc` file (Uint8Array) into a JS object (ExportedDataState).
25
144
  */
26
- export function readVersionGraph(duc_buf: Uint8Array): any;
145
+ export function parseDuc(buf: Uint8Array): any;
146
+
27
147
  /**
28
- * Revert the document to a specific version, removing all newer versions.
148
+ * Read the full VersionGraph from a `.duc` file buffer.
29
149
  */
30
- export function revertToVersion(duc_buf: Uint8Array, target_version: number): any;
150
+ export function readVersionGraph(duc_buf: Uint8Array): any;
151
+
31
152
  /**
32
- * Returns the current version-control schema version defined in Rust.
33
- *
34
- * TypeScript should use this as the source of truth instead of hardcoding
35
- * its own constant. When this value is bumped in Rust, the version control
36
- * system will automatically handle migration bookkeeping (closing old chains,
37
- * recording migrations) the next time a checkpoint or delta is created.
153
+ * Restore a specific checkpoint by its ID from a `.duc` file buffer.
38
154
  */
39
- export function getCurrentSchemaVersion(): number;
155
+ export function restoreCheckpoint(duc_buf: Uint8Array, checkpoint_id: string): any;
156
+
40
157
  /**
41
- * Compute a checkpoint-relative binary diff changeset using bsdiff.
42
- *
43
- * `base_state` is the checkpoint's full data blob.
44
- * `current_state` is the full document state at the new version.
45
- *
46
- * Returns an encoded changeset (`Uint8Array`) ready for storage in a
47
- * `Delta.payload`. bsdiff finds matching blocks even when they shift
48
- * offsets, which is critical for SQLite databases.
158
+ * Restore the document state at `version_number` from a `.duc` file buffer.
49
159
  */
50
- export function createDeltaChangeset(base_state: Uint8Array, current_state: Uint8Array): Uint8Array;
160
+ export function restoreVersion(duc_buf: Uint8Array, version_number: number): any;
161
+
51
162
  /**
52
- * Apply a changeset to reconstruct document state.
53
- *
54
- * `base_state` must be the exact checkpoint data used when the changeset
55
- * was created. Returns the full document state as `Uint8Array`.
56
- *
57
- * Handles all changeset formats transparently:
58
- * - v3 (bsdiff), v2 (XOR diff), v1 (gzip full snapshot)
163
+ * Revert the document to a specific version, removing all newer versions.
59
164
  */
60
- export function applyDeltaChangeset(base_state: Uint8Array, changeset: Uint8Array): Uint8Array;
61
- export class DucOpfsDocument {
62
- private constructor();
63
- free(): void;
64
- [Symbol.dispose](): void;
65
- static openInPool(name: string, namespace: string): Promise<DucOpfsDocument>;
66
- /**
67
- * Read a chunk from the SQLite database backing this OPFS document.
68
- *
69
- * Call [`checkpointWal`] first so the main database file contains all
70
- * committed data. JavaScript can gzip successive chunks without loading
71
- * the whole database into WASM memory.
72
- */
73
- exportDbChunk(offset_bytes: number, length: number): Promise<Uint8Array>;
74
- static listOpfsDatabases(): Promise<any>;
75
- static deleteOpfsDatabase(name: string): Promise<boolean>;
76
- static listOpfsDatabasesInPool(namespace: string): Promise<any>;
77
- static deleteOpfsDatabaseInPool(name: string, namespace: string): Promise<boolean>;
78
- /**
79
- * Open or create a persistent OPFS-backed DUC SQLite document.
80
- *
81
- * This must run from a Dedicated Worker because the OPFS SAH-pool VFS uses
82
- * FileSystemSyncAccessHandle.
83
- */
84
- static open(name: string): Promise<DucOpfsDocument>;
85
- /**
86
- * Return the filename used to open this document.
87
- */
88
- getFilename(): string;
89
- /**
90
- * Execute an arbitrary SQL batch (e.g. `VACUUM INTO 'export.sqlite'`).
91
- */
92
- executeBatch(sql: string): void;
93
- listVersions(): any;
94
- /**
95
- * Flush the WAL journal into the main database file.
96
- *
97
- * After calling this, the OPFS file backing this document contains
98
- * all committed data. JavaScript can then read the file directly
99
- * from OPFS in chunks and gzip-compress it.
100
- */
101
- checkpointWal(): void;
102
- /**
103
- * Return the estimated database file size in bytes
104
- * (`page_count × page_size`). Call [`checkpoint_wal`] first for
105
- * an accurate value.
106
- */
107
- getDbSizeBytes(): number;
108
- readVersionGraph(): any;
109
- listExternalFiles(): any;
110
- readDocumentState(): any;
111
- writeDocumentState(data: any): void;
112
- readCheckpointDataChunk(checkpoint_id: string, chunk_index: number): any;
113
- readDeltaChangesetChunk(delta_id: string, chunk_index: number): any;
114
- writeCheckpointDataChunk(checkpoint_id: string, chunk_index: number, offset_bytes: number, data: Uint8Array): void;
115
- writeDeltaChangesetChunk(delta_id: string, chunk_index: number, offset_bytes: number, data: Uint8Array): void;
116
- clearCheckpointDataChunks(checkpoint_id: string): void;
117
- clearDeltaChangesetChunks(delta_id: string): void;
118
- readExternalFileRevisionChunk(revision_id: string, chunk_index: number): any;
119
- /**
120
- * Read a bounded byte range, including from legacy one-row BLOB revisions.
121
- */
122
- readExternalFileRevisionRange(revision_id: string, offset_bytes: number, length_bytes: number): any;
123
- /**
124
- * Read a bounded batch of external-file chunks with one SQL query and one
125
- * JS/WASM call. Batches are capped at 4 chunks to bound peak memory.
126
- */
127
- readExternalFileRevisionChunks(revision_id: string, start_chunk_index: number, max_chunks: number): Array<any>;
128
- writeExternalFileRevisionChunk(revision_id: string, chunk_index: number, offset_bytes: number, data: Uint8Array): void;
129
- clearExternalFileRevisionChunks(revision_id: string): void;
130
- }
165
+ export function revertToVersion(duc_buf: Uint8Array, target_version: number): any;
166
+
131
167
  /**
132
- * Incrementally replaces one OPFS database without retaining the imported
133
- * SQLite payload in WASM memory.
168
+ * Serialize a JS object (ExportedDataState) into `.duc` bytes (Uint8Array).
134
169
  */
135
- export class DucOpfsImporter {
136
- private constructor();
137
- free(): void;
138
- [Symbol.dispose](): void;
139
- static beginInPool(name: string, namespace: string): Promise<DucOpfsImporter>;
140
- /**
141
- * Begin replacing `name`. Any prior database with the same closed name is
142
- * released back to the SAH pool before the new import claims a slot.
143
- */
144
- static begin(name: string): Promise<DucOpfsImporter>;
145
- /**
146
- * Write the next decompressed SQLite chunk.
147
- */
148
- writeChunk(data: Uint8Array): void;
149
- getBytesWritten(): number;
150
- /**
151
- * Delete a partial import. Safe to call after a failed stream read.
152
- */
153
- abort(): boolean;
154
- /**
155
- * Flush the imported database and make it ready for SQLite to open.
156
- */
157
- finish(): number;
158
- }
170
+ export function serializeDuc(data: any): Uint8Array;
159
171
 
160
172
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
161
173
 
162
174
  export interface InitOutput {
163
- readonly memory: WebAssembly.Memory;
164
- readonly __wbg_ducopfsdocument_free: (a: number, b: number) => void;
165
- readonly __wbg_ducopfsimporter_free: (a: number, b: number) => void;
166
- readonly applyDeltaChangeset: (a: number, b: number, c: number, d: number) => [number, number, number, number];
167
- readonly createDeltaChangeset: (a: number, b: number, c: number, d: number) => [number, number, number, number];
168
- readonly ducopfsdocument_checkpointWal: (a: number) => [number, number];
169
- readonly ducopfsdocument_clearCheckpointDataChunks: (a: number, b: number, c: number) => [number, number];
170
- readonly ducopfsdocument_clearDeltaChangesetChunks: (a: number, b: number, c: number) => [number, number];
171
- readonly ducopfsdocument_clearExternalFileRevisionChunks: (a: number, b: number, c: number) => [number, number];
172
- readonly ducopfsdocument_deleteOpfsDatabase: (a: number, b: number) => any;
173
- readonly ducopfsdocument_deleteOpfsDatabaseInPool: (a: number, b: number, c: number, d: number) => any;
174
- readonly ducopfsdocument_executeBatch: (a: number, b: number, c: number) => [number, number];
175
- readonly ducopfsdocument_exportDbChunk: (a: number, b: number, c: number) => any;
176
- readonly ducopfsdocument_getDbSizeBytes: (a: number) => [number, number, number];
177
- readonly ducopfsdocument_getFilename: (a: number) => [number, number];
178
- readonly ducopfsdocument_listExternalFiles: (a: number) => [number, number, number];
179
- readonly ducopfsdocument_listOpfsDatabases: () => any;
180
- readonly ducopfsdocument_listOpfsDatabasesInPool: (a: number, b: number) => any;
181
- readonly ducopfsdocument_listVersions: (a: number) => [number, number, number];
182
- readonly ducopfsdocument_open: (a: number, b: number) => any;
183
- readonly ducopfsdocument_openInPool: (a: number, b: number, c: number, d: number) => any;
184
- readonly ducopfsdocument_readCheckpointDataChunk: (a: number, b: number, c: number, d: number) => [number, number, number];
185
- readonly ducopfsdocument_readDeltaChangesetChunk: (a: number, b: number, c: number, d: number) => [number, number, number];
186
- readonly ducopfsdocument_readDocumentState: (a: number) => [number, number, number];
187
- readonly ducopfsdocument_readExternalFileRevisionChunk: (a: number, b: number, c: number, d: number) => [number, number, number];
188
- readonly ducopfsdocument_readExternalFileRevisionChunks: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
189
- readonly ducopfsdocument_readExternalFileRevisionRange: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
190
- readonly ducopfsdocument_readVersionGraph: (a: number) => [number, number, number];
191
- readonly ducopfsdocument_writeCheckpointDataChunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
192
- readonly ducopfsdocument_writeDeltaChangesetChunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
193
- readonly ducopfsdocument_writeDocumentState: (a: number, b: any) => [number, number];
194
- readonly ducopfsdocument_writeExternalFileRevisionChunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
195
- readonly ducopfsimporter_abort: (a: number) => [number, number, number];
196
- readonly ducopfsimporter_begin: (a: number, b: number) => any;
197
- readonly ducopfsimporter_beginInPool: (a: number, b: number, c: number, d: number) => any;
198
- readonly ducopfsimporter_finish: (a: number) => [number, number, number];
199
- readonly ducopfsimporter_getBytesWritten: (a: number) => number;
200
- readonly ducopfsimporter_writeChunk: (a: number, b: number, c: number) => [number, number];
201
- readonly getCurrentSchemaVersion: () => number;
202
- readonly listVersions: (a: number, b: number) => [number, number, number];
203
- readonly parseDuc: (a: number, b: number) => [number, number, number];
204
- readonly readVersionGraph: (a: number, b: number) => [number, number, number];
205
- readonly restoreCheckpoint: (a: number, b: number, c: number, d: number) => [number, number, number];
206
- readonly restoreVersion: (a: number, b: number, c: number) => [number, number, number];
207
- readonly revertToVersion: (a: number, b: number, c: number) => [number, number, number];
208
- readonly serializeDuc: (a: any) => [number, number, number, number];
209
- readonly rust_sqlite_wasm_abort: () => void;
210
- readonly rust_sqlite_wasm_assert_fail: (a: number, b: number, c: number, d: number) => void;
211
- readonly rust_sqlite_wasm_calloc: (a: number, b: number) => number;
212
- readonly rust_sqlite_wasm_malloc: (a: number) => number;
213
- readonly rust_sqlite_wasm_free: (a: number) => void;
214
- readonly rust_sqlite_wasm_getentropy: (a: number, b: number) => number;
215
- readonly rust_sqlite_wasm_localtime: (a: number) => number;
216
- readonly rust_sqlite_wasm_realloc: (a: number, b: number) => number;
217
- readonly sqlite3_os_end: () => number;
218
- readonly sqlite3_os_init: () => number;
219
- readonly __wbindgen_malloc: (a: number, b: number) => number;
220
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
221
- readonly __wbindgen_exn_store: (a: number) => void;
222
- readonly __externref_table_alloc: () => number;
223
- readonly __wbindgen_export_4: WebAssembly.Table;
224
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
225
- readonly __wbindgen_export_6: WebAssembly.Table;
226
- readonly __externref_table_dealloc: (a: number) => void;
227
- readonly closure101_externref_shim: (a: number, b: number, c: any) => void;
228
- readonly closure82_externref_shim: (a: number, b: number, c: any, d: any) => void;
229
- readonly __wbindgen_start: () => void;
175
+ readonly memory: WebAssembly.Memory;
176
+ readonly __wbg_ducopfsdocument_free: (a: number, b: number) => void;
177
+ readonly __wbg_ducopfsimporter_free: (a: number, b: number) => void;
178
+ readonly applyDeltaChangeset: (a: number, b: number, c: number, d: number) => [number, number, number, number];
179
+ readonly createDeltaChangeset: (a: number, b: number, c: number, d: number) => [number, number, number, number];
180
+ readonly ducopfsdocument_checkpointWal: (a: number) => [number, number];
181
+ readonly ducopfsdocument_clearCheckpointDataChunks: (a: number, b: number, c: number) => [number, number];
182
+ readonly ducopfsdocument_clearDeltaChangesetChunks: (a: number, b: number, c: number) => [number, number];
183
+ readonly ducopfsdocument_clearExternalFileRevisionChunks: (a: number, b: number, c: number) => [number, number];
184
+ readonly ducopfsdocument_deleteOpfsDatabase: (a: number, b: number) => any;
185
+ readonly ducopfsdocument_deleteOpfsDatabaseInPool: (a: number, b: number, c: number, d: number) => any;
186
+ readonly ducopfsdocument_executeBatch: (a: number, b: number, c: number) => [number, number];
187
+ readonly ducopfsdocument_exportDbChunk: (a: number, b: number, c: number) => any;
188
+ readonly ducopfsdocument_getDbSizeBytes: (a: number) => [number, number, number];
189
+ readonly ducopfsdocument_getFilename: (a: number) => [number, number];
190
+ readonly ducopfsdocument_listExternalFiles: (a: number) => [number, number, number];
191
+ readonly ducopfsdocument_listOpfsDatabases: () => any;
192
+ readonly ducopfsdocument_listOpfsDatabasesInPool: (a: number, b: number) => any;
193
+ readonly ducopfsdocument_listVersions: (a: number) => [number, number, number];
194
+ readonly ducopfsdocument_open: (a: number, b: number) => any;
195
+ readonly ducopfsdocument_openInPool: (a: number, b: number, c: number, d: number) => any;
196
+ readonly ducopfsdocument_readCheckpointDataChunk: (a: number, b: number, c: number, d: number) => [number, number, number];
197
+ readonly ducopfsdocument_readDeltaChangesetChunk: (a: number, b: number, c: number, d: number) => [number, number, number];
198
+ readonly ducopfsdocument_readDocumentState: (a: number) => [number, number, number];
199
+ readonly ducopfsdocument_readExternalFileRevisionChunk: (a: number, b: number, c: number, d: number) => [number, number, number];
200
+ readonly ducopfsdocument_readExternalFileRevisionChunks: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
201
+ readonly ducopfsdocument_readExternalFileRevisionRange: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
202
+ readonly ducopfsdocument_readVersionGraph: (a: number) => [number, number, number];
203
+ readonly ducopfsdocument_writeCheckpointDataChunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
204
+ readonly ducopfsdocument_writeDeltaChangesetChunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
205
+ readonly ducopfsdocument_writeDocumentState: (a: number, b: any) => [number, number];
206
+ readonly ducopfsdocument_writeExternalFileRevisionChunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number];
207
+ readonly ducopfsimporter_abort: (a: number) => [number, number, number];
208
+ readonly ducopfsimporter_begin: (a: number, b: number) => any;
209
+ readonly ducopfsimporter_beginInPool: (a: number, b: number, c: number, d: number) => any;
210
+ readonly ducopfsimporter_finish: (a: number) => [number, number, number];
211
+ readonly ducopfsimporter_getBytesWritten: (a: number) => number;
212
+ readonly ducopfsimporter_writeChunk: (a: number, b: number, c: number) => [number, number];
213
+ readonly getCurrentSchemaVersion: () => number;
214
+ readonly listVersions: (a: number, b: number) => [number, number, number];
215
+ readonly parseDuc: (a: number, b: number) => [number, number, number];
216
+ readonly readVersionGraph: (a: number, b: number) => [number, number, number];
217
+ readonly restoreCheckpoint: (a: number, b: number, c: number, d: number) => [number, number, number];
218
+ readonly restoreVersion: (a: number, b: number, c: number) => [number, number, number];
219
+ readonly revertToVersion: (a: number, b: number, c: number) => [number, number, number];
220
+ readonly serializeDuc: (a: any) => [number, number, number, number];
221
+ readonly rust_sqlite_wasm_abort: () => void;
222
+ readonly rust_sqlite_wasm_assert_fail: (a: number, b: number, c: number, d: number) => void;
223
+ readonly rust_sqlite_wasm_calloc: (a: number, b: number) => number;
224
+ readonly rust_sqlite_wasm_malloc: (a: number) => number;
225
+ readonly rust_sqlite_wasm_free: (a: number) => void;
226
+ readonly rust_sqlite_wasm_getentropy: (a: number, b: number) => number;
227
+ readonly rust_sqlite_wasm_localtime: (a: number) => number;
228
+ readonly rust_sqlite_wasm_realloc: (a: number, b: number) => number;
229
+ readonly sqlite3_os_end: () => number;
230
+ readonly sqlite3_os_init: () => number;
231
+ readonly wasm_bindgen_cbbfe5fbe5ccf11c___convert__closures_____invoke___wasm_bindgen_cbbfe5fbe5ccf11c___JsValue__core_f0fd674eaa06beef___result__Result_____wasm_bindgen_cbbfe5fbe5ccf11c___JsError___true_: (a: number, b: number, c: any) => [number, number];
232
+ readonly wasm_bindgen_cbbfe5fbe5ccf11c___convert__closures_____invoke___js_sys_15501fc5a3580944___Function_fn_wasm_bindgen_cbbfe5fbe5ccf11c___JsValue_____wasm_bindgen_cbbfe5fbe5ccf11c___sys__Undefined___js_sys_15501fc5a3580944___Function_fn_wasm_bindgen_cbbfe5fbe5ccf11c___JsValue_____wasm_bindgen_cbbfe5fbe5ccf11c___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
233
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
234
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
235
+ readonly __wbindgen_exn_store: (a: number) => void;
236
+ readonly __externref_table_alloc: () => number;
237
+ readonly __wbindgen_externrefs: WebAssembly.Table;
238
+ readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
239
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
240
+ readonly __externref_table_dealloc: (a: number) => void;
241
+ readonly __wbindgen_start: () => void;
230
242
  }
231
243
 
232
244
  export type SyncInitInput = BufferSource | WebAssembly.Module;
245
+
233
246
  /**
234
- * Instantiates the given `module`, which can either be bytes or
235
- * a precompiled `WebAssembly.Module`.
236
- *
237
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
238
- *
239
- * @returns {InitOutput}
240
- */
247
+ * Instantiates the given `module`, which can either be bytes or
248
+ * a precompiled `WebAssembly.Module`.
249
+ *
250
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
251
+ *
252
+ * @returns {InitOutput}
253
+ */
241
254
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
242
255
 
243
256
  /**
244
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
245
- * for everything else, calls `WebAssembly.instantiate` directly.
246
- *
247
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
248
- *
249
- * @returns {Promise<InitOutput>}
250
- */
257
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
258
+ * for everything else, calls `WebAssembly.instantiate` directly.
259
+ *
260
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
261
+ *
262
+ * @returns {Promise<InitOutput>}
263
+ */
251
264
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;