UNPKG

958 BTypeScriptView Raw
1/// <reference types="lodash" />
2import debounce from 'lodash/debounce';
3import throttle from 'lodash/throttle';
4import { Props, ReactResizeDetectorDimensions } from './ResizeDetector';
5export declare type patchResizeHandlerType = ReturnType<typeof debounce> | ReturnType<typeof throttle> | ResizeObserverCallback;
6export declare const patchResizeHandler: (resizeCallback: ResizeObserverCallback, refreshMode: Props['refreshMode'], refreshRate: Props['refreshRate'], refreshOptions: Props['refreshOptions']) => patchResizeHandlerType;
7export declare const isFunction: (fn: any) => boolean;
8export declare const isSSR: () => boolean;
9export declare const isDOMElement: (element: any) => boolean;
10export declare const createNotifier: (onResize: Props['onResize'], setSize: React.Dispatch<React.SetStateAction<ReactResizeDetectorDimensions>>, handleWidth: boolean, handleHeight: boolean) => ({ width, height }: ReactResizeDetectorDimensions) => void;