aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/stream/node-stream-uint8array.test.ts
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-03-22 15:01:01 -0700
committerGravatar GitHub <noreply@github.com> 2023-03-22 15:01:01 -0700
commita5f92224b586289fc72f0abdb68b08eef9f017db (patch)
tree6092397858776820b431b0dffa635d8bc3b3185e /test/js/node/stream/node-stream-uint8array.test.ts
parent2bdaa81b1c2325687c5115b4e97627533cb3646b (diff)
downloadbun-a5f92224b586289fc72f0abdb68b08eef9f017db.tar.gz
bun-a5f92224b586289fc72f0abdb68b08eef9f017db.tar.zst
bun-a5f92224b586289fc72f0abdb68b08eef9f017db.zip
Fix types (#2453)
* WIP * WIP * WIP * WIP * Improve typechecking in type files * Fix typechecking * Update * Update submodule * CI for typechecking * Add ci * Update commands * Format after build * Dont use bunx * Rename job * Use nodemodules prettier * Update workflow * Use symlink * Debug * Debug * Clean up and rename jobs
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) => {