interface sample {
    x: number
    y: number
    z: number
}

type sampleXY = Omit<sample, "z">

const given: sample = {
    x: 1, y: 2, z: 3
}

const filtered: sampleXY = given;

console.log(filtered);



내가 원한 결과는 x,y인데

실제 결과는 x,y,z임


JS로 트랜스파일돼서 타입이 박살나는건가?


도와줘 ... 못찾겠어