You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Eg. I'm always frustrated when [...]
The ChannelType enum typings are declared at the top of typings/index.d.ts, outside of the discord.js module. Thus, they appear at the root of all TypeScript projects which have discord.js in their packages.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Eg. I'm always frustrated when [...]
The
ChannelType
enum typings are declared at the top oftypings/index.d.ts
, outside of thediscord.js
module. Thus, they appear at the root of all TypeScript projects which have discord.js in their packages.Type Definition:
discord.js/typings/index.d.ts
Lines 1 to 10 in b8fd3f6
For example, if I import
discord.js
as follows:then I would expect to access
ChannelType
as such:Instead,
ChannelType
appears at the root:and gives an error at runtime:
Describe the ideal solution
A clear and concise description of what you want to happen.
Move
ChannelType
typings into thediscord.js
module.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I need to use this for
GuildCreateChannelOptions
as seen here:discord.js/typings/index.d.ts
Lines 2562 to 2565 in b8fd3f6
So for now I just use the
any
type and assign"text"
or"voice"
as needed.Additional context
Add any other context or screenshots about the feature request here.
I've noticed a near duplicate inside
Constants
:discord.js/typings/index.d.ts
Lines 556 to 564 in b8fd3f6
Not sure what to do with this.
The text was updated successfully, but these errors were encountered: