2020. 10. 2. 15:26, Developer
function print(target:any,methodName:string, paramIndex:number){
console.log(target);
console.log(methodName);
console.log(paramIndex);
}
class Person {
private _name: string;
private _age: number;
constructor(name: string, @print age: number) {
this._name = name;
this._age = age;
}
hello(@print message:string){
console.log(message);
}
}
'Developer' 카테고리의 다른 글
[Angular]click 이벤트 바인딩 (0) | 2020.10.03 |
---|---|
[typescript]타입가드 (0) | 2020.10.02 |
[typescript]Decorator - property에 decorator 붙혀서 통제하기 (0) | 2020.10.02 |
[typescript]Decorator - 메소드에 decorator 붙혀서 통제하기 (0) | 2020.10.02 |
[typescript]Decorator - 기본 (0) | 2020.10.02 |
Comments, Trackbacks