import { Ref, MutableRefObject } from 'react'; interface Props { [key: string]: any; } type PropsArg = Props | null | undefined; type TupleTypes = { [P in keyof T]: T[P]; } extends { [key: number]: infer V; } ? NullToObject : never; type NullToObject = T extends null | undefined ? {} : T; type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; /** * Calls all functions in the order they were chained with the same arguments. */ declare function chain(...callbacks: any[]): (...args: any[]) => void; declare let idsUpdaterMap: Map; /** * Merges two ids. * Different ids will trigger a side-effect and re-render components hooked up with `useId`. */ declare function mergeIds(idA: string, idB: string): string; /** * Merges multiple props objects together. Event handlers are chained, * classNames are combined, and ids are deduplicated - different ids * will trigger a side-effect and re-render components hooked up with `useId`. * For all other props, the last prop object overrides all previous ones. * @param args - Multiple sets of props to merge together. */ declare function mergeProps(...args: T): UnionToIntersection>; declare function mergeRefs(...refs: Array | MutableRefObject | null | undefined>): Ref; export { chain, idsUpdaterMap, mergeIds, mergeProps, mergeRefs };