Skip to main content
Version: 3.27.2

WeakRef.prototype.deref()

The deref method returns the WeakRef instance's target object, or undefined if the target object has been garbage-collected.

Syntax

deref()

Return value

The target object of the WeakRef, or undefined if the object has been garbage-collected.

Description

See the Notes on WeakRefs section of the WeakRef page for some important notes.