Skip to content

Instantly share code, notes, and snippets.

@devbyray
Last active February 4, 2020 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devbyray/e028bad9cf02a3bba3f5bc590165a428 to your computer and use it in GitHub Desktop.
Save devbyray/e028bad9cf02a3bba3f5bc590165a428 to your computer and use it in GitHub Desktop.
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