Created
June 12, 2019 12:56
-
-
Save lyleunderwood/3e2ce30682dda5f5f882e48159c2ab0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ScrollToOptions = { | |
top?: number; | |
left?: number; | |
behavior?: 'auto' | 'smooth'; | |
} | |
declare class ScrollingElement extends Element { | |
scroll(x: number, y: number): void; | |
scroll(options: ScrollToOptions): void; | |
scrollTo(x: number, y: number): void; | |
scrollTo(options: ScrollToOptions): void; | |
scrollBy(x: number, y: number): void; | |
scrollBy(options: ScrollToOptions): void; | |
} | |
export const asScrollingElement = (element: Element): ScrollingElement => | |
(element: any); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment