Created
March 6, 2020 06:48
-
-
Save jsmanifest/68e71eb72a113e6a8ad003b9fc844c5b to your computer and use it in GitHub Desktop.
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
class SomeElement<T> { | |
private element: T | |
constructor(element: T) { | |
this.element = element | |
} | |
getElement() { | |
return this.element | |
} | |
} | |
const elem = document.createElement('button') | |
const button = new SomeElement<HTMLButtonElement>(elem) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment