new WeakRef(target, ttl)
Initializes the weak reference to the target reference.
||Object||The target reference that should be referenced by this weak reference.|
||number||The maximum number of milliseconds the weak reference should be kept. The reference will be discarded once ACCESSED after the specified timeout.|
The UNIX timestamp with millisecond precision marking the moment at or after which the reference will be discarded.
(nullable) _reference :Object
The actual target reference, or
nullif the reference has been already discarded.
Returns the target reference, provided that the target reference is still alive. Returns
nullif the reference has been discarded.