File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/hub/src/vendor/hash-wasm Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import WasmModule from "./sha256";
3
3
const BUFFER_MAX_SIZE = 8 * 1024 * 1024 ;
4
4
5
5
export async function createSHA256 ( isInsideWorker = false ) : Promise < {
6
- init ( ) : void ,
7
- update ( data : Uint8Array ) : void ,
8
- digest ( method : "hex" ) : string ,
6
+ init ( ) : void ;
7
+ update ( data : Uint8Array ) : void ;
8
+ digest ( method : "hex" ) : string ;
9
9
} > {
10
10
const wasm : Awaited < ReturnType < typeof WasmModule > > = isInsideWorker
11
11
? // @ts -expect-error WasmModule will be populated inside self object
12
12
await self [ "WasmModule" ] ( )
13
13
: await WasmModule ( ) ;
14
- const heap = wasm . HEAPU8 . subarray ( wasm . _GetBufferPtr ( ) ) ;
14
+ const heap = wasm . HEAPU8 . subarray ( wasm . _GetBufferPtr ( ) ) ;
15
15
return {
16
16
init ( ) {
17
17
wasm . _Hash_Init ( 256 ) ;
You can’t perform that action at this time.
0 commit comments