Skip to content

Derive NODE_KEYS from interfaces with compile-time guards#30

Merged
pallaoro merged 1 commit intomainfrom
loop-validation
Apr 13, 2026
Merged

Derive NODE_KEYS from interfaces with compile-time guards#30
pallaoro merged 1 commit intomainfrom
loop-validation

Conversation

@pallaoro
Copy link
Copy Markdown
Member

Summary

  • Move allowed-key definitions next to their interfaces in types.ts
  • CheckKeys<T, K> produces a compile error if the key tuple drifts from the interface
  • validate.ts imports NODE_KEYS instead of maintaining a duplicate list
  • Bumps to 0.9.6

Test plan

  • tsc --noEmit passes
  • Removing a key from a tuple → compile error: "Missing key(s) from interface in tuple"
  • Adding a bogus key to a tuple → compile error: "Extra key(s) in tuple not on interface"
  • All 117 tests pass

Move allowed-key definitions next to their interfaces in types.ts.
CheckKeys<T, K> produces a compile error if the key tuple drifts
from the interface — missing or extra keys are caught at build time.
validate.ts imports NODE_KEYS instead of maintaining a duplicate list.
@pallaoro pallaoro merged commit 0caf686 into main Apr 13, 2026
1 check passed
pallaoro added a commit that referenced this pull request Apr 25, 2026
Main already shipped 0.9.6 (NODE_KEYS, #30) while this PR was open.
pallaoro added a commit that referenced this pull request Apr 25, 2026
* Skip webhook server on EADDRINUSE instead of crashing, bump to 0.9.6

* Bump to 0.9.7

Main already shipped 0.9.6 (NODE_KEYS, #30) while this PR was open.
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.

1 participant