chore: init
This commit is contained in:
13
guest-js/index.ts
Normal file
13
guest-js/index.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
|
||||
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 unduck(value: string): Promise<boolean | null> {
|
||||
return await invoke<{value?: string}>('plugin:duck|unduck').then((r: DuckResponse) => r.success);
|
||||
}
|
Reference in New Issue
Block a user