Migrate to private class properties/methods

This commit is contained in:
Jamie Kyle
2025-01-14 11:11:52 -08:00
committed by GitHub
parent 7dbe57084b
commit aa9f53df57
100 changed files with 3795 additions and 3944 deletions

View File

@@ -22,20 +22,20 @@ import { DataWriter } from '../../sql/Client';
const { BACKUP_INTEGRATION_DIR } = process.env;
class MemoryStream extends InputStream {
private offset = 0;
#offset = 0;
constructor(private readonly buffer: Buffer) {
super();
}
public override async read(amount: number): Promise<Buffer> {
const result = this.buffer.slice(this.offset, this.offset + amount);
this.offset += amount;
const result = this.buffer.slice(this.#offset, this.#offset + amount);
this.#offset += amount;
return result;
}
public override async skip(amount: number): Promise<void> {
this.offset += amount;
this.#offset += amount;
}
}