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

docs are out of sync with types #2296

Closed
Conduitry opened this issue Aug 26, 2021 · 2 comments · Fixed by #2299
Closed

docs are out of sync with types #2296

Conduitry opened this issue Aug 26, 2021 · 2 comments · Fixed by #2299
Labels
bug Something isn't working documentation Improvements or additions to documentation types / typescript
Milestone

Comments

@Conduitry
Copy link
Member

Describe the bug

In the discussion on #2215, it was decided that rawBody should be null (not an empty array) for requests that have no body, and body would be as well. This isn't reflected in the published or documented types.

Reproduction

n/a

Logs

n/a

System Info

n/a

Severity

annoyance

Additional Information

No response

@Conduitry Conduitry added bug Something isn't working documentation Improvements or additions to documentation types / typescript labels Aug 26, 2021
@JeanJPNM
Copy link
Contributor

I think that's already the case:

export type RawBody = null | Uint8Array;
export type ParameterizedBody<Body = unknown> = Body extends FormData
? ReadOnlyFormData
: (string | RawBody | ReadOnlyFormData) & Body;

@JeanJPNM
Copy link
Contributor

Yep, the docs need to be updated.

@benmccann benmccann changed the title rawBody/body types should indicate that they are nullable/optional docs are out of sync with types Aug 26, 2021
@benmccann benmccann added this to the 1.0 milestone Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation types / typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants