TypeScript에서의 this interface Cat { name: string age: number } const cat:Cat = { name: 'Lucy', age: 1 } function hello(this: Cat, message:string) { console.log(`hello ${this.name}, ${message}`) } hello.call(cat, 'you are pretty awesome!') 일반 함수에서의 this는 호출 위치에서 정의가 된다. 위 코드에서 this는 call 메서드 속 cat 객체 데이터를 기준으로 호출하고 있다. 이런 경우에, this 타입을 지정해줄 수 있다. 매개변수처럼 보일 수 있으나 함수 내부에서 사용할 수 있는 this 키워드의 타입을 지정해주..