Created
July 18, 2018 07:19
-
-
Save brachi-wernick/967566a1652a4b057a220b0d77752d28 to your computer and use it in GitHub Desktop.
activate decorator
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
export const ACTIVATE_FIELD_NAME = "__activate__"; | |
export function Activate(permissions: string[]) { | |
return function decorator(target) { | |
target[ACTIVATE_FIELD_NAME] = permissions; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment