📎아이템 11 잉여 속성 체크의 한계 인지하기
📍 잉여 속성 체크
📍 예제
예제1
interface Room {
numDoors: number;
ceilingHeightFt: number;
}
const r: Room = {
numDoors: 1,
ceilingHeightFt: 10,
elephant: 'present',
// ~~~~~~~ Object literal may only specify known properties,
// and 'elephant' does not exist in type 'Room'
};예제2
예제3
예제4
잉여 속성 체크
📍 요약
Last updated