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.
getWeakRef
1 parent 9824abd commit c97d8e8Copy full SHA for c97d8e8
src/weakMapMemoize.ts
@@ -15,12 +15,18 @@ class StrongRef<T> {
15
}
16
17
18
+/**
19
+ * @returns The {@linkcode StrongRef} if {@linkcode WeakRef} is not available.
20
+ *
21
+ * @since 5.1.2
22
+ * @internal
23
+ */
24
const getWeakRef = () =>
25
typeof WeakRef === 'undefined'
26
? (StrongRef as unknown as typeof WeakRef)
27
: WeakRef
28
-const Ref = /* @__PURE__ */ getWeakRef()
29
+const Ref = /* @__PURE__ */ getWeakRef()
30
31
const UNTERMINATED = 0
32
const TERMINATED = 1
0 commit comments