Last active
December 8, 2020 01:02
-
-
Save shiftyp/df9e20ae46435b730dc6a6c63e745d69 to your computer and use it in GitHub Desktop.
Unfortunate TypeScript error
This file contains hidden or 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
interface RefHandles { | |
scrollToIntent: HTMLElement['scrollTo']; | |
} | |
const targetElement = document.createElement('div'); | |
const handles: RefHandles = { | |
scrollToIntent(...args: any[]) { | |
targetElement.scrollTo(...args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment