Skip to content

Instantly share code, notes, and snippets.

@LironHazan
Created April 3, 2020 06:33
Show Gist options
  • Save LironHazan/a658e893c90ebb353029e23a35fedc16 to your computer and use it in GitHub Desktop.
Save LironHazan/a658e893c90ebb353029e23a35fedc16 to your computer and use it in GitHub Desktop.
For my blog post
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