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

PermissionOverwrites#toJSON typing incorrect #10194

Closed
BigBrainAFK opened this issue Mar 28, 2024 · 1 comment
Closed

PermissionOverwrites#toJSON typing incorrect #10194

BigBrainAFK opened this issue Mar 28, 2024 · 1 comment

Comments

@BigBrainAFK
Copy link
Contributor

BigBrainAFK commented Mar 28, 2024

Which package is this bug report for?

discord.js

Issue description

The typing of the toJSON function for PermissionOverwrites instances is typed incorrectly.

As far as I can see according to the relevant code it should just be typed to return a JSON object.

Code sample

...
JSON.stringify(overwrites.toJSON())
...

Versions

  • discord.js 14.14.1
  • NodeJS 18.19.0
  • Typescript 4.9.5
  • macOS 14.3.1

Issue priority

Low (slightly annoying)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response

@Jiralite
Copy link
Member

public toJSON(): unknown;

I would not say this is incorrect. Regardless, this is a duplicate of #9432—make sure to search for existing issues!

@Jiralite Jiralite closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants