Fix TS compilation errors

This commit is contained in:
ochafik 2024-06-29 01:27:00 +01:00
commit b8a4a7423f
2 changed files with 3 additions and 1 deletions

View file

@ -17,6 +17,7 @@ async function compressString(input: string): Promise<string> {
controller.close();
}
});
// @ts-ignore
const compressedStream = stream.pipeThrough(new CompressionStream('gzip'));
const compressedData = await new Response(compressedStream).arrayBuffer();
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 decompressedData = await new Response(decompressedStream).arrayBuffer();
return new TextDecoder().decode(decompressedData);

View file

@ -4,7 +4,7 @@
"lib": [
"dom",
"dom.iterable",
"ES2023",
"ES2021",
"WebWorker",
],
"rootDir": "src",