some dog-tier work i dont remember (too sleepy)
This commit is contained in:
+7
-1
@@ -1,8 +1,14 @@
|
||||
import type { CommandIO } from "./command_io";
|
||||
import type { Result } from "./result";
|
||||
import type { ShellState } from "./shell_state";
|
||||
import type { ShellError } from "./util/errors";
|
||||
|
||||
type CommandFn = (state: ShellState, flags: string[], args: string[]) => CommandOutput<ShellError>;
|
||||
export type CommandFn = (
|
||||
io: CommandIO,
|
||||
state: ShellState,
|
||||
flags: string[],
|
||||
args: string[],
|
||||
) => CommandOutput<ShellError>;
|
||||
|
||||
export interface CommandDescriptor {
|
||||
fn: CommandFn;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Signal } from "./signal";
|
||||
|
||||
export interface ProcessContext {
|
||||
export interface CommandIO {
|
||||
writeStdout(data: Uint8Array): void;
|
||||
writeStderr(data: Uint8Array): void;
|
||||
getSignal(): Promise<Signal>;
|
||||
Reference in New Issue
Block a user