Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omarkdev/4e550681929666e36b412060553a2d23 to your computer and use it in GitHub Desktop.
Save omarkdev/4e550681929666e36b412060553a2d23 to your computer and use it in GitHub Desktop.
function setApiVersion(constructor) {
constructor.api = '0.0.1';
}
@setApiVersion
class Wizard {}
console.log(Wizard); // { [Function: Wizard] api: '0.0.1' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment