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

TypeSafeDecisionModel unstable

TypeSafe's System One implementation of DecisionModel.

4 exports Since v4.0.0 Source

Constructors

make

unstable
Since v4.0.0

Builds a decision service. Probabilities arrive rounded to two decimals, so DecisionModel rescales small sum drift when it validates distributions and derives rating labels.

Signature

declare const make: (...args: [options: {
readonly model: Model | string & {};
}]) => Effect<DecisionModel, never, TypeSafeClient>

model

unstable
Since v4.0.0

Creates a decision model with TypeSafe provider metadata.

Signature

declare function model(model: Model | string & {}): Model<"typesafe", DecisionModel, TypeSafeClient>

Layers

layer

unstable
Since v4.0.0

Provides DecisionModel using an existing TypeSafeClient.

Signature

declare function layer(options: {
readonly model: Model | string & {};
}): Layer<DecisionModel, never, TypeSafeClient>

Models

Model

type unstable
Since v4.0.0

Known TypeSafe model identifiers. Constructors also accept custom identifiers.

Signature

type Model = "jev-latest" | "jev-preview" | "jev-1.13.0"