Skip to main content Link Search Menu Expand Document (external link)

RenderQueue overview

The context in which templates are rendered within

Added in v1.0.0


Table of contents


utils

DEFAULT_PRIORITY

Signature

export declare const DEFAULT_PRIORITY: 10

Added in v1.0.0

IdleRenderQueueOptions (interface)

Signature

export interface IdleRenderQueueOptions extends IdleRequestOptions {
  readonly scope: Scope.Scope
}

Added in v1.0.0

Priority

Signature

export declare const Priority: {
  readonly Sync: -1
  readonly MicroTask: (priority: number) => number
  readonly Raf: (priority: number) => number
  readonly Idle: (priority: number) => number
}

Added in v1.0.0

RenderQueue

The context in which templates are rendered within

Signature

export declare const RenderQueue: Context.Tagged<RenderQueue, RenderQueue>

Added in v1.0.0

RenderQueue (interface)

Signature

export interface RenderQueue {
  readonly add: (part: unknown, task: () => void, priority: number) => Effect.Effect<void, never, Scope.Scope>
}

Added in v1.0.0

currentPriority

Signature

export declare const currentPriority: FiberRef.FiberRef<number>

Added in v1.0.0

idle

Signature

export declare const idle: (options?: IdleRequestOptions) => Layer.Layer<RenderQueue>

Added in v1.0.0

microtask

Signature

export declare const microtask: Layer.Layer<RenderQueue, never, never>

Added in v1.0.0

mixed

Signature

export declare const mixed: (options?: IdleRequestOptions) => Layer.Layer<RenderQueue>

Added in v1.0.0

raf

Signature

export declare const raf: Layer.Layer<RenderQueue, never, never>

Added in v1.0.0

sync

Signature

export declare const sync: Layer.Layer<RenderQueue, never, never>

Added in v1.0.0

unsafeMakeIdleRenderQueue

Signature

export declare const unsafeMakeIdleRenderQueue: ({ scope, ...options }: IdleRenderQueueOptions) => RenderQueue

Added in v1.0.0

unsafeMakeMicrotaskRenderQueue

Signature

export declare const unsafeMakeMicrotaskRenderQueue: (scope: Scope.Scope) => RenderQueue

Added in v1.0.0

unsafeMakeRafRenderQueue

Signature

export declare const unsafeMakeRafRenderQueue: (scope: Scope.Scope) => RenderQueue

Added in v1.0.0

unsafeMakeSyncRenderQueue

Signature

export declare const unsafeMakeSyncRenderQueue: () => RenderQueue

Added in v1.0.0

usingCurrentPriority

Signature

export declare const usingCurrentPriority: {
  (priority: number): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>
  <A, E, R>(effect: Effect.Effect<A, E, R>, priority: number): Effect.Effect<A, E, R>
}

Added in v1.0.0

withCurrentPriority

Signature

export declare const withCurrentPriority: <A, E, R>(
  f: (priority: number) => Effect.Effect<A, E, R>
) => Effect.Effect<A, E, R>

Added in v1.0.0