Skip to content

docs: add TaskEither documentation and update README, changelog, roadmap, index - #25

Merged
pwlmc merged 2 commits into
mainfrom
copilot/add-docs-for-taskeither
Feb 25, 2026
Merged

docs: add TaskEither documentation and update README, changelog, roadmap, index#25
pwlmc merged 2 commits into
mainfrom
copilot/add-docs-for-taskeither

Conversation

Copilot AI commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Adds full documentation for TaskEither (the last undocumented effect) and updates the README to describe all effects instead of advertising the library as pre-v1.

Changes

  • docs/task-either.md — Replaces the WIP stub with a complete page: motivation, basic usage (creating, chaining, error handling, running), and a full API reference for all constructors (taskEither, taskLeft, fromEither, fromTask, tryCatch) and methods (map, mapLeft, flatMap, flatten, zip, ap, tap, tapLeft, match, getOrElse, orElse, run, all)

  • docs/index.md — Adds a TaskEither section to the Getting Started page, consistent with the existing Option, Either, Validation, and Task sections

  • README.md — Replaces the pre-v1 status block with a concise effects table covering all five types

  • CHANGELOG.md — Records the documentation additions under [Next]

  • ROADMAP.md — Checks off (doc) TaskEither documentation

TaskEither quick example

import { tryCatch, all } from "ok-fp/taskEither";

const fetchUser = (id: string) =>
  tryCatch(
    () => fetch(`/api/users/${id}`).then((r) => r.json()),
    (err) => `Fetch failed: ${err}`,
  );

// Chain async steps — short-circuits on first error
const greeting = fetchUser("a-001").map((user) => `Hello, ${user.name}!`);

const result = await greeting.run(); // Either<string, string>

// Concurrent requests
await all([fetchUser("a-001"), fetchUser("b-002")]).run(); // Either<string, User[]>

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

… and README

Co-authored-by: pwlmc <1276139+pwlmc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for taskEither and update related files docs: add TaskEither documentation and update README, changelog, roadmap, index Feb 25, 2026

@pwlmc pwlmc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pwlmc
pwlmc marked this pull request as ready for review February 25, 2026 23:05
@pwlmc
pwlmc merged commit 8534f44 into main Feb 25, 2026
7 checks passed
@pwlmc
pwlmc deleted the copilot/add-docs-for-taskeither branch February 25, 2026 23:05
pwlmc added a commit that referenced this pull request Mar 5, 2026
…map, index (#25)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pwlmc <1276139+pwlmc@users.noreply.github.com>
pwlmc added a commit that referenced this pull request Mar 5, 2026
…map, index (#25)

Co-authored-by: pwlmc <1276139+pwlmc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants