mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
10 lines
235 B
TypeScript
10 lines
235 B
TypeScript
import { invoke } from "@tauri-apps/api";
|
|
|
|
export default async function invokeCommand<T>(command: string, args?: any) {
|
|
try {
|
|
return await invoke<T>(command, args);
|
|
} catch (err: any) {
|
|
throw new Error(err.message);
|
|
}
|
|
}
|