import { ComponentProps, Reducer } from 'react'; import { DescendantsList } from './Descendants.types'; export type DescendantsState = DescendantsList; export type DescendantsReducerAction = { type: 'register'; id: string; ref: React.RefObject; props?: ComponentProps; } | { type: 'remove'; id: string; } | { type: 'update'; id: string; props?: ComponentProps; }; export type DescendantsReducerType = Reducer, DescendantsReducerAction>; /** * A function matching the React.Reducer signature, * that accepts a `DescendantsList` as current state, * and custom `action` object to modify the descendants list. * * @param currentState {@link DescendantsState} The current reducer state * @param action {@link DescendantsReducerAction} The reducer action type * @returns A modified {@link DescendantsState} object */ export declare const descendantsReducer: (currentState: DescendantsState, action: DescendantsReducerAction) => DescendantsState; //# sourceMappingURL=DescendantsReducer.d.ts.map