You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 31fbe69
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: lib/util/WeakTupleMap.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ class WeakTupleMap {
121
121
/**
122
122
* Returns an existing value for the tuple or computes, stores, and returns a
123
123
* new one when the tuple is missing.
124
-
* @template {K} A
124
+
* @template {K} [A=K]
125
125
* @param {[...A, (...args: A) => V]} args tuple
126
126
* @returns {V} the value
127
127
*/
@@ -145,7 +145,7 @@ class WeakTupleMap {
145
145
* extra rest array) on every call — `ModuleGraph#cached` runs this on hot
146
146
* paths where most calls hit the cache and the closure would be pure waste.
147
147
* @template This
148
-
* @template {K} A
148
+
* @template {K} [A=K]
149
149
* @param {(thisArg: This, ...args: [A][A extends A ? 0 : never]) => V} compute computer, also the first key element; `A` is read from `args`, not from it
150
150
* @param {This} thisArg first argument passed to `compute`
151
151
* @param {A} args remaining key elements, also passed to `compute`
0 commit comments