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

feat: add NoContent generic #798

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

Conversation

Syjalo
Copy link
Contributor

@Syjalo Syjalo commented Jul 27, 2023

Please describe the changes this PR makes and why it should be merged:

This PR adds NoContent generic so that users can choose the type for their 204 No Content responses.

For examlpe @discordjs/rest returns ArrayBuffer if the content type isn't application/json and @discordjs/core will be able to use RESTMethodRouteResult<ArrayBuffer>

@vercel
Copy link

vercel bot commented Jul 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-api-types ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 27, 2023 9:42pm

@yuzudev
Copy link

yuzudev commented Jul 28, 2023

Does this break old code? I'm concerned

@Syjalo
Copy link
Contributor Author

Syjalo commented Jul 28, 2023

This doesn't

@MARCROCK22
Copy link
Contributor

This is not about @discordjs/rest or @discordjs/core typings, we are talking about discord-api-types. discord-api-types should a library with no relation with anothers. The types of discord-api-types must be accurate to the docs.
This does not fix the problem. You just made it worse.

@vladfrangu vladfrangu requested review from a team as code owners December 20, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants