/**
 * Copyright (c) Nicolas Gallagher.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */
import type { CallbackRef, ResizeEvent } from '../../__types__';
import supportsDOM from '#internal/supportsDOM';
import { useCallback } from 'react';
import { useRefCallback } from '#internal/useRefCallback';
export type ResizeConfig = {|
  box?: 'border-box' | 'content-box',
  onResize: ?(e: ResizeEvent) => void,
|};
const HANDLE_RESIZE_KEY = '__reactHandleResize';
let didWarn = false;
let resizeObserver = null;
declare function getResizeObserver(): ?ResizeObserver; // TODO(#37): Support multiple uses

declare export function useResize(config: ResizeConfig): CallbackRef;