Skip to content

Commit

Permalink
fix: πŸ› refactor #writeSync to be compatible w/ strictNullChecks
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Jul 6, 2019
1 parent d09cd03 commit 7b67eea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/volume.ts
Expand Up @@ -1103,14 +1103,14 @@ export class Volume {
writeSync(fd: number, a: string | Buffer | Uint8Array, b?: number, c?: number | TEncoding, d?: number): number {
validateFd(fd);

let encoding: TEncoding;
let offset: number;
let length: number;
let position: number;
let encoding: TEncoding | undefined;
let offset: number | undefined;
let length: number | undefined;
let position: number | undefined;

const isBuffer = typeof a !== 'string';
if (isBuffer) {
offset = b | 0;
offset = (b || 0) | 0;
length = c as number;
position = d;
} else {
Expand Down

0 comments on commit 7b67eea

Please sign in to comment.