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

[FEATURE] improve types to not allow random function return properties to be provided #370

Open
filmaj opened this issue Oct 21, 2024 · 0 comments
Labels
feature request New feature or request semver:patch requires a patch version number bump

Comments

@filmaj
Copy link
Contributor

filmaj commented Oct 21, 2024

This happened when a user inadvertently provided return { complete: false } (rather than the correct { completed: false } - a missing d caused a lot of confusion!).

Screenshot 2024-10-21 at 11 47 46 AM

In the above, while there is an autocomplete experience guiding the user towards specifying the correct property completed with a d, it is still possible for the user to e.g. not notice or otherwise typo the property.

A fix here should add a type test that ensures providing invalid / typo'd properties (such as complete vs. completed) raises a TypeScript error.

@filmaj filmaj added feature request New feature or request semver:patch requires a patch version number bump labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request semver:patch requires a patch version number bump
Projects
None yet
Development

No branches or pull requests

1 participant