/** * `runOnBackground` allows triggering js functions on the background thread asynchronously. * @param f - The js function to be called. * @returns A function. Calling which with the arguments to be passed to the js function to trigger it on the background thread. This function returns a promise that resolves to the return value of the js function. * @example * ```ts * import { runOnBackground } from '@lynx-js/react'; * * async function someMainthreadFunction() { * 'main thread'; * const fn = runOnBackground(() => { * return 'hello'; * }); * const result = await fn(); } * ``` * @public */ declare function runOnBackground R>(f: Fn): (...args: Parameters) => Promise; export { registerWorkletCtx, runJSFunction, runOnBackground };