Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guards idea #5

Open
kalagin opened this issue Nov 2, 2022 · 0 comments
Open

Guards idea #5

kalagin opened this issue Nov 2, 2022 · 0 comments

Comments

@kalagin
Copy link

kalagin commented Nov 2, 2022

some time ago I was discussing the possibility of typed validation of childrens and components that are passed through props.

my discussion finish with creating this package https://github.com/lulldev/prop-types-required-nodes, where in dev mode and prop-types we can check specific components in props. After that i research type-safe realisation but i was not able to narrow the ReactElement type.

what you think about it? sometimes i play with https://github.com/hyperhype/hyperscript and types.
final idea: strict jsx like arche or hyperscript with garanties in props and make jsx testable on function level (if we had nested typed functions - we can create structure to expect it in tests)

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

No branches or pull requests

1 participant