Last active
February 27, 2020 19:29
-
-
Save omarkdev/3e66db24a2eb92b70efe7dc8149a913e 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
function setApiVersion(constructor) { | |
return class extends constructor { | |
version = '0.0.1'; | |
} | |
} | |
@setApiVersion | |
class Wizard { | |
} | |
console.log(new Wizard()); // class_1 { version: '0.0.1' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment