discord-api-types icon indicating copy to clipboard operation
discord-api-types copied to clipboard

feat: add `NoContent` generic

Open Syjalo opened this issue 1 year ago • 4 comments

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>

Syjalo avatar Jul 27 '23 21:07 Syjalo

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

vercel[bot] avatar Jul 27 '23 21:07 vercel[bot]

Does this break old code? I'm concerned

yuzudev avatar Jul 28 '23 04:07 yuzudev

This doesn't

Syjalo avatar Jul 28 '23 05:07 Syjalo

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.

MARCROCK22 avatar Jul 28 '23 21:07 MARCROCK22