fix: types and arguments
This commit is contained in:
@ -4,10 +4,12 @@ type DuckResponse = {
|
|||||||
success: boolean
|
success: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function duck(): Promise<string | null> {
|
export async function duck(): Promise<boolean | null> {
|
||||||
return await invoke<{value?: string}>('plugin:duck|duck').then((r: DuckResponse) => r.success);
|
// @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> {
|
export async function unduck(): Promise<boolean | null> {
|
||||||
return await invoke<{value?: string}>('plugin:duck|unduck').then((r: DuckResponse) => r.success);
|
// @ts-expect-error - not typed
|
||||||
|
return await invoke('plugin:duck|unduck').then((r: DuckResponse) => r.success);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user