Skip to content

Commit af29a10

Browse files
committed
add WeakSet to getGenericsForNamespace for consistency with WeakMap
1 parent 474d224 commit af29a10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/build-entries-and-types/templates.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ function getGenericsForNamespace(namespace) {
4646
if (namespace === 'WeakMap') {
4747
return '<K extends WeakKey, V>';
4848
}
49+
if (namespace === 'WeakSet') {
50+
return '<T extends WeakKey>';
51+
}
4952
if (namespacesWithTwoGeneric.includes(namespace)) {
5053
return '<K, V>';
5154
}

0 commit comments

Comments
 (0)