[Launcher] Improve type definitions

This commit is contained in:
2025-04-14 16:17:21 +02:00
parent d9fdf1ee6d
commit ed17459e2a
8 changed files with 59 additions and 9 deletions

View File

@@ -19,17 +19,30 @@ export interface App extends ResultElement {
// TODO: Finish
export interface DictionaryEntry extends ResultElement {
/**
* Execute no command
*/
action: null;
/**
* The dictionary definition
*/
definition: string;
}
// TODO: Finish
export interface CMDOutput extends ResultElement {
/**
* Stdout from the command that was run
*/
result: string;
}
// TODO: Finish
export interface Calculation extends ResultElement {
/**
* THe calculation result
*/
result: string;
}

View File

@@ -57,4 +57,4 @@ export interface ResultElement {
fontSize: number | undefined;
}
type Action = '';
type Action = '' | null;

View File

@@ -8,3 +8,5 @@
*/
import { readFileAsync, writeFileAsync, monitorFile } from "astal";

View File

@@ -20,9 +20,9 @@ import { subprocess, execAsync, Process } from "astal/process";
* @returns [TODO:return]
*/
const startSubProcess = (
cmd: string | string[],
onOut: (stdout: string) => void,
onErr: (stderr: string) => void | undefined,
cmd: string | string[],
onOut: (stdout: string) => void,
onErr: (stderr: string) => void | undefined,
): Process => {
return subprocess( cmd, onOut, onErr );
};