Migrate to private class properties/methods
This commit is contained in:
parent
7dbe57084b
commit
aa9f53df57
100 changed files with 3795 additions and 3944 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue