Back to Type Challenges

README.Ja

questions/00529-medium-absolute/README.ja.md

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

string, number または bigint を受け取り、正の数を出力する Absolute 型を実装します。

例えば

ts
type Test = -100;
type Result = Absolute<Test>; // expected to be "100"
<!--info-footer-start-->

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