emitTo
Module @netwiv/api/event · Kind Function
import { emitTo } from '@netwiv/api/event';Emits an event to all {@link EventTargettargets} matching the given target.
Signature
Section titled “Signature”function emitTo<T>(target: string | EventTarget, event: string, payload?: T | undefined): Promise<void>Example
Section titled “Example”import { emitTo } from '@netwiv/api/event';await emitTo('main', 'frontend-loaded', { loggedIn: true, token: 'authToken' });Upstream since 2.0.0
Descriptions come from the pinned @tauri-apps/api@2.11.1 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.