Fix TS compilation errors
This commit is contained in:
parent
3d191078f1
commit
b8a4a7423f
2 changed files with 3 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ async function compressString(input: string): Promise<string> {
|
||||||
controller.close();
|
controller.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// @ts-ignore
|
||||||
const compressedStream = stream.pipeThrough(new CompressionStream('gzip'));
|
const compressedStream = stream.pipeThrough(new CompressionStream('gzip'));
|
||||||
const compressedData = await new Response(compressedStream).arrayBuffer();
|
const compressedData = await new Response(compressedStream).arrayBuffer();
|
||||||
return btoa(String.fromCharCode(...new Uint8Array(compressedData)));
|
return btoa(String.fromCharCode(...new Uint8Array(compressedData)));
|
||||||
|
|
@ -31,6 +32,7 @@ async function decompressString(compressedInput: string): Promise<string> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
const decompressedStream = stream.pipeThrough(new DecompressionStream('gzip'));
|
const decompressedStream = stream.pipeThrough(new DecompressionStream('gzip'));
|
||||||
const decompressedData = await new Response(decompressedStream).arrayBuffer();
|
const decompressedData = await new Response(decompressedStream).arrayBuffer();
|
||||||
return new TextDecoder().decode(decompressedData);
|
return new TextDecoder().decode(decompressedData);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"dom.iterable",
|
"dom.iterable",
|
||||||
"ES2023",
|
"ES2021",
|
||||||
"WebWorker",
|
"WebWorker",
|
||||||
],
|
],
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue