import { Fiber } from 'react-reconciler'; import { HeapIgnoreProps } from './HeapIgnoreProps'; export interface PropExtractorCriteria { /** * A list of properties to include in the component hierarchy. */ include?: Array; /** * A list of properties to exclude from the component hierarchy. * * This can be used to universally exclude a property collected by default. */ exclude?: Array; /** * Properties that contain text, to be filtered with ``. */ textProps?: Array; } export interface PropExtractorConfig { [componentName: string]: PropExtractorCriteria & ComponentFilteringCriteria; } export interface ComponentFilteringCriteria { bottomOfHierarchy?: boolean; topOfHierarchy?: boolean; omitFromHierarchy?: boolean; omitIfMissingProps?: boolean; } export interface HeapComponentOptions { eventProps?: PropExtractorCriteria; filtering?: ComponentFilteringCriteria; } export interface ComponentHierarchyTraversalElement { elementName: string; fiberNode: FiberNode; filteringCriteria: Required; nodeProps?: Record; ignoreProps: Required; heapOptions?: HeapComponentOptions; nodeText?: string; textCollectionNode?: FiberNode; } export interface StateNode { props?: { [propertyKey: string]: any; }; heapOptions?: HeapComponentOptions; } export interface FiberNode { memoizedProps: { [propertyKey: string]: any; } | undefined; stateNode: StateNode | undefined; type: { heapOptions?: HeapComponentOptions; displayName?: string; name?: string; } | string | null | undefined; child: FiberNode | null; sibling: FiberNode | null; key: string | null; return: FiberNode | null; } export interface VirtualDOMComponent { _fiber?: Fiber; _reactInternals?: Fiber; _reactInternalFiber?: Fiber; _internalFiberInstanceHandleDEV?: Fiber; currentTarget?: VirtualDOMComponent; }