Skip to content

Commit

Permalink
test: add WeakRef TypeScript lib
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 18, 2024
1 parent 5b45ef1 commit 51ded1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 0 additions & 2 deletions test/unit/socket-close-test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference lib="ESNext" />

import * as zmq from "../../src"

import {assert} from "chai"
Expand Down
2 changes: 0 additions & 2 deletions test/unit/socket-send-receive-test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference lib="ESNext" />

import * as zmq from "../../src"

import {assert} from "chai"
Expand Down
11 changes: 9 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"target": "es2020",
"declaration": true,
"module": "commonjs",
"types": ["node", "mocha"],
"types": [
"node",
"mocha"
],
"strictPropertyInitialization": false, // TODO
"strict": true,
"strictNullChecks": true,
Expand All @@ -18,6 +21,10 @@
"incremental": true,
"sourceMap": true,
"esModuleInterop": true,
"lib": ["ES2020", "dom"]
"lib": [
"ES2020",
// only used in tests
"ES2021.WeakRef"
]
}
}

1 comment on commit 51ded1f

@rotu
Copy link
Contributor

@rotu rotu commented on 51ded1f Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the to the test files because a test-folder-specific tsconfig is not respected by ts-node. Why add this to the top-level tsconfig (instead of leaving as-is or changing to /// <reference lib="ES2021.WeakRef" />)?

Please sign in to comment.