Skip to content
Effect Days 2026 Get your ticket

RuntimeFlagsPatch

18 exports Added in v2.0.0 Source

Constructors

disable

Added in v2.0.0 Source

Creates a RuntimeFlagsPatch describing disabling the provided RuntimeFlag.

Signature

declare const disable: (flag: RuntimeFlags.RuntimeFlag) => RuntimeFlagsPatch

empty

Added in v2.0.0 Source

The empty RuntimeFlagsPatch.

Signature

declare const empty: RuntimeFlagsPatch

enable

Added in v2.0.0 Source

Creates a RuntimeFlagsPatch describing enabling the provided RuntimeFlag.

Signature

declare const enable: (flag: RuntimeFlags.RuntimeFlag) => RuntimeFlagsPatch

make

Added in v2.0.0 Source

Signature

declare const make: (active: number, enabled: number) => RuntimeFlagsPatch

Destructors

disabledSet

Added in v2.0.0 Source

Returns a ReadonlySet<number> containing the RuntimeFlags described as disabled by the specified RuntimeFlagsPatch.

Signature

declare const disabledSet: (self: RuntimeFlagsPatch) => ReadonlySet<RuntimeFlags.RuntimeFlag>

enabledSet

Added in v2.0.0 Source

Returns a ReadonlySet<number> containing the RuntimeFlags described as enabled by the specified RuntimeFlagsPatch.

Signature

declare const enabledSet: (self: RuntimeFlagsPatch) => ReadonlySet<RuntimeFlags.RuntimeFlag>

render

Added in v2.0.0 Source

Renders the provided RuntimeFlagsPatch to a string.

Signature

declare const render: (self: RuntimeFlagsPatch) => string

Elements

includes

Added in v2.0.0 Source

Returns true if the RuntimeFlagsPatch includes the specified RuntimeFlag, false otherwise.

Signature

declare const includes: {
(flag: RuntimeFlagsPatch): (self: RuntimeFlagsPatch) => boolean;
(self: RuntimeFlagsPatch, flag: RuntimeFlagsPatch): boolean;
}

isActive

Added in v2.0.0 Source

Returns true if the RuntimeFlagsPatch describes the specified RuntimeFlag as active.

Signature

declare const isActive: {
(flag: RuntimeFlagsPatch): (self: RuntimeFlagsPatch) => boolean;
(self: RuntimeFlagsPatch, flag: RuntimeFlagsPatch): boolean;
}

isDisabled

Added in v2.0.0 Source

Returns true if the RuntimeFlagsPatch describes the specified RuntimeFlag as disabled.

Signature

declare const isDisabled: {
(flag: RuntimeFlag): (self: RuntimeFlagsPatch) => boolean;
(self: RuntimeFlagsPatch, flag: RuntimeFlag): boolean;
}

isEnabled

Added in v2.0.0 Source

Returns true if the RuntimeFlagsPatch describes the specified RuntimeFlag as enabled.

Signature

declare const isEnabled: {
(flag: RuntimeFlag): (self: RuntimeFlagsPatch) => boolean;
(self: RuntimeFlagsPatch, flag: RuntimeFlag): boolean;
}

Getters

isEmpty

Added in v2.0.0 Source

Returns true if the specified RuntimeFlagsPatch is empty.

Signature

declare const isEmpty: (patch: RuntimeFlagsPatch) => boolean

Models

RuntimeFlagsPatch type

Added in v2.0.0 Source

Signature

type RuntimeFlagsPatch = number & {
readonly RuntimeFlagsPatch: unique symbol;
}

Utils

andThen

Added in v2.0.0 Source

Creates a RuntimeFlagsPatch describing the application of the self patch, followed by that patch.

Signature

declare const andThen: {
(that: RuntimeFlagsPatch): (self: RuntimeFlagsPatch) => RuntimeFlagsPatch;
(self: RuntimeFlagsPatch, that: RuntimeFlagsPatch): RuntimeFlagsPatch;
}

both

Added in v2.0.0 Source

Creates a RuntimeFlagsPatch describing application of both the self patch and that patch.

Signature

declare const both: {
(that: RuntimeFlagsPatch): (self: RuntimeFlagsPatch) => RuntimeFlagsPatch;
(self: RuntimeFlagsPatch, that: RuntimeFlagsPatch): RuntimeFlagsPatch;
}

either

Added in v2.0.0 Source

Creates a RuntimeFlagsPatch describing application of either the self patch or that patch.

Signature

declare const either: {
(that: RuntimeFlagsPatch): (self: RuntimeFlagsPatch) => RuntimeFlagsPatch;
(self: RuntimeFlagsPatch, that: RuntimeFlagsPatch): RuntimeFlagsPatch;
}

exclude

Added in v2.0.0 Source

Creates a RuntimeFlagsPatch which describes exclusion of the specified RuntimeFlag from the set of RuntimeFlags.

Signature

declare const exclude: {
(flag: RuntimeFlag): (self: RuntimeFlagsPatch) => RuntimeFlagsPatch;
(self: RuntimeFlagsPatch, flag: RuntimeFlag): RuntimeFlagsPatch;
}

inverse

Added in v2.0.0 Source

Creates a RuntimeFlagsPatch which describes the inverse of the patch specified by the provided RuntimeFlagsPatch.

Signature

declare const inverse: (patch: RuntimeFlagsPatch) => RuntimeFlagsPatch