WeakRef.prototype.deref()
WeakRef.prototype.deref() is a JavaScript method in the WeakRef category. Returns the referenced object or undefined. The syntax is weakRef.deref(). A typical example: ref.deref() // {x:1} or undefined. A close sibling is WeakRef(), which creates a weak reference. A close sibling is WeakSet.prototype.has(), which checks for object. A close sibling is WeakSet.prototype.delete(), which removes an object. A close sibling is WeakMap.prototype.has(), which checks for key. More about this category: WeakRef and FinalizationRegistry. Related WeakRef methods: WeakRef(), WeakSet.prototype.has(), WeakSet.prototype.delete(), WeakMap.prototype.has(), WeakMap.prototype.delete(). This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try WeakRef.prototype.deref() immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.