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

Use unknown instead of any for better type safety #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paulpoot
Copy link

@paulpoot paulpoot commented Apr 2, 2021

To start this PR off, thank you for this project - I think it's a great tool to improve code quality and developer experience in Contentful/Typescript projects.

Now, I noticed that the generator sometimes returns any as a type. While it works, generally it's advised to use the unknown type in situations like this one, where more detailed typing information is unavailable. It's a minor change, but it does mean that the generated types provide more safety.

I'm curious to hear your thoughts about this and hereby provide a PR with the change.

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.

1 participant