You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
743 B
23 lines
743 B
import {
|
|
_getNodeAtIndex,
|
|
_getUnderlyingArrayTarget,
|
|
_getUnderlyingDataset,
|
|
_getUnderlyingMatch,
|
|
_getUnderlyingNode,
|
|
_proxyContext,
|
|
_writeGraphs,
|
|
} from "../types";
|
|
import type { ArrayProxy } from "./ArrayProxy";
|
|
|
|
export function isArrayProxy(someObject?: unknown): someObject is ArrayProxy {
|
|
if (!someObject) return false;
|
|
if (typeof someObject !== "object") return false;
|
|
const potentialArrayProxy = someObject as ArrayProxy;
|
|
|
|
return !(
|
|
typeof potentialArrayProxy[_getUnderlyingDataset] !== "object" ||
|
|
typeof potentialArrayProxy[_getUnderlyingMatch] !== "object" ||
|
|
typeof potentialArrayProxy[_getNodeAtIndex] !== "function" ||
|
|
typeof potentialArrayProxy[_getUnderlyingArrayTarget] !== "object"
|
|
);
|
|
}
|
|
|