Back to Type Challenges

README.Ja

questions/00898-easy-includes/README.ja.md

latest1.8 KB
Original Source
<!--info-header-start--><h1>Includes </h1><blockquote><p>by null <a href="https://github.com/kynefuk" target="_blank">@kynefuk</a></p></blockquote><p><a href="https://tsch.js.org/898/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-->

JavaScriptのArray.include関数を型システムに実装します。この型は、2 つの引数を受け取り、truefalseを出力しなければなりません。

例えば:

ts
type isPillarMen = Includes<['Kars', 'Esidisi', 'Wamuu', 'Santana'], 'Dio'> // expected to be `false`
<!--info-footer-start-->

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