mirror of
https://github.com/imputnet/cobalt.git
synced 2025-12-25 09:28:50 +00:00
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
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:
@@ -4,7 +4,7 @@ import { uuid } from "$lib/util";
|
||||
export class MemoryStorage extends AbstractStorage {
|
||||
#chunkSize: number;
|
||||
#actualSize: number = 0;
|
||||
#chunks: Uint8Array[] = [];
|
||||
#chunks: Uint8Array<ArrayBuffer>[] = [];
|
||||
|
||||
constructor(chunkSize: number) {
|
||||
super();
|
||||
@@ -33,7 +33,7 @@ export class MemoryStorage extends AbstractStorage {
|
||||
async res() {
|
||||
// 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
|
||||
const outputView: Uint8Array[] = [];
|
||||
const outputView: Uint8Array<ArrayBuffer>[] = [];
|
||||
|
||||
for (let i = 0; i < this.#chunks.length; ++i) {
|
||||
outputView.push(
|
||||
|
||||
Reference in New Issue
Block a user