fixes ts error on files.ts

This commit is contained in:
filipenevola
2020-07-24 07:43:35 -04:00
parent 4337dd498f
commit d01c859cd3

View File

@@ -1538,13 +1538,13 @@ export function readBufferWithLengthAndOffset(
if (length > 0) {
const fd = open(filename, "r");
try {
var count = read(fd, data, 0, length, offset);
const count = read(fd, data, { position: 0, length, offset });
if (count !== length) {
throw new Error("couldn't read entire resource");
}
} finally {
close(fd);
}
if (count !== length) {
throw new Error("couldn't read entire resource");
}
}
return data;
}