Skip to content

feat: typed Object walk helpers - #14

Merged
bvandrc merged 2 commits into
mainfrom
feat/typed-object-walks
Sep 25, 2026
Merged

bvandrc merged 2 commits into
mainfrom
feat/typed-object-walks

Conversation

@bvandrc

@bvandrc bvandrc commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Requested by Blake · project thread

Before: only the builtin Object.keys/entries/fromEntries, so a typed walk needs a hand-written cast.

After: typedKeys, typedEntries, and typedFromEntries, the plain-function helpers from bvandrc/TaskRankr#443, are exported from src/utils/index.ts.

How: typedKeys and typedEntries take plain records only, so an array is refused rather than mistyped. No code here casts a walk yet, so nothing calls them and they stay out of the bundle. type-fest was already a peer dependency. CLAUDE.md documents them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GKtR2Uc6Jx7WzoWjq49SmC

@bvandrc bvandrc self-assigned this Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Diff Line Count

codecomments
+~−+−
Source26013241
Docs11000
Total27113241
GitHub reports +57 / −16

~ is a line changed in place — cloc counts it once rather than as an add plus a delete, so these columns do not sum to GitHub's.
Blank lines are excluded above: +5 / −1.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 1.42 kB

ℹ️ View Unchanged
Filename Size Change
dist/index.js 1.42 kB +3 B (+0.21%)

compressed-size-action

The `Object` builtins with the cast a call site would otherwise write by hand, as plain exported functions: a missing import is then a compile error at the call site, where a global installed by a side-effect import fails only at runtime. Mirrors TaskRankr #443, including #442's narrowing to plain records.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKtR2Uc6Jx7WzoWjq49SmC
@bvandrc
bvandrc force-pushed the feat/typed-object-walks branch from 73d24d5 to dc2a8f0 Compare September 25, 2026 07:59
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKtR2Uc6Jx7WzoWjq49SmC
@bvandrc
bvandrc marked this pull request as ready for review September 25, 2026 08:36
@bvandrc
bvandrc merged commit 0aba3c9 into main Sep 25, 2026
5 checks passed
@bvandrc
bvandrc deleted the feat/typed-object-walks branch September 25, 2026 08:37
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