Back to Type Challenges

README.Ko

questions/00043-easy-exclude/README.ko.md

latest1.8 KB
Original Source
<!--info-header-start--><h1>Exclude </h1><blockquote><p>by Zheeeng <a href="https://github.com/zheeeng" target="_blank">@zheeeng</a></p></blockquote><p><a href="https://tsch.js.org/43/play/ko" target="_blank"></a> &nbsp;&nbsp;&nbsp;<a href="./README.md" target="_blank"></a> <a href="./README.zh-CN.md" target="_blank"></a> <a href="./README.ja.md" target="_blank"></a> </p><!--info-header-end-->

T에서 U에 할당할 수 있는 타입을 제외하는 내장 제네릭 Exclude<T, U>를 이를 사용하지 않고 구현하세요.

예시:

ts
type Result = MyExclude<'a' | 'b' | 'c', 'a'> // 'b' | 'c'
<!--info-footer-start-->

<a href="../../README.ko.md" target="_blank"></a> <a href="https://tsch.js.org/43/answer/ko" target="_blank"></a> <a href="https://tsch.js.org/43/solutions" target="_blank"></a> <!--info-footer-end-->