什麼是 fp-ts-task-either?
使用 TaskEither 進行 TypeScript 中型別安全錯誤處理的功能非同步模式 來源:whatiskadudoing/fp-ts-skills。
使用 TaskEither 進行 TypeScript 中型別安全錯誤處理的功能非同步模式
透過命令列快速安裝 fp-ts-task-either AI 技能到你的開發環境
來源:whatiskadudoing/fp-ts-skills。
TaskEither combines the laziness of Task with the error handling of Either, providing a powerful abstraction for async operations that can fail.
| Create success | TE.right(value) | Wrap value in Right | | Create failure | TE.left(error) | Wrap error in Left | | From Promise | TE.tryCatch(promise, onError) | Convert Promise to TE | | Transform value | TE.map(f) | Apply f to success value | | Transform error | TE.mapLeft(f) | Apply f to error value |
| Chain operations | TE.chain(f) / TE.flatMap(f) | Sequence dependent operations | | Recover from error | TE.orElse(f) | Try alternative on error | | Handle both cases | TE.fold(onError, onSuccess) | Pattern match result | | Parallel array | TE.traverseArray(f) | Map + sequence in parallel |
為搜尋與 AI 引用準備的穩定欄位與指令。
npx skills add https://github.com/whatiskadudoing/fp-ts-skills --skill fp-ts-task-either使用 TaskEither 進行 TypeScript 中型別安全錯誤處理的功能非同步模式 來源:whatiskadudoing/fp-ts-skills。
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/whatiskadudoing/fp-ts-skills --skill fp-ts-task-either 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/whatiskadudoing/fp-ts-skills