initial async processes implementation - not finished

This commit is contained in:
2026-08-16 15:30:04 +02:00
parent a7798436d2
commit c39bbae091
5 changed files with 75 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
export function resolveKeybind(input: string, map: ReadonlyMap<string, string>): string | undefined {
return map.get(input);
}
+7
View File
@@ -0,0 +1,7 @@
import type { Signal } from "./signal";
export interface ProcessContext {
writeStdout(data: Uint8Array): void;
writeStderr(data: Uint8Array): void;
getSignal(): Promise<Signal>;
}
+8
View File
@@ -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;
};