@wiscale/velesdb-wasm 1.4.1 → 1.6.0

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/velesdb_wasm.d.ts CHANGED
@@ -1,661 +1,790 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * A graph edge representing a relationship between nodes.
6
+ */
4
7
  export class GraphEdge {
5
- free(): void;
6
- [Symbol.dispose](): void;
7
- /**
8
- * Sets a numeric property on the edge.
9
- */
10
- set_number_property(key: string, value: number): void;
11
- /**
12
- * Sets a string property on the edge.
13
- */
14
- set_string_property(key: string, value: string): void;
15
- /**
16
- * Creates a new graph edge.
17
- *
18
- * # Arguments
19
- *
20
- * * `id` - Unique identifier for the edge
21
- * * `source` - Source node ID
22
- * * `target` - Target node ID
23
- * * `label` - Relationship type (e.g., "KNOWS", "WROTE")
24
- */
25
- constructor(id: bigint, source: bigint, target: bigint, label: string);
26
- /**
27
- * Converts to JSON for JavaScript interop.
28
- */
29
- to_json(): any;
30
- /**
31
- * Returns the edge ID.
32
- */
33
- readonly id: bigint;
34
- /**
35
- * Returns the edge label (relationship type).
36
- */
37
- readonly label: string;
38
- /**
39
- * Returns the source node ID.
40
- */
41
- readonly source: bigint;
42
- /**
43
- * Returns the target node ID.
44
- */
45
- readonly target: bigint;
8
+ free(): void;
9
+ [Symbol.dispose](): void;
10
+ /**
11
+ * Creates a new graph edge.
12
+ *
13
+ * # Arguments
14
+ *
15
+ * * `id` - Unique identifier for the edge
16
+ * * `source` - Source node ID
17
+ * * `target` - Target node ID
18
+ * * `label` - Relationship type (e.g., "KNOWS", "WROTE")
19
+ */
20
+ constructor(id: bigint, source: bigint, target: bigint, label: string);
21
+ /**
22
+ * Sets a numeric property on the edge.
23
+ */
24
+ set_number_property(key: string, value: number): void;
25
+ /**
26
+ * Sets a string property on the edge.
27
+ */
28
+ set_string_property(key: string, value: string): void;
29
+ /**
30
+ * Converts to JSON for JavaScript interop.
31
+ */
32
+ to_json(): any;
33
+ /**
34
+ * Returns the edge ID.
35
+ */
36
+ readonly id: bigint;
37
+ /**
38
+ * Returns the edge label (relationship type).
39
+ */
40
+ readonly label: string;
41
+ /**
42
+ * Returns the source node ID.
43
+ */
44
+ readonly source: bigint;
45
+ /**
46
+ * Returns the target node ID.
47
+ */
48
+ readonly target: bigint;
46
49
  }
47
50
 
51
+ /**
52
+ * A graph node for knowledge graph construction.
53
+ */
48
54
  export class GraphNode {
49
- free(): void;
50
- [Symbol.dispose](): void;
51
- /**
52
- * Returns true if this node has a vector embedding.
53
- */
54
- has_vector(): boolean;
55
- /**
56
- * Sets a vector embedding on the node.
57
- */
58
- set_vector(vector: Float32Array): void;
59
- /**
60
- * Sets a boolean property on the node.
61
- */
62
- set_bool_property(key: string, value: boolean): void;
63
- /**
64
- * Sets a numeric property on the node.
65
- */
66
- set_number_property(key: string, value: number): void;
67
- /**
68
- * Sets a string property on the node.
69
- */
70
- set_string_property(key: string, value: string): void;
71
- /**
72
- * Creates a new graph node.
73
- *
74
- * # Arguments
75
- *
76
- * * `id` - Unique identifier for the node
77
- * * `label` - Node type/label (e.g., "Person", "Document")
78
- */
79
- constructor(id: bigint, label: string);
80
- /**
81
- * Converts to JSON for JavaScript interop.
82
- */
83
- to_json(): any;
84
- /**
85
- * Returns the node ID.
86
- */
87
- readonly id: bigint;
88
- /**
89
- * Returns the node label.
90
- */
91
- readonly label: string;
55
+ free(): void;
56
+ [Symbol.dispose](): void;
57
+ /**
58
+ * Returns true if this node has a vector embedding.
59
+ */
60
+ has_vector(): boolean;
61
+ /**
62
+ * Creates a new graph node.
63
+ *
64
+ * # Arguments
65
+ *
66
+ * * `id` - Unique identifier for the node
67
+ * * `label` - Node type/label (e.g., "Person", "Document")
68
+ */
69
+ constructor(id: bigint, label: string);
70
+ /**
71
+ * Sets a boolean property on the node.
72
+ */
73
+ set_bool_property(key: string, value: boolean): void;
74
+ /**
75
+ * Sets a numeric property on the node.
76
+ */
77
+ set_number_property(key: string, value: number): void;
78
+ /**
79
+ * Sets a string property on the node.
80
+ */
81
+ set_string_property(key: string, value: string): void;
82
+ /**
83
+ * Sets a vector embedding on the node.
84
+ */
85
+ set_vector(vector: Float32Array): void;
86
+ /**
87
+ * Converts to JSON for JavaScript interop.
88
+ */
89
+ to_json(): any;
90
+ /**
91
+ * Returns the node ID.
92
+ */
93
+ readonly id: bigint;
94
+ /**
95
+ * Returns the node label.
96
+ */
97
+ readonly label: string;
92
98
  }
93
99
 
100
+ /**
101
+ * `IndexedDB` persistence manager for `GraphStore`.
102
+ */
94
103
  export class GraphPersistence {
95
- free(): void;
96
- [Symbol.dispose](): void;
97
- /**
98
- * Lists all saved graph names.
99
- */
100
- list_graphs(): Promise<Array<any>>;
101
- /**
102
- * Deletes a saved graph by name.
103
- *
104
- * BUG-7 FIX: Also deletes all nodes and edges with the graph prefix.
105
- */
106
- delete_graph(graph_name: string): Promise<void>;
107
- /**
108
- * Gets metadata for a saved graph.
109
- */
110
- get_metadata(graph_name: string): Promise<any>;
111
- /**
112
- * Creates a new `GraphPersistence` instance (call `init()` to open database).
113
- */
114
- constructor();
115
- /**
116
- * Initializes the database connection. Must be called before save/load.
117
- */
118
- init(): Promise<void>;
119
- /**
120
- * Loads a graph from `IndexedDB` by name.
121
- *
122
- * BUG-6 FIX: Only loads nodes/edges with keys prefixed by `{graph_name}:`
123
- */
124
- load(graph_name: string): Promise<GraphStore>;
125
- /**
126
- * Saves a graph to `IndexedDB` with the given name.
127
- */
128
- save(graph_name: string, store: GraphStore): Promise<void>;
104
+ free(): void;
105
+ [Symbol.dispose](): void;
106
+ /**
107
+ * Deletes a saved graph by name.
108
+ *
109
+ * BUG-7 FIX: Also deletes all nodes and edges with the graph prefix.
110
+ */
111
+ delete_graph(graph_name: string): Promise<void>;
112
+ /**
113
+ * Gets metadata for a saved graph.
114
+ */
115
+ get_metadata(graph_name: string): Promise<any>;
116
+ /**
117
+ * Initializes the database connection. Must be called before save/load.
118
+ */
119
+ init(): Promise<void>;
120
+ /**
121
+ * Lists all saved graph names.
122
+ */
123
+ list_graphs(): Promise<Array<any>>;
124
+ /**
125
+ * Loads a graph from `IndexedDB` by name.
126
+ *
127
+ * BUG-6 FIX: Only loads nodes/edges with keys prefixed by `{graph_name}:`
128
+ */
129
+ load(graph_name: string): Promise<GraphStore>;
130
+ /**
131
+ * Creates a new `GraphPersistence` instance (call `init()` to open database).
132
+ */
133
+ constructor();
134
+ /**
135
+ * Saves a graph to `IndexedDB` with the given name.
136
+ */
137
+ save(graph_name: string, store: GraphStore): Promise<void>;
129
138
  }
130
139
 
140
+ /**
141
+ * In-memory graph store for browser-based knowledge graphs.
142
+ *
143
+ * Stores nodes and edges with bidirectional indexing for efficient traversal.
144
+ */
131
145
  export class GraphStore {
132
- free(): void;
133
- [Symbol.dispose](): void;
134
- /**
135
- * Gets the degree (number of outgoing edges) of a node.
136
- */
137
- out_degree(node_id: bigint): number;
138
- /**
139
- * Removes an edge by ID.
140
- */
141
- remove_edge(edge_id: bigint): void;
142
- /**
143
- * Removes a node and all connected edges.
144
- */
145
- remove_node(node_id: bigint): void;
146
- /**
147
- * Performs BFS traversal from a source node.
148
- *
149
- * # Arguments
150
- *
151
- * * `source_id` - Starting node ID
152
- * * `max_depth` - Maximum traversal depth
153
- * * `limit` - Maximum number of results
154
- *
155
- * # Returns
156
- *
157
- * Array of reachable node IDs with their depths.
158
- */
159
- bfs_traverse(source_id: bigint, max_depth: number, limit: number): any;
160
- /**
161
- * Performs DFS traversal from a source node.
162
- *
163
- * # Arguments
164
- *
165
- * * `source_id` - Starting node ID
166
- * * `max_depth` - Maximum traversal depth
167
- * * `limit` - Maximum number of results
168
- *
169
- * # Returns
170
- *
171
- * Array of reachable node IDs with their depths (depth-first order).
172
- */
173
- dfs_traverse(source_id: bigint, max_depth: number, limit: number): any;
174
- /**
175
- * Gets incoming edges to a node.
176
- */
177
- get_incoming(node_id: bigint): GraphEdge[];
178
- /**
179
- * Gets outgoing edges from a node.
180
- */
181
- get_outgoing(node_id: bigint): GraphEdge[];
182
- /**
183
- * Gets neighbors reachable from a node (1-hop).
184
- */
185
- get_neighbors(node_id: bigint): BigUint64Array;
186
- /**
187
- * Gets all edge IDs in the graph.
188
- */
189
- get_all_edge_ids(): BigUint64Array;
190
- /**
191
- * Gets all node IDs in the graph.
192
- */
193
- get_all_node_ids(): BigUint64Array;
194
- /**
195
- * Gets all edges with a specific label.
196
- *
197
- * # Arguments
198
- *
199
- * * `label` - The relationship type to filter by
200
- *
201
- * # Returns
202
- *
203
- * Array of edges matching the label.
204
- */
205
- get_edges_by_label(label: string): GraphEdge[];
206
- /**
207
- * Gets all nodes with a specific label.
208
- *
209
- * # Arguments
210
- *
211
- * * `label` - The label to filter by
212
- *
213
- * # Returns
214
- *
215
- * Array of nodes matching the label.
216
- */
217
- get_nodes_by_label(label: string): GraphNode[];
218
- /**
219
- * Gets outgoing edges filtered by label.
220
- */
221
- get_outgoing_by_label(node_id: bigint, label: string): GraphEdge[];
222
- /**
223
- * Creates a new empty graph store.
224
- */
225
- constructor();
226
- /**
227
- * Clears all nodes and edges.
228
- */
229
- clear(): void;
230
- /**
231
- * Adds an edge to the graph.
232
- *
233
- * Returns an error if an edge with the same ID already exists.
234
- */
235
- add_edge(edge: GraphEdge): void;
236
- /**
237
- * Adds a node to the graph.
238
- */
239
- add_node(node: GraphNode): void;
240
- /**
241
- * Gets an edge by ID.
242
- */
243
- get_edge(id: bigint): GraphEdge | undefined;
244
- /**
245
- * Gets a node by ID.
246
- */
247
- get_node(id: bigint): GraphNode | undefined;
248
- /**
249
- * Checks if an edge exists.
250
- */
251
- has_edge(id: bigint): boolean;
252
- /**
253
- * Checks if a node exists.
254
- */
255
- has_node(id: bigint): boolean;
256
- /**
257
- * Gets the in-degree (number of incoming edges) of a node.
258
- */
259
- in_degree(node_id: bigint): number;
260
- /**
261
- * Returns the number of edges.
262
- */
263
- readonly edge_count: number;
264
- /**
265
- * Returns the number of nodes.
266
- */
267
- readonly node_count: number;
146
+ free(): void;
147
+ [Symbol.dispose](): void;
148
+ /**
149
+ * Adds an edge to the graph.
150
+ *
151
+ * Returns an error if an edge with the same ID already exists.
152
+ */
153
+ add_edge(edge: GraphEdge): void;
154
+ /**
155
+ * Adds a node to the graph.
156
+ */
157
+ add_node(node: GraphNode): void;
158
+ /**
159
+ * Performs BFS traversal from a source node.
160
+ *
161
+ * # Arguments
162
+ *
163
+ * * `source_id` - Starting node ID
164
+ * * `max_depth` - Maximum traversal depth
165
+ * * `limit` - Maximum number of results
166
+ *
167
+ * # Returns
168
+ *
169
+ * Array of reachable node IDs with their depths.
170
+ */
171
+ bfs_traverse(source_id: bigint, max_depth: number, limit: number): any;
172
+ /**
173
+ * Clears all nodes and edges.
174
+ */
175
+ clear(): void;
176
+ /**
177
+ * Performs DFS traversal from a source node.
178
+ *
179
+ * # Arguments
180
+ *
181
+ * * `source_id` - Starting node ID
182
+ * * `max_depth` - Maximum traversal depth
183
+ * * `limit` - Maximum number of results
184
+ *
185
+ * # Returns
186
+ *
187
+ * Array of reachable node IDs with their depths (depth-first order).
188
+ */
189
+ dfs_traverse(source_id: bigint, max_depth: number, limit: number): any;
190
+ /**
191
+ * Gets all edge IDs in the graph.
192
+ */
193
+ get_all_edge_ids(): BigUint64Array;
194
+ /**
195
+ * Gets all node IDs in the graph.
196
+ */
197
+ get_all_node_ids(): BigUint64Array;
198
+ /**
199
+ * Gets an edge by ID.
200
+ */
201
+ get_edge(id: bigint): GraphEdge | undefined;
202
+ /**
203
+ * Gets all edges with a specific label.
204
+ *
205
+ * # Arguments
206
+ *
207
+ * * `label` - The relationship type to filter by
208
+ *
209
+ * # Returns
210
+ *
211
+ * Array of edges matching the label.
212
+ */
213
+ get_edges_by_label(label: string): GraphEdge[];
214
+ /**
215
+ * Gets incoming edges to a node.
216
+ */
217
+ get_incoming(node_id: bigint): GraphEdge[];
218
+ /**
219
+ * Gets neighbors reachable from a node (1-hop).
220
+ */
221
+ get_neighbors(node_id: bigint): BigUint64Array;
222
+ /**
223
+ * Gets a node by ID.
224
+ */
225
+ get_node(id: bigint): GraphNode | undefined;
226
+ /**
227
+ * Gets all nodes with a specific label.
228
+ *
229
+ * # Arguments
230
+ *
231
+ * * `label` - The label to filter by
232
+ *
233
+ * # Returns
234
+ *
235
+ * Array of nodes matching the label.
236
+ */
237
+ get_nodes_by_label(label: string): GraphNode[];
238
+ /**
239
+ * Gets outgoing edges from a node.
240
+ */
241
+ get_outgoing(node_id: bigint): GraphEdge[];
242
+ /**
243
+ * Gets outgoing edges filtered by label.
244
+ */
245
+ get_outgoing_by_label(node_id: bigint, label: string): GraphEdge[];
246
+ /**
247
+ * Checks if an edge exists.
248
+ */
249
+ has_edge(id: bigint): boolean;
250
+ /**
251
+ * Checks if a node exists.
252
+ */
253
+ has_node(id: bigint): boolean;
254
+ /**
255
+ * Gets the in-degree (number of incoming edges) of a node.
256
+ */
257
+ in_degree(node_id: bigint): number;
258
+ /**
259
+ * Creates a new empty graph store.
260
+ */
261
+ constructor();
262
+ /**
263
+ * Gets the degree (number of outgoing edges) of a node.
264
+ */
265
+ out_degree(node_id: bigint): number;
266
+ /**
267
+ * Removes an edge by ID.
268
+ */
269
+ remove_edge(edge_id: bigint): void;
270
+ /**
271
+ * Removes a node and all connected edges.
272
+ */
273
+ remove_node(node_id: bigint): void;
274
+ /**
275
+ * Returns the number of edges.
276
+ */
277
+ readonly edge_count: number;
278
+ /**
279
+ * Returns the number of nodes.
280
+ */
281
+ readonly node_count: number;
268
282
  }
269
283
 
284
+ /**
285
+ * Configuration for Web Worker traversal decisions.
286
+ */
270
287
  export class GraphWorkerConfig {
271
- free(): void;
272
- [Symbol.dispose](): void;
273
- /**
274
- * Creates a configuration optimized for large graphs.
275
- */
276
- static for_large_graphs(): GraphWorkerConfig;
277
- /**
278
- * Creates a configuration optimized for responsive UI.
279
- */
280
- static for_responsive_ui(): GraphWorkerConfig;
281
- /**
282
- * Creates a new configuration with default values.
283
- */
284
- constructor();
285
- /**
286
- * Minimum node count to trigger worker offload.
287
- */
288
- node_threshold: number;
289
- /**
290
- * Minimum depth to trigger worker offload.
291
- */
292
- depth_threshold: number;
293
- /**
294
- * Progress callback interval in milliseconds.
295
- */
296
- progress_interval_ms: number;
297
- /**
298
- * Whether to use `SharedArrayBuffer` for result transfer (if available).
299
- */
300
- use_shared_buffer: boolean;
288
+ free(): void;
289
+ [Symbol.dispose](): void;
290
+ /**
291
+ * Creates a configuration optimized for large graphs.
292
+ */
293
+ static for_large_graphs(): GraphWorkerConfig;
294
+ /**
295
+ * Creates a configuration optimized for responsive UI.
296
+ */
297
+ static for_responsive_ui(): GraphWorkerConfig;
298
+ /**
299
+ * Creates a new configuration with default values.
300
+ */
301
+ constructor();
302
+ /**
303
+ * Minimum depth to trigger worker offload.
304
+ */
305
+ depth_threshold: number;
306
+ /**
307
+ * Minimum node count to trigger worker offload.
308
+ */
309
+ node_threshold: number;
310
+ /**
311
+ * Progress callback interval in milliseconds.
312
+ */
313
+ progress_interval_ms: number;
314
+ /**
315
+ * Whether to use `SharedArrayBuffer` for result transfer (if available).
316
+ */
317
+ use_shared_buffer: boolean;
301
318
  }
302
319
 
320
+ /**
321
+ * A parsed `VelesQL` statement with introspection methods.
322
+ */
303
323
  export class ParsedQuery {
304
- private constructor();
305
- free(): void;
306
- [Symbol.dispose](): void;
307
- /**
308
- * Check if the query uses FUSION (hybrid search).
309
- */
310
- readonly hasFusion: boolean;
311
- /**
312
- * Get the number of JOIN clauses.
313
- */
314
- readonly joinCount: number;
315
- /**
316
- * Get the table name from the FROM clause.
317
- */
318
- readonly tableName: string | undefined;
319
- /**
320
- * Get the LIMIT from the MATCH RETURN clause.
321
- */
322
- readonly matchLimit: bigint | undefined;
323
- /**
324
- * Check if DISTINCT modifier is present.
325
- */
326
- readonly hasDistinct: boolean;
327
- /**
328
- * Check if the query has a GROUP BY clause.
329
- */
330
- readonly hasGroupBy: boolean;
331
- /**
332
- * Check if the query has an ORDER BY clause.
333
- */
334
- readonly hasOrderBy: boolean;
335
- /**
336
- * Check if the MATCH clause has a WHERE condition.
337
- */
338
- readonly matchHasWhere: boolean;
339
- /**
340
- * Check if the query has a WHERE clause.
341
- */
342
- readonly hasWhereClause: boolean;
343
- /**
344
- * Get the number of node patterns in the MATCH clause.
345
- */
346
- readonly matchNodeCount: number;
347
- /**
348
- * Check if the query contains vector search (NEAR clause).
349
- */
350
- readonly hasVectorSearch: boolean;
351
- /**
352
- * Get node labels from the MATCH clause as JSON array of arrays.
353
- * Each inner array contains the labels for one node pattern.
354
- */
355
- readonly matchNodeLabels: any;
356
- /**
357
- * Get RETURN items from the MATCH clause as JSON array.
358
- */
359
- readonly matchReturnItems: any;
360
- /**
361
- * Get the number of relationship patterns in the MATCH clause.
362
- */
363
- readonly matchRelationshipCount: number;
364
- /**
365
- * Get relationship types from the MATCH clause as JSON array of arrays.
366
- * Each inner array contains the types for one relationship pattern.
367
- */
368
- readonly matchRelationshipTypes: any;
369
- /**
370
- * Get the LIMIT value if present.
371
- */
372
- readonly limit: bigint | undefined;
373
- /**
374
- * Get the OFFSET value if present.
375
- */
376
- readonly offset: bigint | undefined;
377
- /**
378
- * Get the list of selected columns as JSON array.
379
- */
380
- readonly columns: any;
381
- /**
382
- * Get the GROUP BY columns as JSON array.
383
- */
384
- readonly groupBy: any;
385
- /**
386
- * Check if this is a MATCH (graph) query.
387
- */
388
- readonly isMatch: boolean;
389
- /**
390
- * Check if the query is valid (always true for successfully parsed queries).
391
- */
392
- readonly isValid: boolean;
393
- /**
394
- * Get the ORDER BY columns and directions as JSON array.
395
- */
396
- readonly orderBy: any;
397
- /**
398
- * Check if the query has JOINs.
399
- */
400
- readonly hasJoins: boolean;
401
- /**
402
- * Check if this is a SELECT query.
403
- */
404
- readonly isSelect: boolean;
324
+ private constructor();
325
+ free(): void;
326
+ [Symbol.dispose](): void;
327
+ /**
328
+ * Get the list of selected columns as JSON array.
329
+ */
330
+ readonly columns: any;
331
+ /**
332
+ * Get the GROUP BY columns as JSON array.
333
+ */
334
+ readonly groupBy: any;
335
+ /**
336
+ * Check if DISTINCT modifier is present.
337
+ */
338
+ readonly hasDistinct: boolean;
339
+ /**
340
+ * Check if the query uses FUSION (hybrid search).
341
+ */
342
+ readonly hasFusion: boolean;
343
+ /**
344
+ * Check if the query has a GROUP BY clause.
345
+ */
346
+ readonly hasGroupBy: boolean;
347
+ /**
348
+ * Check if the query has JOINs.
349
+ */
350
+ readonly hasJoins: boolean;
351
+ /**
352
+ * Check if the query has an ORDER BY clause.
353
+ */
354
+ readonly hasOrderBy: boolean;
355
+ /**
356
+ * Check if the query contains vector search (NEAR clause).
357
+ */
358
+ readonly hasVectorSearch: boolean;
359
+ /**
360
+ * Check if the query has a WHERE clause.
361
+ */
362
+ readonly hasWhereClause: boolean;
363
+ /**
364
+ * Check if this is a MATCH (graph) query.
365
+ */
366
+ readonly isMatch: boolean;
367
+ /**
368
+ * Check if this is a SELECT query.
369
+ */
370
+ readonly isSelect: boolean;
371
+ /**
372
+ * Check if the query is valid (always true for successfully parsed queries).
373
+ */
374
+ readonly isValid: boolean;
375
+ /**
376
+ * Get the number of JOIN clauses.
377
+ */
378
+ readonly joinCount: number;
379
+ /**
380
+ * Get the LIMIT value if present.
381
+ */
382
+ readonly limit: bigint | undefined;
383
+ /**
384
+ * Check if the MATCH clause has a WHERE condition.
385
+ */
386
+ readonly matchHasWhere: boolean;
387
+ /**
388
+ * Get the LIMIT from the MATCH RETURN clause.
389
+ */
390
+ readonly matchLimit: bigint | undefined;
391
+ /**
392
+ * Get the number of node patterns in the MATCH clause.
393
+ */
394
+ readonly matchNodeCount: number;
395
+ /**
396
+ * Get node labels from the MATCH clause as JSON array of arrays.
397
+ * Each inner array contains the labels for one node pattern.
398
+ */
399
+ readonly matchNodeLabels: any;
400
+ /**
401
+ * Get the number of relationship patterns in the MATCH clause.
402
+ */
403
+ readonly matchRelationshipCount: number;
404
+ /**
405
+ * Get relationship types from the MATCH clause as JSON array of arrays.
406
+ * Each inner array contains the types for one relationship pattern.
407
+ */
408
+ readonly matchRelationshipTypes: any;
409
+ /**
410
+ * Get RETURN items from the MATCH clause as JSON array.
411
+ */
412
+ readonly matchReturnItems: any;
413
+ /**
414
+ * Get the OFFSET value if present.
415
+ */
416
+ readonly offset: bigint | undefined;
417
+ /**
418
+ * Get the ORDER BY columns and directions as JSON array.
419
+ */
420
+ readonly orderBy: any;
421
+ /**
422
+ * Get the table name from the FROM clause.
423
+ */
424
+ readonly tableName: string | undefined;
405
425
  }
406
426
 
427
+ /**
428
+ * Semantic Memory for AI agents in WASM.
429
+ *
430
+ * Stores knowledge facts as vectors with similarity search.
431
+ *
432
+ * # Example (JavaScript)
433
+ *
434
+ * ```javascript
435
+ * import { SemanticMemory } from 'velesdb-wasm';
436
+ *
437
+ * const memory = new SemanticMemory(384);
438
+ * memory.store(1, "Paris is the capital of France", embedding);
439
+ * const results = memory.query(queryEmbedding, 5);
440
+ * ```
441
+ */
407
442
  export class SemanticMemory {
408
- free(): void;
409
- [Symbol.dispose](): void;
410
- /**
411
- * Returns the number of stored knowledge facts.
412
- */
413
- len(): number;
414
- /**
415
- * Creates a new `SemanticMemory` with the given embedding dimension.
416
- */
417
- constructor(dimension: number);
418
- /**
419
- * Clears all knowledge facts.
420
- */
421
- clear(): void;
422
- /**
423
- * Queries semantic memory by similarity search.
424
- *
425
- * Returns a JSON array of {id, score, content} objects.
426
- */
427
- query(embedding: Float32Array, top_k: number): any;
428
- /**
429
- * Stores a knowledge fact with its embedding vector.
430
- *
431
- * # Arguments
432
- *
433
- * * `id` - Unique identifier for this fact
434
- * * `content` - Text content of the knowledge
435
- * * `embedding` - Vector representation (`Float32Array`)
436
- */
437
- store(id: bigint, content: string, embedding: Float32Array): void;
438
- /**
439
- * Removes a knowledge fact by ID.
440
- */
441
- remove(id: bigint): boolean;
442
- /**
443
- * Returns true if no knowledge facts are stored.
444
- */
445
- is_empty(): boolean;
446
- /**
447
- * Returns the embedding dimension.
448
- */
449
- dimension(): number;
443
+ free(): void;
444
+ [Symbol.dispose](): void;
445
+ /**
446
+ * Clears all knowledge facts.
447
+ */
448
+ clear(): void;
449
+ /**
450
+ * Returns the embedding dimension.
451
+ */
452
+ dimension(): number;
453
+ /**
454
+ * Returns true if no knowledge facts are stored.
455
+ */
456
+ is_empty(): boolean;
457
+ /**
458
+ * Returns the number of stored knowledge facts.
459
+ */
460
+ len(): number;
461
+ /**
462
+ * Creates a new `SemanticMemory` with the given embedding dimension.
463
+ */
464
+ constructor(dimension: number);
465
+ /**
466
+ * Queries semantic memory by similarity search.
467
+ *
468
+ * Returns a JSON array of {id, score, content} objects.
469
+ */
470
+ query(embedding: Float32Array, top_k: number): any;
471
+ /**
472
+ * Removes a knowledge fact by ID.
473
+ */
474
+ remove(id: bigint): boolean;
475
+ /**
476
+ * Stores a knowledge fact with its embedding vector.
477
+ *
478
+ * # Arguments
479
+ *
480
+ * * `id` - Unique identifier for this fact
481
+ * * `content` - Text content of the knowledge
482
+ * * `embedding` - Vector representation (`Float32Array`)
483
+ */
484
+ store(id: bigint, content: string, embedding: Float32Array): void;
485
+ }
486
+
487
+ /**
488
+ * In-memory sparse inverted index for WASM.
489
+ *
490
+ * Uses a `BTreeMap<u32, Vec<(u64, f32)>>` as posting lists.
491
+ */
492
+ export class SparseIndex {
493
+ free(): void;
494
+ [Symbol.dispose](): void;
495
+ /**
496
+ * Inserts a document with the given sparse vector.
497
+ *
498
+ * `indices` and `values` must have the same length.
499
+ */
500
+ insert(doc_id: bigint, indices: Uint32Array, values: Float32Array): void;
501
+ /**
502
+ * Creates a new empty sparse index.
503
+ */
504
+ constructor();
505
+ /**
506
+ * Searches the index with the given sparse query vector.
507
+ *
508
+ * Returns a JSON array of `{doc_id, score}` objects, sorted by score descending.
509
+ */
510
+ search(query_indices: Uint32Array, query_values: Float32Array, k: number): any;
511
+ /**
512
+ * Returns the number of documents in the index.
513
+ */
514
+ readonly doc_count: number;
450
515
  }
451
516
 
452
517
  /**
453
518
  * Storage mode for vector quantization.
454
519
  */
455
520
  export enum StorageMode {
456
- /**
457
- * Full f32 precision (4 bytes per dimension)
458
- */
459
- Full = 0,
460
- /**
461
- * SQ8: 8-bit scalar quantization (1 byte per dimension, 4x compression)
462
- */
463
- SQ8 = 1,
464
- /**
465
- * Binary: 1-bit quantization (1 bit per dimension, 32x compression)
466
- */
467
- Binary = 2,
521
+ /**
522
+ * Full f32 precision (4 bytes per dimension)
523
+ */
524
+ Full = 0,
525
+ /**
526
+ * SQ8: 8-bit scalar quantization (1 byte per dimension, 4x compression)
527
+ */
528
+ SQ8 = 1,
529
+ /**
530
+ * Binary: 1-bit quantization (1 bit per dimension, 32x compression)
531
+ */
532
+ Binary = 2,
533
+ /**
534
+ * Product Quantization — **WASM limitation**: PQ requires `rayon`/`persistence`
535
+ * which are unavailable in WASM. This variant uses the SQ8 codepath as a
536
+ * fallback. For true PQ, use the native `velesdb-core` crate.
537
+ */
538
+ ProductQuantization = 3,
468
539
  }
469
540
 
541
+ /**
542
+ * Progress information for long-running traversals.
543
+ */
470
544
  export class TraversalProgress {
471
- free(): void;
472
- [Symbol.dispose](): void;
473
- /**
474
- * Creates a new progress report.
475
- */
476
- constructor(visited: number, estimated: number, depth: number);
477
- /**
478
- * Converts to JSON for postMessage.
479
- */
480
- to_json(): any;
481
- /**
482
- * Returns the completion percentage (0-100).
483
- */
484
- readonly percentage: number;
485
- /**
486
- * Number of nodes visited so far.
487
- */
488
- visited_count: number;
489
- /**
490
- * Estimated total nodes to visit (heuristic).
491
- */
492
- estimated_total: number;
493
- /**
494
- * Current traversal depth.
495
- */
496
- current_depth: number;
497
- /**
498
- * Whether the traversal is complete.
499
- */
500
- is_complete: boolean;
501
- /**
502
- * Whether the traversal was cancelled.
503
- */
504
- is_cancelled: boolean;
545
+ free(): void;
546
+ [Symbol.dispose](): void;
547
+ /**
548
+ * Creates a new progress report.
549
+ */
550
+ constructor(visited: number, estimated: number, depth: number);
551
+ /**
552
+ * Converts to JSON for postMessage.
553
+ */
554
+ to_json(): any;
555
+ /**
556
+ * Current traversal depth.
557
+ */
558
+ current_depth: number;
559
+ /**
560
+ * Estimated total nodes to visit (heuristic).
561
+ */
562
+ estimated_total: number;
563
+ /**
564
+ * Whether the traversal was cancelled.
565
+ */
566
+ is_cancelled: boolean;
567
+ /**
568
+ * Whether the traversal is complete.
569
+ */
570
+ is_complete: boolean;
571
+ /**
572
+ * Number of nodes visited so far.
573
+ */
574
+ visited_count: number;
575
+ /**
576
+ * Returns the completion percentage (0-100).
577
+ */
578
+ readonly percentage: number;
505
579
  }
506
580
 
581
+ /**
582
+ * A vector store for in-memory vector search.
583
+ *
584
+ * # Performance
585
+ *
586
+ * Uses contiguous memory layout for optimal cache locality and fast
587
+ * serialization. Vector data is stored in a single buffer rather than
588
+ * individual Vec allocations.
589
+ *
590
+ * # Storage Modes
591
+ *
592
+ * - `Full`: f32 precision, best recall
593
+ * - `SQ8`: 4x memory reduction, ~1% recall loss
594
+ * - `Binary`: 32x memory reduction, ~5-10% recall loss
595
+ */
507
596
  export class VectorStore {
508
- free(): void;
509
- [Symbol.dispose](): void;
510
- /**
511
- * Text search on payload fields (substring matching).
512
- */
513
- text_search(query: string, k: number, field?: string | null): any;
514
- /**
515
- * Batch search for multiple vectors. Returns [[[id, score], ...], ...].
516
- */
517
- batch_search(vectors: Float32Array, num_vectors: number, k: number): any;
518
- /**
519
- * Batch insert. Input: `[[id, Float32Array], ...]`.
520
- */
521
- insert_batch(batch: any): void;
522
- /**
523
- * Returns memory usage estimate in bytes.
524
- */
525
- memory_usage(): number;
526
- /**
527
- * Hybrid search (vector + text). `vector_weight` 0-1 (default 0.5).
528
- */
529
- hybrid_search(query_vector: Float32Array, text_query: string, k: number, vector_weight?: number | null): any;
530
- /**
531
- * Creates store with mode: full (4B/dim), sq8 (4x compression), binary (32x).
532
- */
533
- static new_with_mode(dimension: number, metric: string, mode: string): VectorStore;
534
- /**
535
- * Creates store with pre-allocated capacity.
536
- */
537
- static with_capacity(dimension: number, metric: string, capacity: number): VectorStore;
538
- /**
539
- * Deletes `IndexedDB` database.
540
- */
541
- static delete_database(db_name: string): Promise<void>;
542
- /**
543
- * Exports to binary format for IndexedDB/localStorage.
544
- */
545
- export_to_bytes(): Uint8Array;
546
- /**
547
- * Imports from binary format.
548
- */
549
- static import_from_bytes(bytes: Uint8Array): VectorStore;
550
- /**
551
- * Creates a metadata-only store (no vectors, only payloads).
552
- */
553
- static new_metadata_only(): VectorStore;
554
- /**
555
- * Similarity search with threshold. Operators: >, >=, <, <=, =, !=.
556
- */
557
- similarity_search(query: Float32Array, threshold: number, operator: string, k: number): any;
558
- /**
559
- * Multi-query search with fusion. Strategies: average, maximum, rrf.
560
- */
561
- multi_query_search(vectors: Float32Array, num_vectors: number, k: number, strategy: string, rrf_k?: number | null): any;
562
- /**
563
- * Searches with metadata filtering. Returns [{id, score, payload}].
564
- */
565
- search_with_filter(query: Float32Array, k: number, filter: any): any;
566
- /**
567
- * Inserts a vector with ID and optional JSON payload.
568
- */
569
- insert_with_payload(id: bigint, vector: Float32Array, payload: any): void;
570
- /**
571
- * Gets a vector by ID. Returns {id, vector, payload} or null.
572
- */
573
- get(id: bigint): any;
574
- /**
575
- * Creates a new vector store. Metrics: cosine, euclidean, dot, hamming, jaccard.
576
- */
577
- constructor(dimension: number, metric: string);
578
- /**
579
- * Loads from `IndexedDB`.
580
- */
581
- static load(db_name: string): Promise<VectorStore>;
582
- /**
583
- * Saves to `IndexedDB`.
584
- */
585
- save(db_name: string): Promise<void>;
586
- /**
587
- * Clears all vectors from the store.
588
- */
589
- clear(): void;
590
- /**
591
- * VelesQL-style query returning multi-model results (EPIC-031 US-009).
592
- *
593
- * Returns results in `HybridResult` format with `node_id`, `vector_score`,
594
- * `graph_score`, `fused_score`, `bindings`, and `column_data`.
595
- *
596
- * # Arguments
597
- * * `query_vector` - Query vector for similarity search
598
- * * `k` - Number of results to return
599
- *
600
- * # Returns
601
- * Array of `{nodeId, vectorScore, graphScore, fusedScore, bindings, columnData}`
602
- */
603
- query(query_vector: Float32Array, k: number): any;
604
- /**
605
- * Inserts a vector with the given ID.
606
- */
607
- insert(id: bigint, vector: Float32Array): void;
608
- /**
609
- * Removes a vector by ID.
610
- */
611
- remove(id: bigint): boolean;
612
- /**
613
- * k-NN search. Returns [[id, score], ...].
614
- */
615
- search(query: Float32Array, k: number): any;
616
- /**
617
- * Pre-allocates memory for additional vectors.
618
- */
619
- reserve(additional: number): void;
620
- /**
621
- * Returns the storage mode.
622
- */
623
- readonly storage_mode: string;
624
- /**
625
- * Returns true if this is a metadata-only store.
626
- */
627
- readonly is_metadata_only: boolean;
628
- /**
629
- * Returns the number of vectors in the store.
630
- */
631
- readonly len: number;
632
- /**
633
- * Returns true if the store is empty.
634
- */
635
- readonly is_empty: boolean;
636
- /**
637
- * Returns the vector dimension.
638
- */
639
- readonly dimension: number;
597
+ free(): void;
598
+ [Symbol.dispose](): void;
599
+ /**
600
+ * Batch search for multiple vectors. Returns [[[id, score], ...], ...].
601
+ */
602
+ batch_search(vectors: Float32Array, num_vectors: number, k: number): any;
603
+ /**
604
+ * Clears all vectors from the store.
605
+ */
606
+ clear(): void;
607
+ /**
608
+ * Deletes `IndexedDB` database.
609
+ */
610
+ static delete_database(db_name: string): Promise<void>;
611
+ /**
612
+ * Exports to binary format for IndexedDB/localStorage.
613
+ */
614
+ export_to_bytes(): Uint8Array;
615
+ /**
616
+ * Gets a vector by ID. Returns {id, vector, payload} or null.
617
+ */
618
+ get(id: bigint): any;
619
+ /**
620
+ * Hybrid search (vector + text). `vector_weight` 0-1 (default 0.5).
621
+ *
622
+ * For `Full` storage mode, this computes per-vector distance and text
623
+ * matching in a single pass. For quantized modes (`SQ8`, `Binary`,
624
+ * `ProductQuantization`), a decomposed approach is used: vector scores
625
+ * are obtained via the quantization-aware `compute_scores` path, text
626
+ * matches are evaluated independently on payloads, and the two result
627
+ * sets are fused with the requested weight. Quantized vector scores are
628
+ * approximate, so recall may differ slightly from `Full` mode.
629
+ *
630
+ * Returns `[{id, score, payload}, ...]` sorted by combined score
631
+ * descending, truncated to `k` results.
632
+ */
633
+ hybrid_search(query_vector: Float32Array, text_query: string, k: number, vector_weight?: number | null): any;
634
+ /**
635
+ * Imports from binary format.
636
+ */
637
+ static import_from_bytes(bytes: Uint8Array): VectorStore;
638
+ /**
639
+ * Inserts a vector with the given ID.
640
+ */
641
+ insert(id: bigint, vector: Float32Array): void;
642
+ /**
643
+ * Batch insert. Input: `[[id, Float32Array], ...]`.
644
+ */
645
+ insert_batch(batch: any): void;
646
+ /**
647
+ * Inserts a vector with ID and optional JSON payload.
648
+ */
649
+ insert_with_payload(id: bigint, vector: Float32Array, payload: any): void;
650
+ /**
651
+ * Loads from `IndexedDB`.
652
+ */
653
+ static load(db_name: string): Promise<VectorStore>;
654
+ /**
655
+ * Returns memory usage estimate in bytes.
656
+ */
657
+ memory_usage(): number;
658
+ /**
659
+ * Multi-query search with fusion. Strategies: average, maximum, rrf.
660
+ */
661
+ multi_query_search(vectors: Float32Array, num_vectors: number, k: number, strategy: string, rrf_k?: number | null): any;
662
+ /**
663
+ * Creates a new vector store. Metrics: cosine, euclidean, dot, hamming, jaccard.
664
+ */
665
+ constructor(dimension: number, metric: string);
666
+ /**
667
+ * Creates a metadata-only store (no vectors, only payloads).
668
+ */
669
+ static new_metadata_only(): VectorStore;
670
+ /**
671
+ * Creates store with mode: full (4B/dim), sq8 (4x compression), binary (32x).
672
+ */
673
+ static new_with_mode(dimension: number, metric: string, mode: string): VectorStore;
674
+ /**
675
+ * VelesQL-style query returning multi-model results (EPIC-031 US-009).
676
+ *
677
+ * Returns results in `HybridResult` format with `node_id`, `vector_score`,
678
+ * `graph_score`, `fused_score`, `bindings`, and `column_data`.
679
+ *
680
+ * # Arguments
681
+ * * `query_vector` - Query vector for similarity search
682
+ * * `k` - Number of results to return
683
+ *
684
+ * # Returns
685
+ * Array of `{nodeId, vectorScore, graphScore, fusedScore, bindings, columnData}`
686
+ */
687
+ query(query_vector: Float32Array, k: number): any;
688
+ /**
689
+ * Removes a vector by ID.
690
+ */
691
+ remove(id: bigint): boolean;
692
+ /**
693
+ * Pre-allocates memory for additional vectors.
694
+ */
695
+ reserve(additional: number): void;
696
+ /**
697
+ * Saves to `IndexedDB`.
698
+ */
699
+ save(db_name: string): Promise<void>;
700
+ /**
701
+ * k-NN search. Returns [[id, score], ...].
702
+ */
703
+ search(query: Float32Array, k: number): any;
704
+ /**
705
+ * Searches with metadata filtering. Returns [{id, score, payload}].
706
+ */
707
+ search_with_filter(query: Float32Array, k: number, filter: any): any;
708
+ /**
709
+ * Similarity search with threshold. Operators: >, >=, <, <=, =, !=.
710
+ */
711
+ similarity_search(query: Float32Array, threshold: number, operator: string, k: number): any;
712
+ /**
713
+ * Inserts a sparse vector into the internal sparse index.
714
+ *
715
+ * Lazily initializes the sparse index on first call.
716
+ */
717
+ sparse_insert(doc_id: bigint, indices: Uint32Array, values: Float32Array): void;
718
+ /**
719
+ * Searches the internal sparse index.
720
+ *
721
+ * Returns a JSON array of `{doc_id, score}` objects sorted by score descending.
722
+ */
723
+ sparse_search(indices: Uint32Array, values: Float32Array, k: number): any;
724
+ /**
725
+ * Text search on payload fields (substring matching).
726
+ */
727
+ text_search(query: string, k: number, field?: string | null): any;
728
+ /**
729
+ * Creates store with pre-allocated capacity.
730
+ */
731
+ static with_capacity(dimension: number, metric: string, capacity: number): VectorStore;
732
+ /**
733
+ * Returns the vector dimension.
734
+ */
735
+ readonly dimension: number;
736
+ /**
737
+ * Returns true if the store is empty.
738
+ */
739
+ readonly is_empty: boolean;
740
+ /**
741
+ * Returns true if this is a metadata-only store.
742
+ */
743
+ readonly is_metadata_only: boolean;
744
+ /**
745
+ * Returns the number of vectors in the store.
746
+ */
747
+ readonly len: number;
748
+ /**
749
+ * Returns the storage mode.
750
+ */
751
+ readonly storage_mode: string;
640
752
  }
641
753
 
754
+ /**
755
+ * `VelesQL` query parser for browser use.
756
+ *
757
+ * # Example (JavaScript)
758
+ *
759
+ * ```javascript
760
+ * import { VelesQL } from 'velesdb-wasm';
761
+ *
762
+ * // Parse a query
763
+ * const parsed = VelesQL.parse("SELECT * FROM docs WHERE category = 'tech' LIMIT 10");
764
+ * console.log(parsed.tableName); // "docs"
765
+ * console.log(parsed.isValid); // true
766
+ *
767
+ * // Validate without parsing
768
+ * const valid = VelesQL.isValid("SELECT * FROM docs"); // true
769
+ * ```
770
+ */
642
771
  export class VelesQL {
643
- private constructor();
644
- free(): void;
645
- [Symbol.dispose](): void;
646
- /**
647
- * Parse a `VelesQL` query string.
648
- *
649
- * Returns a `ParsedQuery` object with query introspection methods.
650
- * Throws an error if the query has syntax errors.
651
- */
652
- static parse(query: string): ParsedQuery;
653
- /**
654
- * Validate a `VelesQL` query without full parsing.
655
- *
656
- * This is faster than `parse()` when you only need to check validity.
657
- */
658
- static isValid(query: string): boolean;
772
+ private constructor();
773
+ free(): void;
774
+ [Symbol.dispose](): void;
775
+ /**
776
+ * Validate a `VelesQL` query without full parsing.
777
+ *
778
+ * This is faster than `parse()` when you only need to check validity.
779
+ */
780
+ static isValid(query: string): boolean;
781
+ /**
782
+ * Parse a `VelesQL` query string.
783
+ *
784
+ * Returns a `ParsedQuery` object with query introspection methods.
785
+ * Throws an error if the query has syntax errors.
786
+ */
787
+ static parse(query: string): ParsedQuery;
659
788
  }
660
789
 
661
790
  /**
@@ -665,6 +794,15 @@ export class VelesQL {
665
794
  */
666
795
  export function estimate_traversal_size(node_count: number, edge_count: number, max_depth: number): number;
667
796
 
797
+ /**
798
+ * Fuses pre-computed dense and sparse search results using Reciprocal Rank Fusion (RRF).
799
+ *
800
+ * Both `dense_results` and `sparse_results` should be JSON arrays of `[doc_id, score]` pairs.
801
+ * Returns a JSON array of `{doc_id, score}` objects, sorted by fused score descending,
802
+ * truncated to the top `k` entries.
803
+ */
804
+ export function hybrid_search_fuse(dense_results: any, sparse_results: any, rrf_k: number, k: number): any;
805
+
668
806
  /**
669
807
  * Determines whether a traversal should be offloaded to a Web Worker.
670
808
  *
@@ -681,185 +819,193 @@ export function should_use_worker(node_count: number, max_depth: number, config?
681
819
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
682
820
 
683
821
  export interface InitOutput {
684
- readonly memory: WebAssembly.Memory;
685
- readonly __wbg_get_graphworkerconfig_depth_threshold: (a: number) => number;
686
- readonly __wbg_get_graphworkerconfig_node_threshold: (a: number) => number;
687
- readonly __wbg_get_graphworkerconfig_progress_interval_ms: (a: number) => number;
688
- readonly __wbg_get_graphworkerconfig_use_shared_buffer: (a: number) => number;
689
- readonly __wbg_get_traversalprogress_is_cancelled: (a: number) => number;
690
- readonly __wbg_graphedge_free: (a: number, b: number) => void;
691
- readonly __wbg_graphnode_free: (a: number, b: number) => void;
692
- readonly __wbg_graphpersistence_free: (a: number, b: number) => void;
693
- readonly __wbg_graphstore_free: (a: number, b: number) => void;
694
- readonly __wbg_graphworkerconfig_free: (a: number, b: number) => void;
695
- readonly __wbg_parsedquery_free: (a: number, b: number) => void;
696
- readonly __wbg_semanticmemory_free: (a: number, b: number) => void;
697
- readonly __wbg_set_graphworkerconfig_depth_threshold: (a: number, b: number) => void;
698
- readonly __wbg_set_graphworkerconfig_node_threshold: (a: number, b: number) => void;
699
- readonly __wbg_set_graphworkerconfig_progress_interval_ms: (a: number, b: number) => void;
700
- readonly __wbg_set_graphworkerconfig_use_shared_buffer: (a: number, b: number) => void;
701
- readonly __wbg_set_traversalprogress_is_cancelled: (a: number, b: number) => void;
702
- readonly __wbg_vectorstore_free: (a: number, b: number) => void;
703
- readonly __wbg_velesql_free: (a: number, b: number) => void;
704
- readonly estimate_traversal_size: (a: number, b: number, c: number) => number;
705
- readonly graphedge_id: (a: number) => bigint;
706
- readonly graphedge_label: (a: number, b: number) => void;
707
- readonly graphedge_new: (a: number, b: bigint, c: bigint, d: bigint, e: number, f: number) => void;
708
- readonly graphedge_set_number_property: (a: number, b: number, c: number, d: number) => void;
709
- readonly graphedge_set_string_property: (a: number, b: number, c: number, d: number, e: number) => void;
710
- readonly graphedge_source: (a: number) => bigint;
711
- readonly graphedge_target: (a: number) => bigint;
712
- readonly graphedge_to_json: (a: number, b: number) => void;
713
- readonly graphnode_has_vector: (a: number) => number;
714
- readonly graphnode_label: (a: number, b: number) => void;
715
- readonly graphnode_new: (a: bigint, b: number, c: number) => number;
716
- readonly graphnode_set_bool_property: (a: number, b: number, c: number, d: number) => void;
717
- readonly graphnode_set_number_property: (a: number, b: number, c: number, d: number) => void;
718
- readonly graphnode_set_string_property: (a: number, b: number, c: number, d: number, e: number) => void;
719
- readonly graphnode_set_vector: (a: number, b: number, c: number) => void;
720
- readonly graphnode_to_json: (a: number, b: number) => void;
721
- readonly graphpersistence_delete_graph: (a: number, b: number, c: number) => number;
722
- readonly graphpersistence_get_metadata: (a: number, b: number, c: number) => number;
723
- readonly graphpersistence_init: (a: number) => number;
724
- readonly graphpersistence_list_graphs: (a: number) => number;
725
- readonly graphpersistence_load: (a: number, b: number, c: number) => number;
726
- readonly graphpersistence_new: () => number;
727
- readonly graphpersistence_save: (a: number, b: number, c: number, d: number) => number;
728
- readonly graphstore_add_edge: (a: number, b: number, c: number) => void;
729
- readonly graphstore_add_node: (a: number, b: number) => void;
730
- readonly graphstore_bfs_traverse: (a: number, b: number, c: bigint, d: number, e: number) => void;
731
- readonly graphstore_clear: (a: number) => void;
732
- readonly graphstore_dfs_traverse: (a: number, b: number, c: bigint, d: number, e: number) => void;
733
- readonly graphstore_edge_count: (a: number) => number;
734
- readonly graphstore_get_all_edge_ids: (a: number, b: number) => void;
735
- readonly graphstore_get_all_node_ids: (a: number, b: number) => void;
736
- readonly graphstore_get_edge: (a: number, b: bigint) => number;
737
- readonly graphstore_get_edges_by_label: (a: number, b: number, c: number, d: number) => void;
738
- readonly graphstore_get_incoming: (a: number, b: number, c: bigint) => void;
739
- readonly graphstore_get_neighbors: (a: number, b: number, c: bigint) => void;
740
- readonly graphstore_get_node: (a: number, b: bigint) => number;
741
- readonly graphstore_get_nodes_by_label: (a: number, b: number, c: number, d: number) => void;
742
- readonly graphstore_get_outgoing: (a: number, b: number, c: bigint) => void;
743
- readonly graphstore_get_outgoing_by_label: (a: number, b: number, c: bigint, d: number, e: number) => void;
744
- readonly graphstore_has_edge: (a: number, b: bigint) => number;
745
- readonly graphstore_has_node: (a: number, b: bigint) => number;
746
- readonly graphstore_in_degree: (a: number, b: bigint) => number;
747
- readonly graphstore_new: () => number;
748
- readonly graphstore_node_count: (a: number) => number;
749
- readonly graphstore_out_degree: (a: number, b: bigint) => number;
750
- readonly graphstore_remove_edge: (a: number, b: bigint) => void;
751
- readonly graphstore_remove_node: (a: number, b: bigint) => void;
752
- readonly graphworkerconfig_for_large_graphs: () => number;
753
- readonly graphworkerconfig_for_responsive_ui: () => number;
754
- readonly graphworkerconfig_new: () => number;
755
- readonly parsedquery_columns: (a: number) => number;
756
- readonly parsedquery_groupBy: (a: number) => number;
757
- readonly parsedquery_hasDistinct: (a: number) => number;
758
- readonly parsedquery_hasFusion: (a: number) => number;
759
- readonly parsedquery_hasGroupBy: (a: number) => number;
760
- readonly parsedquery_hasJoins: (a: number) => number;
761
- readonly parsedquery_hasOrderBy: (a: number) => number;
762
- readonly parsedquery_hasVectorSearch: (a: number) => number;
763
- readonly parsedquery_hasWhereClause: (a: number) => number;
764
- readonly parsedquery_isMatch: (a: number) => number;
765
- readonly parsedquery_isSelect: (a: number) => number;
766
- readonly parsedquery_isValid: (a: number) => number;
767
- readonly parsedquery_joinCount: (a: number) => number;
768
- readonly parsedquery_limit: (a: number, b: number) => void;
769
- readonly parsedquery_matchHasWhere: (a: number) => number;
770
- readonly parsedquery_matchLimit: (a: number, b: number) => void;
771
- readonly parsedquery_matchNodeCount: (a: number) => number;
772
- readonly parsedquery_matchNodeLabels: (a: number) => number;
773
- readonly parsedquery_matchRelationshipCount: (a: number) => number;
774
- readonly parsedquery_matchRelationshipTypes: (a: number) => number;
775
- readonly parsedquery_matchReturnItems: (a: number) => number;
776
- readonly parsedquery_offset: (a: number, b: number) => void;
777
- readonly parsedquery_orderBy: (a: number) => number;
778
- readonly parsedquery_tableName: (a: number, b: number) => void;
779
- readonly semanticmemory_clear: (a: number) => void;
780
- readonly semanticmemory_dimension: (a: number) => number;
781
- readonly semanticmemory_is_empty: (a: number) => number;
782
- readonly semanticmemory_new: (a: number, b: number) => void;
783
- readonly semanticmemory_query: (a: number, b: number, c: number, d: number, e: number) => void;
784
- readonly semanticmemory_remove: (a: number, b: bigint) => number;
785
- readonly semanticmemory_store: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
786
- readonly should_use_worker: (a: number, b: number, c: number) => number;
787
- readonly traversalprogress_new: (a: number, b: number, c: number) => number;
788
- readonly traversalprogress_percentage: (a: number) => number;
789
- readonly traversalprogress_to_json: (a: number, b: number) => void;
790
- readonly vectorstore_batch_search: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
791
- readonly vectorstore_clear: (a: number) => void;
792
- readonly vectorstore_delete_database: (a: number, b: number) => number;
793
- readonly vectorstore_dimension: (a: number) => number;
794
- readonly vectorstore_export_to_bytes: (a: number, b: number) => void;
795
- readonly vectorstore_get: (a: number, b: number, c: bigint) => void;
796
- readonly vectorstore_hybrid_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
797
- readonly vectorstore_import_from_bytes: (a: number, b: number, c: number) => void;
798
- readonly vectorstore_insert: (a: number, b: number, c: bigint, d: number, e: number) => void;
799
- readonly vectorstore_insert_batch: (a: number, b: number, c: number) => void;
800
- readonly vectorstore_insert_with_payload: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
801
- readonly vectorstore_is_empty: (a: number) => number;
802
- readonly vectorstore_is_metadata_only: (a: number) => number;
803
- readonly vectorstore_len: (a: number) => number;
804
- readonly vectorstore_load: (a: number, b: number) => number;
805
- readonly vectorstore_memory_usage: (a: number) => number;
806
- readonly vectorstore_multi_query_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
807
- readonly vectorstore_new: (a: number, b: number, c: number, d: number) => void;
808
- readonly vectorstore_new_metadata_only: () => number;
809
- readonly vectorstore_new_with_mode: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
810
- readonly vectorstore_query: (a: number, b: number, c: number, d: number, e: number) => void;
811
- readonly vectorstore_remove: (a: number, b: bigint) => number;
812
- readonly vectorstore_reserve: (a: number, b: number) => void;
813
- readonly vectorstore_save: (a: number, b: number, c: number) => number;
814
- readonly vectorstore_search: (a: number, b: number, c: number, d: number, e: number) => void;
815
- readonly vectorstore_search_with_filter: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
816
- readonly vectorstore_similarity_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
817
- readonly vectorstore_storage_mode: (a: number, b: number) => void;
818
- readonly vectorstore_text_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
819
- readonly vectorstore_with_capacity: (a: number, b: number, c: number, d: number, e: number) => void;
820
- readonly velesql_isValid: (a: number, b: number) => number;
821
- readonly velesql_parse: (a: number, b: number, c: number) => void;
822
- readonly __wbg_set_traversalprogress_is_complete: (a: number, b: number) => void;
823
- readonly __wbg_set_traversalprogress_current_depth: (a: number, b: number) => void;
824
- readonly __wbg_set_traversalprogress_estimated_total: (a: number, b: number) => void;
825
- readonly __wbg_set_traversalprogress_visited_count: (a: number, b: number) => void;
826
- readonly __wbg_get_traversalprogress_is_complete: (a: number) => number;
827
- readonly __wbg_get_traversalprogress_current_depth: (a: number) => number;
828
- readonly __wbg_get_traversalprogress_estimated_total: (a: number) => number;
829
- readonly __wbg_get_traversalprogress_visited_count: (a: number) => number;
830
- readonly graphnode_id: (a: number) => bigint;
831
- readonly semanticmemory_len: (a: number) => number;
832
- readonly __wbg_traversalprogress_free: (a: number, b: number) => void;
833
- readonly __wasm_bindgen_func_elem_265: (a: number, b: number, c: number) => void;
834
- readonly __wasm_bindgen_func_elem_264: (a: number, b: number) => void;
835
- readonly __wasm_bindgen_func_elem_1176: (a: number, b: number, c: number) => void;
836
- readonly __wasm_bindgen_func_elem_1175: (a: number, b: number) => void;
837
- readonly __wasm_bindgen_func_elem_1217: (a: number, b: number, c: number, d: number) => void;
838
- readonly __wbindgen_export: (a: number, b: number) => number;
839
- readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
840
- readonly __wbindgen_export3: (a: number) => void;
841
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
842
- readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
822
+ readonly memory: WebAssembly.Memory;
823
+ readonly __wbg_get_graphworkerconfig_depth_threshold: (a: number) => number;
824
+ readonly __wbg_get_graphworkerconfig_node_threshold: (a: number) => number;
825
+ readonly __wbg_get_graphworkerconfig_progress_interval_ms: (a: number) => number;
826
+ readonly __wbg_get_graphworkerconfig_use_shared_buffer: (a: number) => number;
827
+ readonly __wbg_get_traversalprogress_is_cancelled: (a: number) => number;
828
+ readonly __wbg_graphedge_free: (a: number, b: number) => void;
829
+ readonly __wbg_graphnode_free: (a: number, b: number) => void;
830
+ readonly __wbg_graphpersistence_free: (a: number, b: number) => void;
831
+ readonly __wbg_graphstore_free: (a: number, b: number) => void;
832
+ readonly __wbg_graphworkerconfig_free: (a: number, b: number) => void;
833
+ readonly __wbg_parsedquery_free: (a: number, b: number) => void;
834
+ readonly __wbg_semanticmemory_free: (a: number, b: number) => void;
835
+ readonly __wbg_set_graphworkerconfig_depth_threshold: (a: number, b: number) => void;
836
+ readonly __wbg_set_graphworkerconfig_node_threshold: (a: number, b: number) => void;
837
+ readonly __wbg_set_graphworkerconfig_progress_interval_ms: (a: number, b: number) => void;
838
+ readonly __wbg_set_graphworkerconfig_use_shared_buffer: (a: number, b: number) => void;
839
+ readonly __wbg_set_traversalprogress_is_cancelled: (a: number, b: number) => void;
840
+ readonly __wbg_sparseindex_free: (a: number, b: number) => void;
841
+ readonly __wbg_vectorstore_free: (a: number, b: number) => void;
842
+ readonly __wbg_velesql_free: (a: number, b: number) => void;
843
+ readonly estimate_traversal_size: (a: number, b: number, c: number) => number;
844
+ readonly graphedge_id: (a: number) => bigint;
845
+ readonly graphedge_label: (a: number, b: number) => void;
846
+ readonly graphedge_new: (a: number, b: bigint, c: bigint, d: bigint, e: number, f: number) => void;
847
+ readonly graphedge_set_number_property: (a: number, b: number, c: number, d: number) => void;
848
+ readonly graphedge_set_string_property: (a: number, b: number, c: number, d: number, e: number) => void;
849
+ readonly graphedge_source: (a: number) => bigint;
850
+ readonly graphedge_target: (a: number) => bigint;
851
+ readonly graphedge_to_json: (a: number, b: number) => void;
852
+ readonly graphnode_has_vector: (a: number) => number;
853
+ readonly graphnode_label: (a: number, b: number) => void;
854
+ readonly graphnode_new: (a: bigint, b: number, c: number) => number;
855
+ readonly graphnode_set_bool_property: (a: number, b: number, c: number, d: number) => void;
856
+ readonly graphnode_set_number_property: (a: number, b: number, c: number, d: number) => void;
857
+ readonly graphnode_set_string_property: (a: number, b: number, c: number, d: number, e: number) => void;
858
+ readonly graphnode_set_vector: (a: number, b: number, c: number) => void;
859
+ readonly graphnode_to_json: (a: number, b: number) => void;
860
+ readonly graphpersistence_delete_graph: (a: number, b: number, c: number) => number;
861
+ readonly graphpersistence_get_metadata: (a: number, b: number, c: number) => number;
862
+ readonly graphpersistence_init: (a: number) => number;
863
+ readonly graphpersistence_list_graphs: (a: number) => number;
864
+ readonly graphpersistence_load: (a: number, b: number, c: number) => number;
865
+ readonly graphpersistence_new: () => number;
866
+ readonly graphpersistence_save: (a: number, b: number, c: number, d: number) => number;
867
+ readonly graphstore_add_edge: (a: number, b: number, c: number) => void;
868
+ readonly graphstore_add_node: (a: number, b: number) => void;
869
+ readonly graphstore_bfs_traverse: (a: number, b: number, c: bigint, d: number, e: number) => void;
870
+ readonly graphstore_clear: (a: number) => void;
871
+ readonly graphstore_dfs_traverse: (a: number, b: number, c: bigint, d: number, e: number) => void;
872
+ readonly graphstore_edge_count: (a: number) => number;
873
+ readonly graphstore_get_all_edge_ids: (a: number, b: number) => void;
874
+ readonly graphstore_get_all_node_ids: (a: number, b: number) => void;
875
+ readonly graphstore_get_edge: (a: number, b: bigint) => number;
876
+ readonly graphstore_get_edges_by_label: (a: number, b: number, c: number, d: number) => void;
877
+ readonly graphstore_get_incoming: (a: number, b: number, c: bigint) => void;
878
+ readonly graphstore_get_neighbors: (a: number, b: number, c: bigint) => void;
879
+ readonly graphstore_get_node: (a: number, b: bigint) => number;
880
+ readonly graphstore_get_nodes_by_label: (a: number, b: number, c: number, d: number) => void;
881
+ readonly graphstore_get_outgoing: (a: number, b: number, c: bigint) => void;
882
+ readonly graphstore_get_outgoing_by_label: (a: number, b: number, c: bigint, d: number, e: number) => void;
883
+ readonly graphstore_has_edge: (a: number, b: bigint) => number;
884
+ readonly graphstore_has_node: (a: number, b: bigint) => number;
885
+ readonly graphstore_in_degree: (a: number, b: bigint) => number;
886
+ readonly graphstore_new: () => number;
887
+ readonly graphstore_node_count: (a: number) => number;
888
+ readonly graphstore_out_degree: (a: number, b: bigint) => number;
889
+ readonly graphstore_remove_edge: (a: number, b: bigint) => void;
890
+ readonly graphstore_remove_node: (a: number, b: bigint) => void;
891
+ readonly graphworkerconfig_for_large_graphs: () => number;
892
+ readonly graphworkerconfig_for_responsive_ui: () => number;
893
+ readonly graphworkerconfig_new: () => number;
894
+ readonly hybrid_search_fuse: (a: number, b: number, c: number, d: number, e: number) => void;
895
+ readonly parsedquery_columns: (a: number) => number;
896
+ readonly parsedquery_groupBy: (a: number) => number;
897
+ readonly parsedquery_hasDistinct: (a: number) => number;
898
+ readonly parsedquery_hasFusion: (a: number) => number;
899
+ readonly parsedquery_hasGroupBy: (a: number) => number;
900
+ readonly parsedquery_hasJoins: (a: number) => number;
901
+ readonly parsedquery_hasOrderBy: (a: number) => number;
902
+ readonly parsedquery_hasVectorSearch: (a: number) => number;
903
+ readonly parsedquery_hasWhereClause: (a: number) => number;
904
+ readonly parsedquery_isMatch: (a: number) => number;
905
+ readonly parsedquery_isSelect: (a: number) => number;
906
+ readonly parsedquery_isValid: (a: number) => number;
907
+ readonly parsedquery_joinCount: (a: number) => number;
908
+ readonly parsedquery_limit: (a: number, b: number) => void;
909
+ readonly parsedquery_matchHasWhere: (a: number) => number;
910
+ readonly parsedquery_matchLimit: (a: number, b: number) => void;
911
+ readonly parsedquery_matchNodeCount: (a: number) => number;
912
+ readonly parsedquery_matchNodeLabels: (a: number) => number;
913
+ readonly parsedquery_matchRelationshipCount: (a: number) => number;
914
+ readonly parsedquery_matchRelationshipTypes: (a: number) => number;
915
+ readonly parsedquery_matchReturnItems: (a: number) => number;
916
+ readonly parsedquery_offset: (a: number, b: number) => void;
917
+ readonly parsedquery_orderBy: (a: number) => number;
918
+ readonly parsedquery_tableName: (a: number, b: number) => void;
919
+ readonly semanticmemory_clear: (a: number) => void;
920
+ readonly semanticmemory_dimension: (a: number) => number;
921
+ readonly semanticmemory_is_empty: (a: number) => number;
922
+ readonly semanticmemory_len: (a: number) => number;
923
+ readonly semanticmemory_new: (a: number, b: number) => void;
924
+ readonly semanticmemory_query: (a: number, b: number, c: number, d: number, e: number) => void;
925
+ readonly semanticmemory_remove: (a: number, b: bigint) => number;
926
+ readonly semanticmemory_store: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
927
+ readonly should_use_worker: (a: number, b: number, c: number) => number;
928
+ readonly sparseindex_doc_count: (a: number) => number;
929
+ readonly sparseindex_insert: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
930
+ readonly sparseindex_new: () => number;
931
+ readonly sparseindex_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
932
+ readonly traversalprogress_new: (a: number, b: number, c: number) => number;
933
+ readonly traversalprogress_percentage: (a: number) => number;
934
+ readonly traversalprogress_to_json: (a: number, b: number) => void;
935
+ readonly vectorstore_batch_search: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
936
+ readonly vectorstore_clear: (a: number) => void;
937
+ readonly vectorstore_delete_database: (a: number, b: number) => number;
938
+ readonly vectorstore_dimension: (a: number) => number;
939
+ readonly vectorstore_export_to_bytes: (a: number, b: number) => void;
940
+ readonly vectorstore_get: (a: number, b: number, c: bigint) => void;
941
+ readonly vectorstore_hybrid_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
942
+ readonly vectorstore_import_from_bytes: (a: number, b: number, c: number) => void;
943
+ readonly vectorstore_insert: (a: number, b: number, c: bigint, d: number, e: number) => void;
944
+ readonly vectorstore_insert_batch: (a: number, b: number, c: number) => void;
945
+ readonly vectorstore_insert_with_payload: (a: number, b: number, c: bigint, d: number, e: number, f: number) => void;
946
+ readonly vectorstore_is_empty: (a: number) => number;
947
+ readonly vectorstore_is_metadata_only: (a: number) => number;
948
+ readonly vectorstore_len: (a: number) => number;
949
+ readonly vectorstore_load: (a: number, b: number) => number;
950
+ readonly vectorstore_memory_usage: (a: number) => number;
951
+ readonly vectorstore_multi_query_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
952
+ readonly vectorstore_new: (a: number, b: number, c: number, d: number) => void;
953
+ readonly vectorstore_new_metadata_only: () => number;
954
+ readonly vectorstore_new_with_mode: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
955
+ readonly vectorstore_query: (a: number, b: number, c: number, d: number, e: number) => void;
956
+ readonly vectorstore_remove: (a: number, b: bigint) => number;
957
+ readonly vectorstore_reserve: (a: number, b: number) => void;
958
+ readonly vectorstore_save: (a: number, b: number, c: number) => number;
959
+ readonly vectorstore_search: (a: number, b: number, c: number, d: number, e: number) => void;
960
+ readonly vectorstore_search_with_filter: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
961
+ readonly vectorstore_similarity_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
962
+ readonly vectorstore_sparse_insert: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
963
+ readonly vectorstore_sparse_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
964
+ readonly vectorstore_storage_mode: (a: number, b: number) => void;
965
+ readonly vectorstore_text_search: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
966
+ readonly vectorstore_with_capacity: (a: number, b: number, c: number, d: number, e: number) => void;
967
+ readonly velesql_isValid: (a: number, b: number) => number;
968
+ readonly velesql_parse: (a: number, b: number, c: number) => void;
969
+ readonly __wbg_set_traversalprogress_current_depth: (a: number, b: number) => void;
970
+ readonly __wbg_set_traversalprogress_estimated_total: (a: number, b: number) => void;
971
+ readonly __wbg_set_traversalprogress_visited_count: (a: number, b: number) => void;
972
+ readonly __wbg_set_traversalprogress_is_complete: (a: number, b: number) => void;
973
+ readonly __wbg_get_traversalprogress_is_complete: (a: number) => number;
974
+ readonly __wbg_get_traversalprogress_current_depth: (a: number) => number;
975
+ readonly __wbg_get_traversalprogress_estimated_total: (a: number) => number;
976
+ readonly __wbg_get_traversalprogress_visited_count: (a: number) => number;
977
+ readonly graphnode_id: (a: number) => bigint;
978
+ readonly __wbg_traversalprogress_free: (a: number, b: number) => void;
979
+ readonly __wasm_bindgen_func_elem_1318: (a: number, b: number) => void;
980
+ readonly __wasm_bindgen_func_elem_289: (a: number, b: number) => void;
981
+ readonly __wasm_bindgen_func_elem_1319: (a: number, b: number, c: number, d: number) => void;
982
+ readonly __wasm_bindgen_func_elem_1364: (a: number, b: number, c: number, d: number) => void;
983
+ readonly __wasm_bindgen_func_elem_290: (a: number, b: number, c: number) => void;
984
+ readonly __wbindgen_export: (a: number, b: number) => number;
985
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
986
+ readonly __wbindgen_export3: (a: number) => void;
987
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
988
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
843
989
  }
844
990
 
845
991
  export type SyncInitInput = BufferSource | WebAssembly.Module;
846
992
 
847
993
  /**
848
- * Instantiates the given `module`, which can either be bytes or
849
- * a precompiled `WebAssembly.Module`.
850
- *
851
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
852
- *
853
- * @returns {InitOutput}
854
- */
994
+ * Instantiates the given `module`, which can either be bytes or
995
+ * a precompiled `WebAssembly.Module`.
996
+ *
997
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
998
+ *
999
+ * @returns {InitOutput}
1000
+ */
855
1001
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
856
1002
 
857
1003
  /**
858
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
859
- * for everything else, calls `WebAssembly.instantiate` directly.
860
- *
861
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
862
- *
863
- * @returns {Promise<InitOutput>}
864
- */
1004
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1005
+ * for everything else, calls `WebAssembly.instantiate` directly.
1006
+ *
1007
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1008
+ *
1009
+ * @returns {Promise<InitOutput>}
1010
+ */
865
1011
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;