emit
Module @netwiv/api/event · Kind Function
import { emit } from '@netwiv/api/event';Emits an event to all {@link EventTargettargets}.
Signature
Section titled “Signature”function emit<T>(event: string, payload?: T | undefined): Promise<void>Example
Section titled “Example”import { emit } from '@netwiv/api/event';await emit('frontend-loaded', { loggedIn: true, token: 'authToken' });Upstream since 1.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.