We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8373ee commit f86aaceCopy full SHA for f86aace
test/unit/helpers.ts
@@ -14,7 +14,9 @@ if (semver.satisfies(zmq.version, ">= 4.2")) {
14
/* Windows cannot bind on a ports just above 1014; start higher to be safe. */
15
let seq = 5000
16
17
-export function uniqAddress(proto: string) {
+type Proto = "ipc" | "tcp" | "udp" | "inproc"
18
+
19
+export function uniqAddress(proto: Proto) {
20
const id = seq++
21
switch (proto) {
22
case "ipc": {
@@ -31,7 +33,7 @@ export function uniqAddress(proto: string) {
31
33
}
32
34
35
-export function testProtos(...requested: string[]) {
36
+export function testProtos(...requested: Proto[]) {
37
const set = new Set(requested)
38
39
/* Do not test with ipc if unsupported. */
0 commit comments