Skip to content

Commit c97d8e8

Browse files
committed
Add JSDocs for getWeakRef
1 parent 9824abd commit c97d8e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/weakMapMemoize.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ class StrongRef<T> {
1515
}
1616
}
1717

18+
/**
19+
* @returns The {@linkcode StrongRef} if {@linkcode WeakRef} is not available.
20+
*
21+
* @since 5.1.2
22+
* @internal
23+
*/
1824
const getWeakRef = () =>
1925
typeof WeakRef === 'undefined'
2026
? (StrongRef as unknown as typeof WeakRef)
2127
: WeakRef
2228

23-
const Ref = /* @__PURE__ */ getWeakRef()
29+
const Ref = /* @__PURE__ */ getWeakRef()
2430

2531
const UNTERMINATED = 0
2632
const TERMINATED = 1

0 commit comments

Comments
 (0)