Exclude type

Tags
type
부가 설명
Union 타입에서 일부분만 제거하고 싶은 경우는 Omit이 아니라 Exclude를 해야함
비고
 
Union 타입에서 일부분을 제거하고싶은 경우에는 Exclude를 이용해야 한다.
⚠️
Omit으로 제거하려고 하면 생각한 것과 많이 다른 타입이 된다.
 
type SimpleAuthStatus = "간편인증_취소" | "추가인증필요" | "정상완료" | "간편인증_재시도_횟수_초과" | "응답_대기시간_초과" | "간편인증_오류" | "간편인증_미진행"; type errorSimpleAuthStatus = Exclude<SimpleAuthStatus, '추가인증필요' | '정상완료' | '간편인증_취소'>; // type errorSimpleAuthStatus = "간편인증_재시도_횟수_초과" | "응답_대기시간_초과" | "간편인증_오류" | "간편인증_미진행"