Skip to content

Commit

Permalink
Fix some TypeScript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rotu committed Jun 11, 2024
1 parent 3061716 commit 9dfdc5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/unit/socket-close-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ for (const proto of testProtos("tcp", "ipc", "inproc")) {
}
this.slow(200)

let weakRef
let weakRef: undefined | WeakRef<any>

const task = async () => {
let context: zmq.Context | undefined = new zmq.Context()
Expand Down Expand Up @@ -145,7 +145,7 @@ for (const proto of testProtos("tcp", "ipc", "inproc")) {
}
this.slow(200)

let weakRef
let weakRef: undefined | WeakRef<any>
const task = async () => {
let context: zmq.Context | undefined = new zmq.Context()

Expand Down
6 changes: 3 additions & 3 deletions test/unit/socket-send-receive-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ for (const proto of testProtos("tcp", "ipc", "inproc")) {
if (process.env.SKIP_GC_TESTS) {
this.skip()
}
let weakRef
let weakRef: undefined | WeakRef<any>
sockA.connect(uniqAddress(proto))
const send = async (size: number) => {
const msg = Buffer.alloc(size)
Expand All @@ -115,7 +115,7 @@ for (const proto of testProtos("tcp", "ipc", "inproc")) {
if (process.env.SKIP_GC_TESTS) {
this.skip()
}
let weakRef
let weakRef: undefined | WeakRef<any>

sockA.connect(uniqAddress(proto))
const send = async (size: number) => {
Expand All @@ -130,7 +130,7 @@ for (const proto of testProtos("tcp", "ipc", "inproc")) {
setTimeout(resolve, 5)
})
assert.isDefined(weakRef)
assert.isUndefined(weakRef!.unref())
assert.isUndefined(weakRef!.deref())
})
})

Expand Down

0 comments on commit 9dfdc5b

Please sign in to comment.