option-t
https://github.com/option-t/option-t
Result (Rust)やOptionを提供するTypeScriptのlibrary
Tree-shakableに作られている
読み込み方
全てoption-t/*の形のsubmodulesになっている
Public API list
Maybe
https://esm.sh/option-t@49.1.0/maybe
API Reference
Nullable
https://esm.sh/option-t@49.1.0/nullable
API Reference
Result<T, E>
https://esm.sh/option-t@49.1.0/plain_result
API Reference
Option<T>(deprecated)
https://esm.sh/option-t@49.1.0/plain_option
API Reference
Undefinable
https://esm.sh/option-t@49.1.0/undefinable
API Reference
それぞれ、option-t/**/*という形で、函数が一つずつ別のsubmoduleとして提供されている
Result<T, E>とかOption<T>をTSで使いたかったら、このlibraryを使うのが楽そうtakker.icon
/miyamonz/TSでResult型とかやりたいときのライブラリ調査#64f0371a385a9200008460cf
import pathがやや気になるか?
同じこと思ったtakker.icon
もっともそれ以外は全く気にならない
/mrsekut-p/option-t
ES5の範囲でOption<T>型を表すライブラリ、option-t を作った - saneyuki_s log
neverthrowと比較したoption-tについて - saneyuki_s log
code:mod.ts
export * from "npm:option-t@49/maybe";
export * from "npm:option-t@49/nullable";
export * from "npm:option-t@49/undefinable";
export * from "npm:option-t@49/plain_result";
#2024-08-08 09:20:02
#2024-07-14 10:43:15
#2024-07-13 13:29:17