import { RefCallback, RefObject } from 'react';
export type ObservedSize = {
    width: number | undefined;
    height: number | undefined;
};
export type ResizeHandler = (size: ObservedSize) => void;
type HookResponse<T extends Element> = {
    ref: RefCallback<T>;
} & ObservedSize;
export type ResizeObserverBoxOptions = 'border-box' | 'content-box' | 'device-pixel-content-box';
declare global {
    interface ResizeObserverEntry {
        readonly devicePixelContentBoxSize: ReadonlyArray<ResizeObserverSize>;
    }
}
type SubscriberCleanupFunction = () => void;
type SubscriberResponse = SubscriberCleanupFunction | void;
export declare function useResolvedElement<T extends Element>(subscriber: (element: T) => SubscriberResponse, refOrElement?: T | RefObject<T> | null): RefCallback<T>;
export type RoundingFunction = (n: number) => number;
export declare function useResizeObserver<T extends Element>(opts?: {
    ref?: RefObject<T> | T | null | undefined;
    onResize?: ResizeHandler;
    box?: ResizeObserverBoxOptions;
    round?: RoundingFunction;
}): HookResponse<T>;
export default useResizeObserver;
