mirror of
https://github.com/sern-handler/handler
synced 2026-06-28 02:32:15 +00:00
feat: Improved TypeScript experince
This commit is contained in:
@@ -11,18 +11,17 @@ import type {
|
||||
import type * as Sern from '../handler/sern';
|
||||
|
||||
export type Visibility = 'private' | 'public';
|
||||
|
||||
// Anything that can be sent in a `<TextChannel>#send` or `<CommandInteraction>#reply`
|
||||
export type possibleOutput<T = string> = T | (MessagePayload & MessageOptions);
|
||||
export type Nullable<T> = T | null;
|
||||
export type execute = Sern.Module<unknown>['execute'];
|
||||
|
||||
// Thanks @cursorsdottsx
|
||||
export type ParseType<T> = {
|
||||
[K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never;
|
||||
}[keyof T];
|
||||
|
||||
// A Sern.Module['delegate'] will carry a Context Parameter
|
||||
|
||||
export type Context = {
|
||||
message: Option<Message>;
|
||||
interaction: Option<CommandInteraction>;
|
||||
|
||||
Reference in New Issue
Block a user