/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 * Copyright (c) 2018 Juan Valencia (https://github.com/calvellido/focus-options-polyfill/blob/master/LICENSE)
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow strict
 */
import supportsFocusOptions from './supportsFocusOptions';
const canUseFocusOptions = supportsFocusOptions();
type FocusOptions = {|
  preventScroll?: boolean
|};
type ScrollPositions = Array<[Element, number, number]>;
/**
 * Record the current scroll positions of all scrollable ancestors
 * of the element.
 */

declare function getScrollPositions(node: HTMLElement): ScrollPositions;
/**
 * Restore the scroll positions of each element in the records.
 */

declare function restoreScrollPositions(scrollPositions: ScrollPositions): void;
/**
 * A "polyfill" for element.focus({preventScroll: true});
 * https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option
 */

declare export default function focusWithOptions(node: HTMLElement, options?: FocusOptions): any;