diff options
| author | Jieiku | 2022-08-14 12:41:15 -0700 |
|---|---|---|
| committer | Jieiku | 2022-08-14 12:41:15 -0700 |
| commit | 830cabab1f638052a8c4ac39eb86370da5a676eb (patch) | |
| tree | f59bc6914105256ea684066277a49ab2dce53300 /static/tinysearch_engine.d.ts | |
| parent | cf95ee520261a0a523d5a3dfbc01a3847d67de51 (diff) | |
| download | abridge-1.2.0.tar.gz abridge-1.2.0.tar.bz2 abridge-1.2.0.zip | |
Alternate Search Libraries Tinysearch and Stork1.2.0
Diffstat (limited to 'static/tinysearch_engine.d.ts')
| -rw-r--r-- | static/tinysearch_engine.d.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/static/tinysearch_engine.d.ts b/static/tinysearch_engine.d.ts new file mode 100644 index 0000000..e1f9bb2 --- /dev/null +++ b/static/tinysearch_engine.d.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** +* @param {string} query +* @param {number} num_results +* @returns {any} +*/ +export function search(query: string, num_results: number): any; + +export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; + +export interface InitOutput { + readonly memory: WebAssembly.Memory; + readonly search: (a: number, b: number, c: number) => number; + readonly __wbindgen_malloc: (a: number) => number; + readonly __wbindgen_realloc: (a: number, b: number, c: number) => number; +} + +/** +* Synchronously compiles the given `bytes` and instantiates the WebAssembly module. +* +* @param {BufferSource} bytes +* +* @returns {InitOutput} +*/ +export function initSync(bytes: BufferSource): InitOutput; + +/** +* If `module_or_path` is {RequestInfo} or {URL}, makes a request and +* for everything else, calls `WebAssembly.instantiate` directly. +* +* @param {InitInput | Promise<InitInput>} module_or_path +* +* @returns {Promise<InitOutput>} +*/ +export default function init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>; |
