rapidhash-wasm-vn 1.0.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/LICENSE +21 -0
- package/README.md +26 -0
- package/bundler/rapidhash_wasm_vn.d.ts +161 -0
- package/bundler/rapidhash_wasm_vn.js +5 -0
- package/bundler/rapidhash_wasm_vn_bg.js +539 -0
- package/bundler/rapidhash_wasm_vn_bg.wasm +0 -0
- package/bundler/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/deno/rapidhash_wasm_vn.d.ts +161 -0
- package/deno/rapidhash_wasm_vn.js +537 -0
- package/deno/rapidhash_wasm_vn_bg.wasm +0 -0
- package/deno/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/esm/package.json +4 -0
- package/esm/rapidhash_wasm_vn.d.ts +161 -0
- package/esm/rapidhash_wasm_vn.js +17 -0
- package/esm/rapidhash_wasm_vn_bg.js +533 -0
- package/esm/rapidhash_wasm_vn_bg.wasm +0 -0
- package/esm/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/module/rapidhash_wasm_vn.d.ts +161 -0
- package/module/rapidhash_wasm_vn.js +538 -0
- package/module/rapidhash_wasm_vn_bg.wasm +0 -0
- package/module/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/no-modules/rapidhash_wasm_vn.d.ts +233 -0
- package/no-modules/rapidhash_wasm_vn.js +654 -0
- package/no-modules/rapidhash_wasm_vn_bg.wasm +0 -0
- package/no-modules/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/nodejs/rapidhash_wasm_vn.d.ts +161 -0
- package/nodejs/rapidhash_wasm_vn.js +546 -0
- package/nodejs/rapidhash_wasm_vn_bg.wasm +0 -0
- package/nodejs/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
- package/package.json +79 -0
- package/web/rapidhash_wasm_vn.d.ts +241 -0
- package/web/rapidhash_wasm_vn.js +644 -0
- package/web/rapidhash_wasm_vn_bg.wasm +0 -0
- package/web/rapidhash_wasm_vn_bg.wasm.d.ts +56 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const hash_v1: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
5
|
+
export const __wbg_portablehashv1_free: (a: number, b: number) => void;
|
|
6
|
+
export const portablehashv1_new: (a: number, b: bigint) => number;
|
|
7
|
+
export const portablehashv1_update: (a: number, b: number, c: number) => void;
|
|
8
|
+
export const portablehashv1_digest: (a: number) => bigint;
|
|
9
|
+
export const portablehashv1_reset: (a: number) => void;
|
|
10
|
+
export const hash_v2: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
11
|
+
export const __wbg_portablehashv2_free: (a: number, b: number) => void;
|
|
12
|
+
export const portablehashv2_new: (a: number, b: bigint) => number;
|
|
13
|
+
export const portablehashv2_update: (a: number, b: number, c: number) => void;
|
|
14
|
+
export const portablehashv2_digest: (a: number) => bigint;
|
|
15
|
+
export const portablehashv2_reset: (a: number) => void;
|
|
16
|
+
export const hash_v3: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
17
|
+
export const hash_v3_micro: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
18
|
+
export const hash_v3_nano: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
19
|
+
export const portablehashv3_digest: (a: number) => bigint;
|
|
20
|
+
export const __wbg_fasthasher_free: (a: number, b: number) => void;
|
|
21
|
+
export const fasthasher_new: (a: number, b: bigint) => number;
|
|
22
|
+
export const fasthasher_update: (a: number, b: number, c: number) => void;
|
|
23
|
+
export const fasthasher_update_i8: (a: number, b: number) => void;
|
|
24
|
+
export const fasthasher_update_i16: (a: number, b: number) => void;
|
|
25
|
+
export const fasthasher_update_i32: (a: number, b: number) => void;
|
|
26
|
+
export const fasthasher_update_i64: (a: number, b: bigint) => void;
|
|
27
|
+
export const fasthasher_update_i128: (a: number, b: bigint, c: bigint) => void;
|
|
28
|
+
export const fasthasher_digest: (a: number) => bigint;
|
|
29
|
+
export const fasthasher_reset: (a: number) => void;
|
|
30
|
+
export const qualityhasher_update: (a: number, b: number, c: number) => void;
|
|
31
|
+
export const qualityhasher_digest: (a: number) => bigint;
|
|
32
|
+
export const fasthasher_update_u8: (a: number, b: number) => void;
|
|
33
|
+
export const fasthasher_update_u16: (a: number, b: number) => void;
|
|
34
|
+
export const qualityhasher_update_u8: (a: number, b: number) => void;
|
|
35
|
+
export const qualityhasher_update_u16: (a: number, b: number) => void;
|
|
36
|
+
export const fasthasher_update_u128: (a: number, b: bigint, c: bigint) => void;
|
|
37
|
+
export const qualityhasher_update_u128: (a: number, b: bigint, c: bigint) => void;
|
|
38
|
+
export const fasthasher_update_u32: (a: number, b: number) => void;
|
|
39
|
+
export const fasthasher_update_u64: (a: number, b: bigint) => void;
|
|
40
|
+
export const qualityhasher_update_u32: (a: number, b: number) => void;
|
|
41
|
+
export const qualityhasher_update_u64: (a: number, b: bigint) => void;
|
|
42
|
+
export const qualityhasher_new: (a: number, b: bigint) => number;
|
|
43
|
+
export const __wbg_qualityhasher_free: (a: number, b: number) => void;
|
|
44
|
+
export const __wbg_portablehashv3_free: (a: number, b: number) => void;
|
|
45
|
+
export const portablehashv3_reset: (a: number) => void;
|
|
46
|
+
export const qualityhasher_reset: (a: number) => void;
|
|
47
|
+
export const qualityhasher_update_i128: (a: number, b: bigint, c: bigint) => void;
|
|
48
|
+
export const qualityhasher_update_i64: (a: number, b: bigint) => void;
|
|
49
|
+
export const qualityhasher_update_i32: (a: number, b: number) => void;
|
|
50
|
+
export const qualityhasher_update_i16: (a: number, b: number) => void;
|
|
51
|
+
export const qualityhasher_update_i8: (a: number, b: number) => void;
|
|
52
|
+
export const portablehashv3_update: (a: number, b: number, c: number) => void;
|
|
53
|
+
export const portablehashv3_new: (a: number, b: bigint) => number;
|
|
54
|
+
export const __wbindgen_export_0: WebAssembly.Table;
|
|
55
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
56
|
+
export const __wbindgen_start: () => void;
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rapidhash-wasm-vn",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"collaborators": [
|
|
5
|
+
"ndtao2020"
|
|
6
|
+
],
|
|
7
|
+
"description": "RapidHash for WebAssembly",
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"license": "MIT License",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/ndtao2020"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"web/",
|
|
16
|
+
"deno/",
|
|
17
|
+
"esm/",
|
|
18
|
+
"module/",
|
|
19
|
+
"no-modules/",
|
|
20
|
+
"nodejs/",
|
|
21
|
+
"bundler/"
|
|
22
|
+
],
|
|
23
|
+
"types": "./web/rapidhash_wasm_vn.d.ts",
|
|
24
|
+
"main": "./web/rapidhash_wasm_vn.js",
|
|
25
|
+
"sideEffects": [
|
|
26
|
+
"./snippets/*"
|
|
27
|
+
],
|
|
28
|
+
"exports": {
|
|
29
|
+
"./bundler": {
|
|
30
|
+
"types": "./bundler/rapidhash_wasm_vn.d.ts",
|
|
31
|
+
"require": "./bundler/rapidhash_wasm_vn.js",
|
|
32
|
+
"import": "./bundler/rapidhash_wasm_vn.js"
|
|
33
|
+
},
|
|
34
|
+
"./deno": {
|
|
35
|
+
"types": "./deno/rapidhash_wasm_vn.d.ts",
|
|
36
|
+
"require": "./deno/rapidhash_wasm_vn.js",
|
|
37
|
+
"import": "./deno/rapidhash_wasm_vn.js"
|
|
38
|
+
},
|
|
39
|
+
"./esm": {
|
|
40
|
+
"types": "./esm/rapidhash_wasm_vn.d.ts",
|
|
41
|
+
"require": "./esm/rapidhash_wasm_vn.js",
|
|
42
|
+
"import": "./esm/rapidhash_wasm_vn.js"
|
|
43
|
+
},
|
|
44
|
+
"./module": {
|
|
45
|
+
"types": "./module/rapidhash_wasm_vn.d.ts",
|
|
46
|
+
"require": "./module/rapidhash_wasm_vn.js",
|
|
47
|
+
"import": "./module/rapidhash_wasm_vn.js"
|
|
48
|
+
},
|
|
49
|
+
"./no-modules": {
|
|
50
|
+
"types": "./no-modules/rapidhash_wasm_vn.d.ts",
|
|
51
|
+
"require": "./no-modules/rapidhash_wasm_vn.js",
|
|
52
|
+
"import": "./no-modules/rapidhash_wasm_vn.js"
|
|
53
|
+
},
|
|
54
|
+
"./nodejs": {
|
|
55
|
+
"types": "./nodejs/rapidhash_wasm_vn.d.ts",
|
|
56
|
+
"require": "./nodejs/rapidhash_wasm_vn.js",
|
|
57
|
+
"import": "./nodejs/rapidhash_wasm_vn.js"
|
|
58
|
+
},
|
|
59
|
+
"./web": {
|
|
60
|
+
"types": "./web/rapidhash_wasm_vn.d.ts",
|
|
61
|
+
"require": "./web/rapidhash_wasm_vn.js",
|
|
62
|
+
"import": "./web/rapidhash_wasm_vn.js"
|
|
63
|
+
},
|
|
64
|
+
".": {
|
|
65
|
+
"types": "./web/rapidhash_wasm_vn.d.ts",
|
|
66
|
+
"require": "./web/rapidhash_wasm_vn.js",
|
|
67
|
+
"import": "./web/rapidhash_wasm_vn.js"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"keywords": [
|
|
71
|
+
"rapidhash",
|
|
72
|
+
"hash",
|
|
73
|
+
"hashing",
|
|
74
|
+
"wasm",
|
|
75
|
+
"webassembly",
|
|
76
|
+
"checksum",
|
|
77
|
+
"vn"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Computes RapidHash V1 (64-bit) hash
|
|
5
|
+
*
|
|
6
|
+
* # Arguments
|
|
7
|
+
*
|
|
8
|
+
* * `input` - Input data to hash
|
|
9
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
10
|
+
*/
|
|
11
|
+
export function hash_v1(input: Uint8Array, seed?: bigint | null): bigint;
|
|
12
|
+
/**
|
|
13
|
+
* Computes RapidHash V2 (64-bit) hash
|
|
14
|
+
*
|
|
15
|
+
* # Arguments
|
|
16
|
+
*
|
|
17
|
+
* * `input` - Input data to hash
|
|
18
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
19
|
+
*/
|
|
20
|
+
export function hash_v2(input: Uint8Array, seed?: bigint | null): bigint;
|
|
21
|
+
/**
|
|
22
|
+
* Computes RapidHash V3 (64-bit) hash
|
|
23
|
+
*
|
|
24
|
+
* # Arguments
|
|
25
|
+
*
|
|
26
|
+
* * `input` - Input data to hash
|
|
27
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
28
|
+
*/
|
|
29
|
+
export function hash_v3(input: Uint8Array, seed?: bigint | null): bigint;
|
|
30
|
+
/**
|
|
31
|
+
* Computes RapidHash V3 (64-bit) micro hash
|
|
32
|
+
*
|
|
33
|
+
* # Arguments
|
|
34
|
+
*
|
|
35
|
+
* * `input` - Input data to hash
|
|
36
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
37
|
+
*/
|
|
38
|
+
export function hash_v3_micro(input: Uint8Array, seed?: bigint | null): bigint;
|
|
39
|
+
/**
|
|
40
|
+
* Computes RapidHash V3 (64-bit) nano hash
|
|
41
|
+
*
|
|
42
|
+
* # Arguments
|
|
43
|
+
*
|
|
44
|
+
* * `input` - Input data to hash
|
|
45
|
+
* * `seed` - Seed value for hash (default: 0)
|
|
46
|
+
*/
|
|
47
|
+
export function hash_v3_nano(input: Uint8Array, seed?: bigint | null): bigint;
|
|
48
|
+
export class FastHasher {
|
|
49
|
+
free(): void;
|
|
50
|
+
[Symbol.dispose](): void;
|
|
51
|
+
constructor(seed?: bigint | null);
|
|
52
|
+
/**
|
|
53
|
+
* Updates the hash with new data
|
|
54
|
+
*/
|
|
55
|
+
update(data: Uint8Array): void;
|
|
56
|
+
update_u8(data: number): void;
|
|
57
|
+
update_u16(data: number): void;
|
|
58
|
+
update_u32(data: number): void;
|
|
59
|
+
update_u64(data: bigint): void;
|
|
60
|
+
update_u128(data: bigint): void;
|
|
61
|
+
update_i8(data: number): void;
|
|
62
|
+
update_i16(data: number): void;
|
|
63
|
+
update_i32(data: number): void;
|
|
64
|
+
update_i64(data: bigint): void;
|
|
65
|
+
update_i128(data: bigint): void;
|
|
66
|
+
/**
|
|
67
|
+
* Finalizes the hash and returns the result
|
|
68
|
+
*/
|
|
69
|
+
digest(): bigint;
|
|
70
|
+
/**
|
|
71
|
+
* Resets the hasher
|
|
72
|
+
*/
|
|
73
|
+
reset(): void;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Streaming PortableHashV1
|
|
77
|
+
*/
|
|
78
|
+
export class PortableHashV1 {
|
|
79
|
+
free(): void;
|
|
80
|
+
[Symbol.dispose](): void;
|
|
81
|
+
constructor(seed?: bigint | null);
|
|
82
|
+
/**
|
|
83
|
+
* Updates the hash with new data
|
|
84
|
+
*/
|
|
85
|
+
update(data: Uint8Array): void;
|
|
86
|
+
/**
|
|
87
|
+
* Finalizes the hash and returns the result
|
|
88
|
+
*/
|
|
89
|
+
digest(): bigint;
|
|
90
|
+
/**
|
|
91
|
+
* Resets the hasher with optional new seed
|
|
92
|
+
*/
|
|
93
|
+
reset(): void;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Streaming PortableHashV2
|
|
97
|
+
*/
|
|
98
|
+
export class PortableHashV2 {
|
|
99
|
+
free(): void;
|
|
100
|
+
[Symbol.dispose](): void;
|
|
101
|
+
constructor(seed?: bigint | null);
|
|
102
|
+
/**
|
|
103
|
+
* Updates the hash with new data
|
|
104
|
+
*/
|
|
105
|
+
update(data: Uint8Array): void;
|
|
106
|
+
/**
|
|
107
|
+
* Finalizes the hash and returns the result
|
|
108
|
+
*/
|
|
109
|
+
digest(): bigint;
|
|
110
|
+
/**
|
|
111
|
+
* Resets the hasher with optional new seed
|
|
112
|
+
*/
|
|
113
|
+
reset(): void;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Streaming PortableHashV3
|
|
117
|
+
*/
|
|
118
|
+
export class PortableHashV3 {
|
|
119
|
+
free(): void;
|
|
120
|
+
[Symbol.dispose](): void;
|
|
121
|
+
constructor(seed?: bigint | null);
|
|
122
|
+
/**
|
|
123
|
+
* Updates the hash with new data
|
|
124
|
+
*/
|
|
125
|
+
update(data: Uint8Array): void;
|
|
126
|
+
/**
|
|
127
|
+
* Finalizes the hash and returns the result
|
|
128
|
+
*/
|
|
129
|
+
digest(): bigint;
|
|
130
|
+
/**
|
|
131
|
+
* Resets the hasher with optional new seed
|
|
132
|
+
*/
|
|
133
|
+
reset(): void;
|
|
134
|
+
}
|
|
135
|
+
export class QualityHasher {
|
|
136
|
+
free(): void;
|
|
137
|
+
[Symbol.dispose](): void;
|
|
138
|
+
constructor(seed?: bigint | null);
|
|
139
|
+
/**
|
|
140
|
+
* Updates the hash with new data
|
|
141
|
+
*/
|
|
142
|
+
update(data: Uint8Array): void;
|
|
143
|
+
update_u8(data: number): void;
|
|
144
|
+
update_u16(data: number): void;
|
|
145
|
+
update_u32(data: number): void;
|
|
146
|
+
update_u64(data: bigint): void;
|
|
147
|
+
update_u128(data: bigint): void;
|
|
148
|
+
update_i8(data: number): void;
|
|
149
|
+
update_i16(data: number): void;
|
|
150
|
+
update_i32(data: number): void;
|
|
151
|
+
update_i64(data: bigint): void;
|
|
152
|
+
update_i128(data: bigint): void;
|
|
153
|
+
/**
|
|
154
|
+
* Finalizes the hash and returns the result
|
|
155
|
+
*/
|
|
156
|
+
digest(): bigint;
|
|
157
|
+
/**
|
|
158
|
+
* Resets the hasher
|
|
159
|
+
*/
|
|
160
|
+
reset(): void;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
164
|
+
|
|
165
|
+
export interface InitOutput {
|
|
166
|
+
readonly memory: WebAssembly.Memory;
|
|
167
|
+
readonly hash_v1: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
168
|
+
readonly __wbg_portablehashv1_free: (a: number, b: number) => void;
|
|
169
|
+
readonly portablehashv1_new: (a: number, b: bigint) => number;
|
|
170
|
+
readonly portablehashv1_update: (a: number, b: number, c: number) => void;
|
|
171
|
+
readonly portablehashv1_digest: (a: number) => bigint;
|
|
172
|
+
readonly portablehashv1_reset: (a: number) => void;
|
|
173
|
+
readonly hash_v2: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
174
|
+
readonly __wbg_portablehashv2_free: (a: number, b: number) => void;
|
|
175
|
+
readonly portablehashv2_new: (a: number, b: bigint) => number;
|
|
176
|
+
readonly portablehashv2_update: (a: number, b: number, c: number) => void;
|
|
177
|
+
readonly portablehashv2_digest: (a: number) => bigint;
|
|
178
|
+
readonly portablehashv2_reset: (a: number) => void;
|
|
179
|
+
readonly hash_v3: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
180
|
+
readonly hash_v3_micro: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
181
|
+
readonly hash_v3_nano: (a: number, b: number, c: number, d: bigint) => bigint;
|
|
182
|
+
readonly portablehashv3_digest: (a: number) => bigint;
|
|
183
|
+
readonly __wbg_fasthasher_free: (a: number, b: number) => void;
|
|
184
|
+
readonly fasthasher_new: (a: number, b: bigint) => number;
|
|
185
|
+
readonly fasthasher_update: (a: number, b: number, c: number) => void;
|
|
186
|
+
readonly fasthasher_update_i8: (a: number, b: number) => void;
|
|
187
|
+
readonly fasthasher_update_i16: (a: number, b: number) => void;
|
|
188
|
+
readonly fasthasher_update_i32: (a: number, b: number) => void;
|
|
189
|
+
readonly fasthasher_update_i64: (a: number, b: bigint) => void;
|
|
190
|
+
readonly fasthasher_update_i128: (a: number, b: bigint, c: bigint) => void;
|
|
191
|
+
readonly fasthasher_digest: (a: number) => bigint;
|
|
192
|
+
readonly fasthasher_reset: (a: number) => void;
|
|
193
|
+
readonly qualityhasher_update: (a: number, b: number, c: number) => void;
|
|
194
|
+
readonly qualityhasher_digest: (a: number) => bigint;
|
|
195
|
+
readonly fasthasher_update_u8: (a: number, b: number) => void;
|
|
196
|
+
readonly fasthasher_update_u16: (a: number, b: number) => void;
|
|
197
|
+
readonly qualityhasher_update_u8: (a: number, b: number) => void;
|
|
198
|
+
readonly qualityhasher_update_u16: (a: number, b: number) => void;
|
|
199
|
+
readonly fasthasher_update_u128: (a: number, b: bigint, c: bigint) => void;
|
|
200
|
+
readonly qualityhasher_update_u128: (a: number, b: bigint, c: bigint) => void;
|
|
201
|
+
readonly fasthasher_update_u32: (a: number, b: number) => void;
|
|
202
|
+
readonly fasthasher_update_u64: (a: number, b: bigint) => void;
|
|
203
|
+
readonly qualityhasher_update_u32: (a: number, b: number) => void;
|
|
204
|
+
readonly qualityhasher_update_u64: (a: number, b: bigint) => void;
|
|
205
|
+
readonly qualityhasher_new: (a: number, b: bigint) => number;
|
|
206
|
+
readonly __wbg_qualityhasher_free: (a: number, b: number) => void;
|
|
207
|
+
readonly __wbg_portablehashv3_free: (a: number, b: number) => void;
|
|
208
|
+
readonly portablehashv3_reset: (a: number) => void;
|
|
209
|
+
readonly qualityhasher_reset: (a: number) => void;
|
|
210
|
+
readonly qualityhasher_update_i128: (a: number, b: bigint, c: bigint) => void;
|
|
211
|
+
readonly qualityhasher_update_i64: (a: number, b: bigint) => void;
|
|
212
|
+
readonly qualityhasher_update_i32: (a: number, b: number) => void;
|
|
213
|
+
readonly qualityhasher_update_i16: (a: number, b: number) => void;
|
|
214
|
+
readonly qualityhasher_update_i8: (a: number, b: number) => void;
|
|
215
|
+
readonly portablehashv3_update: (a: number, b: number, c: number) => void;
|
|
216
|
+
readonly portablehashv3_new: (a: number, b: bigint) => number;
|
|
217
|
+
readonly __wbindgen_export_0: WebAssembly.Table;
|
|
218
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
219
|
+
readonly __wbindgen_start: () => void;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
223
|
+
/**
|
|
224
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
225
|
+
* a precompiled `WebAssembly.Module`.
|
|
226
|
+
*
|
|
227
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
228
|
+
*
|
|
229
|
+
* @returns {InitOutput}
|
|
230
|
+
*/
|
|
231
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
235
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
236
|
+
*
|
|
237
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
238
|
+
*
|
|
239
|
+
* @returns {Promise<InitOutput>}
|
|
240
|
+
*/
|
|
241
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|