This repository has been archived on 2022-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
zeropod/src/menu/interface.ts

26 lines
399 B
TypeScript
Raw Normal View History

2022-04-19 21:02:08 -05:00
export enum MenuType {
ExecCommand,
2022-04-22 13:53:26 -05:00
ExecModule,
2022-04-19 21:02:08 -05:00
Reboot,
Shutdown,
SubMenu,
}
export interface MenuCommand {
exe: string,
args?: string[],
wrap?: boolean,
}
2022-04-19 21:02:08 -05:00
export interface MenuConfig {
display: string,
type: MenuType,
command?: MenuCommand,
2022-04-19 21:02:08 -05:00
subMenu?: MenuConfig[],
2022-04-22 13:53:26 -05:00
module?: () => Promise<void>,
2022-04-19 21:02:08 -05:00
}
export interface MenuPrinter {
2022-04-20 08:05:21 -05:00
getSelection(): Promise<MenuConfig>;
2022-04-19 21:02:08 -05:00
}