mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 05:03:39 +08:00
fixed commands types
This commit is contained in:
parent
6b2396ae55
commit
77f9a484a5
1 changed files with 10 additions and 4 deletions
|
|
@ -493,17 +493,23 @@ export type ExecFunction = (input?: any) => any;
|
|||
export interface Command {
|
||||
id: string;
|
||||
display: string;
|
||||
subgroup: CommandsObject;
|
||||
icon: string;
|
||||
subgroup?: CommandsGroup | boolean;
|
||||
icon?: string;
|
||||
noIcon?: boolean;
|
||||
sticky?: boolean;
|
||||
alias?: string;
|
||||
input?: boolean;
|
||||
visible?: boolean;
|
||||
defaultValue?: boolean;
|
||||
defaultValue?: string;
|
||||
configValue?: string | number | boolean | number[];
|
||||
configValueMode?: string;
|
||||
exec?: ExecFunction;
|
||||
hover?: ExecFunction;
|
||||
available?: () => void;
|
||||
beforeSubgroup?: () => void;
|
||||
}
|
||||
|
||||
export interface CommandsObject {
|
||||
export interface CommandsGroup {
|
||||
title: string;
|
||||
configKey?: keyof Config;
|
||||
list: Command[];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue