Skip to content

WEBDEV-8508: Migrate result-type into elements#52

Open
jbuckner wants to merge 3 commits into
mainfrom
WEBDEV-8508-migrate-result-type
Open

WEBDEV-8508: Migrate result-type into elements#52
jbuckner wants to merge 3 commits into
mainfrom
WEBDEV-8508-migrate-result-type

Conversation

@jbuckner
Copy link
Copy Markdown
Collaborator

@jbuckner jbuckner commented May 27, 2026

Move @internetarchive/result-type into src/types/result.ts per WEBDEV-8506 (#50) — smallest link in the chain: one pure-TS Result<T, E> interface that metadata-service uses to wrap success/error responses.

  • result.ts — exact copy of the interface.
  • result.test.ts — ported to Vitest; test-internal enumconst … as const for erasableSyntaxOnly.

Blocked by #50; blocks WEBDEV-8510 (metadata-service). Build + 213 tests + circular green. QA-waived — types only.

WEBDEV-8508

Moves @internetarchive/result-type into src/types/result.ts. Pure
TypeScript type — no runtime artifact. Test ported to vitest; the
FooErrorType enum used by the error test became a const object for
erasableSyntaxOnly compatibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

PR Preview Action v1.8.1

🚀 View preview at
https://internetarchive.github.io/elements/pr/pr-52/

Built to branch ghpages at 2026-06-01 19:54 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.66%. Comparing base (9a3b0f3) to head (b809807).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   78.75%   79.66%   +0.90%     
==========================================
  Files          16       16              
  Lines         645      659      +14     
  Branches      168      177       +9     
==========================================
+ Hits          508      525      +17     
+ Misses         95       90       -5     
- Partials       42       44       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@bfalling bfalling left a comment

Choose a reason for hiding this comment

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

LGTM

Add an interactive `result-story` built on the shared `story-template`,
illustrating the two shapes of `Result<T, E>` (success/error) and the
narrowing pattern a caller uses to consume one. Broaden the demo
`app-root.ts` glob to `../src/**/*-story.ts` so stories outside
`elements`/`labs` are auto-discovered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

3 participants