Reference

@reckona/mreact-scheduler

23 public exports.

Function

Functionunstable_cancelCallbackfunction unstable_cancelCallback(task: SchedulerTask): voidCancels a scheduled callback node.Functionunstable_continueExecutionfunction unstable_continueExecution(): voidCompatibility no-op for resuming global scheduler execution.Functionunstable_forceFrameRatefunction unstable_forceFrameRate(fps: number): voidSets the target frame rate for scheduler yielding.Functionunstable_getCurrentPriorityLevelfunction unstable_getCurrentPriorityLevel(): unstable_PriorityLevelReturns the priority currently active for scheduler-compatible callbacks.Functionunstable_getFirstCallbackNodefunction unstable_getFirstCallbackNode(): SchedulerTask | nullReturns the first pending scheduler callback node, if one exists.Functionunstable_nextfunction unstable_next<T>(callback: (): T): TRuns a callback at normal priority when the current priority is higher.Functionunstable_nowfunction unstable_now(): numberReturns the scheduler clock time in milliseconds.Functionunstable_pauseExecutionfunction unstable_pauseExecution(): voidCompatibility no-op for pausing global scheduler execution.Functionunstable_requestPaintfunction unstable_requestPaint(): voidRequests a paint opportunity from the host scheduler.Functionunstable_runWithPriorityfunction unstable_runWithPriority<T>(priorityLevel: unstable_PriorityLevel, callback: (): T): TRuns a callback at the requested scheduler priority.Functionunstable_scheduleCallbackfunction unstable_scheduleCallback(priorityLevel: unstable_PriorityLevel, callback: unstable_Callback, options?: { delay?: number }): SchedulerTaskSchedules a callback at the requested scheduler priority.Functionunstable_shouldYieldfunction unstable_shouldYield(): booleanReturns true when the current scheduler task should yield to the host.Functionunstable_wrapCallbackfunction unstable_wrapCallback<TArgs, TResult>(callback: (...args: TArgs): TResult): (...args: TArgs): TResultWraps a callback so it runs later with the current scheduler priority.

Type Alias

Type Aliasunstable_Callbacktype unstable_Callback = (didTimeout: boolean): unstable_Callback | null | voidScheduled callback that may return a continuation.Type Aliasunstable_CallbackNodetype unstable_CallbackNode = SchedulerTaskHandle returned by unstable_scheduleCallback.Type Aliasunstable_PriorityLeveltype unstable_PriorityLevel = 1 | 2 | 3 | 4 | 5Numeric priority level used by the scheduler-compatible API.Type Aliasunstable_ProfilingEventtype unstable_ProfilingEvent = SchedulerProfilingEventProfiling event emitted by scheduler-compatible tracing.

Variable

Variableunstable_IdlePriorityconst unstable_IdlePriority: 5Scheduler priority for idle work.Variableunstable_ImmediatePriorityconst unstable_ImmediatePriority: 1Highest-priority scheduler task for immediate work.Variableunstable_LowPriorityconst unstable_LowPriority: 4Scheduler priority for low-priority work.Variableunstable_NormalPriorityconst unstable_NormalPriority: 3Scheduler priority for normal work.Variableunstable_Profilingconst unstable_Profiling: { startLoggingProfilingEvents: typeof startLoggingSchedulerProfilingEvents; stopLoggingProfilingEvents: typeof stopLoggingSchedulerProfilingEvents }Profiling controls for scheduler-compatible tracing.Variableunstable_UserBlockingPriorityconst unstable_UserBlockingPriority: 2Scheduler priority for user-blocking work.