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
types: Use ThreadChannel
and AnyThreadChannel
consistently
#10181
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ThreadChannel
and AnyThreadChannel
consistently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also don't forget to lint your codes
Signed-off-by: RedGuy12 <61329810+RedGuy12@users.noreply.github.com>
241bda6
to
15862db
Compare
Signed-off-by: cobalt <61329810+RedGuy12@users.noreply.github.com>
Signed-off-by: cobalt <61329810+RedGuy12@users.noreply.github.com>
Signed-off-by: cobalt <61329810+RedGuy12@users.noreply.github.com>
MessageManager: [manager: typeof MessageManager, holds: typeof Message]; | ||
// TODO: PermissionOverwriteManager: [manager: typeof PermissionOverwriteManager, holds: typeof PermissionOverwrites]; | ||
PresenceManager: [manager: typeof PresenceManager, holds: typeof Presence]; | ||
ReactionManager: [manager: typeof ReactionManager, holds: typeof MessageReaction]; | ||
ReactionUserManager: [manager: typeof ReactionUserManager, holds: typeof User]; | ||
// TODO: RoleManager: [manager: typeof RoleManager, holds: typeof Role]; | ||
StageInstanceManager: [manager: typeof StageInstanceManager, holds: typeof StageInstance]; | ||
ThreadManager: [manager: typeof ThreadManager, holds: typeof ThreadChannel]; | ||
ThreadManager: [manager: typeof ThreadManager, holds: AnyThreadChannel]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My hunch was correct: this creates a discrepancy between what the makeCache method gets (manager, class, manager) and what the types imply when a threadmanager is brought into the mix (which implies the class is an instance). This still needs a typeof in some form
Please describe the changes this PR makes and why it should be merged:
I've been having issues with some methods returning
ThreadChannel
and some returningAnyThreadChannel
. This PR makes how we use each consistent.ThreadOnlyChannel
will always bePublicThreadChannel<true>
), that is used.AnyThreadChannel
type.ThreadChannel
type. Typically, the user shouldn't have to useThreadChannel
in their codebase at all (since all userland-facing values have been changed toAnyThreadChannel
), but it doesn't hurt to allow it here.Status and versioning classification: