Skip to content

Conversation

@bowheart
Copy link
Collaborator

Summary

  • Add Events generic parameter to ExportsInfusedSetter and StateHookTuple types
  • Update AtomInstance#x to include Events in its type signature
  • Update injectAtomState and useAtomState return types to include Events
  • Add comprehensive tests for all three APIs verifying partial events reach listeners

Test plan

  • Added tests for useAtomState setter with partial custom events
  • Added tests for injectAtomState setter with partial custom events
  • Added tests for AtomInstance#x setter with partial custom events
  • Added TypeScript type tests for all three APIs
  • Added edge case tests (empty events, function setters, atoms without custom events)
  • All existing tests pass

🤖 Generated with Claude Code

Update ExportsInfusedSetter type to accept partial events with full
TypeScript support for custom events. This allows setters returned from
useAtomState, injectAtomState, and AtomInstance#x to pass events to
listeners when setting state.

Changes:
- Add Events generic parameter to ExportsInfusedSetter and StateHookTuple
- Update AtomInstance#x to include Events in its type signature
- Update injectAtomState and useAtomState return types
- Add comprehensive tests for all three APIs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bowheart bowheart force-pushed the exports-infused-setter-partial-events branch from 427c7c7 to d9b2e8c Compare December 11, 2025 18:51
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