2018/01/03

이 글은 PC 버전 TISTORY에 최적화 되어있습니다. 서론 모든 데코레이터는 그냥 Function이고 그냥 Function의 이름을 가져다 불러 쓰면 됩니다. 1. Class Decorator2. MethodDecorator3. Property Decorator4. Parameter Decorator Class Decoratorfunction hello(constructorFn: Function) { console.log(constructorFn);} @helloclass Person { } 1. 딱히 클래스 인스턴스를 만들지 않아도 접근 가능하다.2. 인자로 constructor Function을 가져가는데(class Decorator의 signature이므로 무조건 넣기) Person의 const..
에반황
'2018/01/03 글 목록