Type alias extends

Tony·2021년 11월 15일
0
  type Performance = {
    playID: 'hamlet' | 'asLike' | 'othello';
    audience: number;
  };

  type PlayDetail = {
    name: string;
    type: 'tragedy' | 'comedy';
  };

  type StatementPerformance = Performance & { // Type alias extension
    play: PlayDetail;
  };
profile
움직이는 만큼 행복해진다

0개의 댓글