Skip to content

refactor: Typing support for component collections#308

Merged
TroyAlford merged 4 commits intodevelopfrom
refactor/typings-for-component-collections
Sep 19, 2025
Merged

refactor: Typing support for component collections#308
TroyAlford merged 4 commits intodevelopfrom
refactor/typings-for-component-collections

Conversation

@TroyAlford
Copy link
Owner

@TroyAlford TroyAlford commented Sep 19, 2025

Summary

Refactors TypeScript typings for the components prop to support nested component collections and adds support for additional unary operations.

What Changed

  • Type Safety: Added ComponentType and ComponentsType definitions for better component collection support
  • Unary Operations: Added bitwise NOT (~) and typeof operator support
  • Error Handling: Fixed error handling logic to prevent execution on parse errors
  • Developer Experience: Improved IntelliSense and autocomplete for complex component hierarchies

Why

  • Better type safety when passing nested component collections
  • More complete JavaScript expression evaluation
  • Cleaner, more maintainable type definitions
  • More robust error handling

Closes #297
Closes #304
Closes #305
Closes #306
Closes #307

@TroyAlford TroyAlford marked this pull request as ready for review September 19, 2025 05:24
- Add bitwise NOT (~) operator support
- Add typeof operator support
- Update test cases to cover new operations
- Fix test formatting and organization
- Move error handling logic before parsing to prevent execution on parse errors
- Add test coverage for renderError prop functionality
- Remove describe.only from unary operations test suite
@TroyAlford TroyAlford merged commit 115b478 into develop Sep 19, 2025
1 check passed
@TroyAlford TroyAlford deleted the refactor/typings-for-component-collections branch September 19, 2025 05: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.

Components resolver typing issue Using components as * from

1 participant