Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

RuntimeFlagsPatch

18 exports Since v2.0.0 Source

Constructors

Since v2.0.0

Creates a RuntimeFlagsPatch describing disabling the provided RuntimeFlag.

Signature

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

The empty RuntimeFlagsPatch.

Signature

declare const empty: RuntimeFlagsPatch
Since v2.0.0

Creates a RuntimeFlagsPatch describing enabling the provided RuntimeFlag.

Signature

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

Signature

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

Destructors

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

Signature

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

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

Signature

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

Renders the provided RuntimeFlagsPatch to a string.

Signature

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

Elements

Since v2.0.0

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;
}
Since v2.0.0

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;
}

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;
}

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

Since v2.0.0

Returns true if the specified RuntimeFlagsPatch is empty.

Signature

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

Models

Signature

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

Utils

Since v2.0.0

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;
}
Since v2.0.0

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;
}
Since v2.0.0

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;
}
Since v2.0.0

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;
}
Since v2.0.0

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

Signature

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