patch(return types): union return type with undefined. #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
React query data is in union with undefined by default.
Previously, we were overriding the default data type of react query.
This causes the issue where the default return type was never marked as undefined.
It should always be possible for the default data to be undefined.
Now we union with undefined.
Exporting the default return type, closes #32
Re-did some of the typings to make it easier to change types.
Added to the example showing how to override the return type for the data, which was addressed in #29
Now, the generator passes the open API descriptions as JSDoc comments to the generated hooks and marks the methods as depreciated if marked in the spec. This closes: #18
Showing undefined listed in union on return type (as react query would do)
New JSDoc:
With deprecated indicator:
Exporting helper types for consumers if they need: