/** * Helpers for invoking worklets from the BG → MT bridge. * * Most of the worklet machinery (registry, ref map, event dispatch) is owned * by `@lynx-js/react/worklet-runtime`, which is side-effect-imported from * `entry-main.ts`. That runtime installs `globalThis.lynxWorkletImpl`, * `globalThis.registerWorkletInternal`, and `globalThis.runWorklet`. Lynx * native dispatches MT-routed events directly into `runWorklet`. * * What sigx-lynx still needs to provide is the `runOnMainThread` BG → MT call * path: BG ships `{ wkltId, args }` over `callLepusMethod('sigxRunOnMT')`, the * MT bridge handler in `entry-main.ts` calls `invokeWorklet()` here, and we * look up the function in upstream's `_workletMap`. */ export interface WorkletPlaceholder { _wkltId: string; _c?: Record; } /** * Invoke a worklet by id with the given args. Used by the runOnMainThread * bridge — event-driven worklets go through Lynx's native runWorklet path * and never touch this function. */ export declare function invokeWorklet(wkltId: string, captured: Record | undefined, args: unknown[]): unknown; /** Reset hook — for testing. The upstream worklet-runtime has its own state. */ export declare function resetWorkletEvents(): void;