7
클래스 메서드 내부의 타이프 스크립트 "this"
나는 이것이 아마도 고통 스러울 정도로 기본적인 것이라는 것을 알고 있지만, 나는 그것을 둘러싼 내 머리를 감싸는 데 어려움을 겪고 있습니다. class Main { constructor() { requestAnimationFrame(this.update); //fine } update(): void { requestAnimationFrame(this.update); //error, because this is window } } 프록시가 필요한 경우이므로 Jquery를 사용한다고 가정 해 보겠습니다. class Main …