Back to Type Challenges

README.Ja

questions/00043-easy-exclude/README.ja.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/ja" 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.ko.md" target="_blank"></a> </p><!--info-header-end-->

組み込みの型ユーティリティExclude <T, U>を使用せず、Uに割り当て可能な型をTから除外する型を実装します。

例えば:

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

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