Add "isDereferencedObject" helper method
nathanwinder opened this issue · comments
Nathan Winder commented
/**
* Type gate to ensure an object has been de-referenced.
*
* @param obj The object to check.
*/
function isDereferencedObject<T extends object | ReferenceObject>(
obj: T
): obj is Exclude<T, ReferenceObject> {
return !isReferenceObject(obj);
}
Nathan Winder commented
Using !isReferenceObject(obj)
has the same effect so no need for this extra API