mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
@@ -15,7 +15,7 @@ class PingArgs: Decodable {
|
||||
class ExamplePlugin: Plugin {
|
||||
@objc public func ping(_ invoke: Invoke) throws {
|
||||
let args = try invoke.parseArgs(PingArgs.self)
|
||||
args.onEvent?.send(["kind": "ping"])
|
||||
try args.onEvent?.send(["kind": "ping"])
|
||||
invoke.resolve(["value": args.value ?? ""])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user