Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface WeakRef<T>

interface WeakRef<T extends WeakKey> {
    "[toStringTag]": "WeakRef";
    deref(): T | undefined;
}

Type Parameters

Index
"[toStringTag]": "WeakRef"
  • Returns the WeakRef instance's target value, or undefined if the target value has been reclaimed. In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.

    Returns T | undefined

Was this helpful?