Last active
February 4, 2020 08:56
-
-
Save devbyray/e028bad9cf02a3bba3f5bc590165a428 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 Constructor = new (...args: any[]) => {} | |
function elfDec<T extends Constructor>(superClass: T) { | |
const elf = new Elf() | |
const { width, height, weight, armour, type} = elf | |
return class extends superClass { | |
width = width | |
height = height | |
weight = weight | |
armour = armour | |
type = type | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment