TS Custom Type GuardType Proposition Typeiftypeofinstanceof===ininterface A { x: number } interface B { y: string } function doStuff(q: A | B) { if ('x' in q) else } 타입 가드https://radlohead.gitbook.io/typescript-deep-dive/type-system/typeguard