web/storage/memory: fix the type of chunks
Some checks failed
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled

This commit is contained in:
wukko
2025-12-24 00:03:36 +06:00
parent 728d225515
commit eb5cf3b64c

View File

@@ -4,7 +4,7 @@ import { uuid } from "$lib/util";
export class MemoryStorage extends AbstractStorage { export class MemoryStorage extends AbstractStorage {
#chunkSize: number; #chunkSize: number;
#actualSize: number = 0; #actualSize: number = 0;
#chunks: Uint8Array[] = []; #chunks: Uint8Array<ArrayBuffer>[] = [];
constructor(chunkSize: number) { constructor(chunkSize: number) {
super(); super();
@@ -33,7 +33,7 @@ export class MemoryStorage extends AbstractStorage {
async res() { async res() {
// if we didn't need as much space as we allocated for some reason, // if we didn't need as much space as we allocated for some reason,
// shrink the buffers so that we don't inflate the file with zeroes // shrink the buffers so that we don't inflate the file with zeroes
const outputView: Uint8Array[] = []; const outputView: Uint8Array<ArrayBuffer>[] = [];
for (let i = 0; i < this.#chunks.length; ++i) { for (let i = 0; i < this.#chunks.length; ++i) {
outputView.push( outputView.push(