fix: types and arguments

This commit is contained in:
Cfp
2025-08-11 13:54:14 +02:00
parent 50b325bf3e
commit e4a214ca60

View File

@ -4,10 +4,12 @@ type DuckResponse = {
success: boolean
}
export async function duck(): Promise<string | null> {
return await invoke<{value?: string}>('plugin:duck|duck').then((r: DuckResponse) => r.success);
export async function duck(): Promise<boolean | null> {
// @ts-expect-error - not typed
return await invoke('plugin:duck|duck').then((r: DuckResponse) => r.success);
}
export async function unduck(value: string): Promise<boolean | null> {
return await invoke<{value?: string}>('plugin:duck|unduck').then((r: DuckResponse) => r.success);
export async function unduck(): Promise<boolean | null> {
// @ts-expect-error - not typed
return await invoke('plugin:duck|unduck').then((r: DuckResponse) => r.success);
}