aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/stream/node-stream-uint8array.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/node/stream/node-stream-uint8array.test.ts')
-rw-r--r--test/js/node/stream/node-stream-uint8array.test.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/js/node/stream/node-stream-uint8array.test.ts b/test/js/node/stream/node-stream-uint8array.test.ts
index ec2e95d34..fd2759224 100644
--- a/test/js/node/stream/node-stream-uint8array.test.ts
+++ b/test/js/node/stream/node-stream-uint8array.test.ts
@@ -1,16 +1,17 @@
import { beforeEach, describe, expect, it } from "bun:test";
-import { Readable, Writable } from "stream";
+import { Readable, Writable, WritableOptions } from "stream";
const ABC = new Uint8Array([0x41, 0x42, 0x43]);
const DEF = new Uint8Array([0x44, 0x45, 0x46]);
const GHI = new Uint8Array([0x47, 0x48, 0x49]);
describe("Writable", () => {
- let called;
+ let called: number[];
- function logCall(fn, id) {
+ function logCall(fn: WritableOptions["write"], id: number) {
return function () {
called[id] = (called[id] || 0) + 1;
+ // @ts-ignore
return fn.apply(this, arguments);
};
}
@@ -56,7 +57,7 @@ describe("Writable", () => {
});
it("should handle multiple writes carried out via writev()", () => {
- let callback;
+ let callback!: () => void;
const writable = new Writable({
write: logCall((chunk, encoding, cb) => {