resolvePath function implemented and tested, all green.

This commit is contained in:
2026-07-26 16:43:39 +02:00
parent 994b93ae47
commit cd08a4bf32
8 changed files with 302 additions and 7 deletions
+23
View File
@@ -0,0 +1,23 @@
import type { Result, ShellError } from "./result";
import type { ShellState } from "./shell_state";
type CommandFn = (state: ShellState, flags: string[], args: string[]) => CommandOutput<ShellError>;
export interface CommandDescriptor {
fn: CommandFn;
name: string;
flags?: readonly FlagDescriptor[];
requresRoot?: boolean;
description?: string;
keybinds?: readonly string[];
}
export interface FlagDescriptor {
name: string;
takesValue?: boolean;
}
export interface CommandOutput<E extends ShellError> {
readonly state: ShellState;
readonly result: Result<E>;
}