Skip to content
Effect Days 2026 Get your ticket

FiberRefsPatch

10 exports Added in v2.0.0 Source

Constructors

combine

Added in v2.0.0 Source

Combines this patch and the specified patch to create a new patch that describes applying the changes from this patch and the specified patch sequentially.

Signature

declare const combine: {
(that: FiberRefsPatch): (self: FiberRefsPatch) => FiberRefsPatch;
(self: FiberRefsPatch, that: FiberRefsPatch): FiberRefsPatch;
}

diff

Added in v2.0.0 Source

Constructs a patch that describes the changes between the specified collections of FiberRef

Signature

declare const diff: (oldValue: FiberRefs.FiberRefs, newValue: FiberRefs.FiberRefs) => FiberRefsPatch

empty

Added in v2.0.0 Source

Signature

declare const empty: FiberRefsPatch

Destructors

patch

Added in v2.0.0 Source

Applies the changes described by this patch to the specified collection of FiberRef values.

Signature

declare const patch: {
(fiberId: Runtime, oldValue: FiberRefs): (self: FiberRefsPatch) => FiberRefs;
(self: FiberRefsPatch, fiberId: Runtime, oldValue: FiberRefs): FiberRefs;
}

Models

Add interface

Added in v2.0.0 Source

Signature

interface Add {
readonly _tag: "Add";
readonly fiberRef: FiberRef<unknown>;
readonly value: unknown;
}

AndThen interface

Added in v2.0.0 Source

Signature

interface AndThen {
readonly _tag: "AndThen";
readonly first: FiberRefsPatch;
readonly second: FiberRefsPatch;
}

Empty interface

Added in v2.0.0 Source

Signature

interface Empty {
readonly _tag: "Empty";
}

FiberRefsPatch type

Added in v2.0.0 Source

A FiberRefsPatch captures the changes in FiberRef values made by a single fiber as a value. This allows fibers to apply the changes made by a workflow without inheriting all the FiberRef values of the fiber that executed the workflow.

Signature

type FiberRefsPatch = Empty | Add | Remove | Update | AndThen

Remove interface

Added in v2.0.0 Source

Signature

interface Remove {
readonly _tag: "Remove";
readonly fiberRef: FiberRef<unknown>;
}

Update interface

Added in v2.0.0 Source

Signature

interface Update {
readonly _tag: "Update";
readonly fiberRef: FiberRef<unknown>;
readonly patch: unknown;
}