/** * Scroll to the specified position in the target element. * * @remarks * This function scrolls to the specified position in the target HTML element, which can be the window or any other HTML * element. If no target element is provided, it defaults to the window object. * * @param options - The options for the scroll operation. * @param options.x - The horizontal position to scroll to. * @param options.y - The vertical position to scroll to. * @param options.target - The target element to scroll. Defaults to the window object. * @param options.behavior - The scroll behavior. Can be "auto" (default) or "smooth". * * @example * ```typescript * import { scrollTo } from "./scrollTo"; * * // Scroll to (0, 0) in the window object with smooth behavior * scrollTo({ x: 0, y: 0, behavior: "smooth" }); * * // Scroll to (100, 100) in an HTML element with auto behavior * const element = document.getElementById("my-element"); * scrollTo({ x: 100, y: 100, target: element }); * ``` * * @since 1.0.0 */ type TargetType = HTMLElement | Element | Window | null | undefined; type ScrollToOptions = { x: number; y: number; target?: TargetType; behavior?: 'auto' | 'smooth'; }; export declare const scrollTo: ({ x, y, target, behavior, }: ScrollToOptions) => void; export default scrollTo;