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

There is not strict enough type checking on referenceEntries when using the decorator from @nova/react-test-utils #126

Closed
sjwilczynski opened this issue Oct 16, 2024 · 2 comments
Assignees

Comments

@sjwilczynski
Copy link
Contributor

Using decorator is pretty comfy but to prevent error we need to make typings as strict as possible. Currently, anything can be a key in referenceEntries while only one of component props could be. Can we make this somehow stricter. Could we have a type error on using StoryObjWithFragmentRefs when wrong thing is passed in referenceEntries?

@sjwilczynski sjwilczynski self-assigned this Oct 16, 2024
@sjwilczynski
Copy link
Contributor Author

Maybe we could also make error messages more friendly, ref https://dev.to/reallygood/making-typescript-errors-friendly-custom-messages-for-easier-debugging-5672

@sjwilczynski
Copy link
Contributor Author

Fixed by #128

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