type Animal = {
      age: number;
      type: 'dog',
    };
    const person = {
      name: 'zero',
      age: 28,
      sayName() {
        this;
        this.name;
      },
    /*
    this: {
      name: string;
      age: number;
      sayName(): void;
      sayAge(this: Animal): void;
    }
    */
    
    // (property) name: string
      sayAge(this: Animal) {
        this;
        this.type;
      }
    };
    // this: Animal
    // (property) type: "dog"
    person.sayAge.bind({ age: 3, type: 'dog' });
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.