Created
April 3, 2020 06:33
-
-
Save LironHazan/a658e893c90ebb353029e23a35fedc16 to your computer and use it in GitHub Desktop.
For my blog post
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
import {Ctr} from "../../../common/types"; | |
type ClazzDecorator<T> = (target: T) => void; | |
export const Injectable = () : ClazzDecorator<Ctr<any>> => { | |
return (target: Ctr<any>) => { | |
// this is needed so the design:paramtypes could be collected | |
console.log('inside: Injectable decorator'); | |
console.log(target.name, ' is used'); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment