Add .isWeakRef() - #165
Add .isWeakRef()#165
.isWeakRef()#165Conversation
|
Tests are failing |
Sorry, I haven't checked the problem yet. At present, it seems that only node version 14 is passed. |
|
Unfortunately, I have not found a solution on how to simulate the behavior of |
|
https://github.com/ungap/weakrefs/blob/master/cjs/index.js perhaps it can try mock in node env |
|
Although the use case must be run on a low version node environment, the minimum requirement for WeakRef is Node V14.6.0, so I don't think it is necessary to create a mock use case for it on a low version Node. |
|
Tests all pass, @sindresorhus 🥳 |
|
Can you fix the merge conflict? |
|
I suggest we just embed the interface WeakRef<T extends object> {
readonly [Symbol.toStringTag]: "WeakRef";
/**
* Returns the WeakRef instance's target object, or undefined if the target object has been
* reclaimed.
*/
deref(): T | undefined;
} |
done |



@sindresorhus done other
PRto replace #164