initial async processes implementation - not finished
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export function resolveKeybind(input: string, map: ReadonlyMap<string, string>): string | undefined {
|
||||
return map.get(input);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { Signal } from "./signal";
|
||||
|
||||
export interface ProcessContext {
|
||||
writeStdout(data: Uint8Array): void;
|
||||
writeStderr(data: Uint8Array): void;
|
||||
getSignal(): Promise<Signal>;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export type Input = string;
|
||||
|
||||
//Payload optional because command that handles that signal
|
||||
// is going to know what shape it is, therefore also able to cast it;
|
||||
export type Signal = {
|
||||
type: string;
|
||||
payload?: unknown;
|
||||
};
|
||||
Reference in New Issue
Block a user