Type

확장 interface -extends를 사용 type - &를 사용 interface Student { major: string studentId: number } const mike: Student = { major: 'computer', studentId: 202212011 } type Student = { major: string studentId: number } const mike: Student = { major: 'computer', studentId: 202212011 } 선언적 확장 interface에서는 새로운 속성을 추가하기 위해 같은 이름을 선언할 수 있지만, type은 선언적 확장이 불가능하다. interface Student { major: string studentId: nu..
솔B
'Type' 태그의 글 목록