'use strict'; import { RuntimeKind } from './runtimeKind'; import type { WorkletFunction, WorkletRuntime, WorkletRuntimeConfig, } from './types'; // is-tree-shakable-suppress export const UIRuntimeId = RuntimeKind.UI; export function createWorkletRuntime( config?: WorkletRuntimeConfig ): WorkletRuntime; export function createWorkletRuntime( name?: string, initializer?: () => void ): WorkletRuntime; export function createWorkletRuntime(): never { throw new Error('[Worklets] `createWorkletRuntime` is not supported on web.'); } export function runOnRuntime( workletRuntime: WorkletRuntime, worklet: (...args: Args) => ReturnValue ): WorkletFunction; export function runOnRuntime(): never { throw new Error('[Worklets] `runOnRuntime` is not supported on web.'); } export function scheduleOnRuntime( workletRuntime: WorkletRuntime, worklet: (...args: Args) => ReturnValue, ...args: Args ): void; export function scheduleOnRuntime(): never { throw new Error('[Worklets] `scheduleOnRuntime` is not supported on web.'); } export function scheduleOnRuntimeWithId( runtimeId: number, worklet: (...args: Args) => ReturnValue, ...args: Args ): void; export function scheduleOnRuntimeWithId(): never { throw new Error( '[Worklets] `scheduleOnRuntimeWithId` is not supported on web.' ); } export function runOnRuntimeSync( workletRuntime: WorkletRuntime, worklet: (...args: Args) => ReturnValue, ...args: Args ): ReturnValue; export function runOnRuntimeSync(): never { throw new Error('[Worklets] `runOnRuntimeSync` is not supported on web.'); } export function runOnRuntimeSyncWithId( runtimeId: number, worklet: (...args: Args) => ReturnValue, ...args: Args ): ReturnValue; export function runOnRuntimeSyncWithId(): never { throw new Error( '[Worklets] `runOnRuntimeSyncWithId` is not supported on web.' ); } export function runOnRuntimeAsync( workletRuntime: WorkletRuntime, worklet: (...args: Args) => ReturnValue, ...args: Args ): Promise; export function runOnRuntimeAsync(): never { throw new Error('[Worklets] `runOnRuntimeAsync` is not supported on web.'); } export function runOnRuntimeAsyncWithId( runtimeId: number, worklet: (...args: Args) => ReturnValue, ...args: Args ): Promise; export function runOnRuntimeAsyncWithId(): never { throw new Error( '[Worklets] `runOnRuntimeAsyncWithId` is not supported on web.' ); } export function getUIRuntimeHolder(): object { throw new Error('[Worklets] `getUIRuntimeHolder` is not supported on web.'); } export function getUISchedulerHolder(): object { throw new Error('[Worklets] `getUISchedulerHolder` is not supported on web.'); } export function abortWorkletRuntime(runtimeId: number): boolean; export function abortWorkletRuntime(): never { throw new Error('[Worklets] `abortWorkletRuntime` is not supported on web.'); }