export function test(maybeInspectedElement) {
if (
maybeInspectedElement === null ||
typeof maybeInspectedElement !== 'object'
) {
return false;
}
const hasOwnProperty = Object.prototype.hasOwnProperty.bind(
maybeInspectedElement,
);
return (
hasOwnProperty('canEditFunctionProps') &&
hasOwnProperty('canEditHooks') &&
hasOwnProperty('canToggleSuspense') &&
hasOwnProperty('canToggleError')
);
}
export function print(inspectedElement, serialize, indent) {
return serialize({
context: inspectedElement.context,
events: inspectedElement.events,
hooks: inspectedElement.hooks,
id: inspectedElement.id,
owners: inspectedElement.owners,
props: inspectedElement.props,
rootType: inspectedElement.rootType,
state: inspectedElement.state,
});
}