/** * Element interface extension to add scrollIntoViewIfNeeded method */ interface Element { /** * Checks if element in view and scroll to element if it's not * @param centerIfNeeded - true, if the element should be aligned so it is centered within the visible area of the scrollable ancestor. */ scrollIntoViewIfNeeded: (centerIfNeeded?: boolean) => void; }