Skip to content

StateMatchbox

Defined in: state-types.ts:11

MatchboxMemberApi defines the API for a member of a Matchbox, providing access to its key and data. This is used to ensure type safety and consistency across Matchbox members.

Type ParameterDescription
Tag extends string & keyof SpecsThe key type for the member.
SpecsThe specifications defining the structure of the Matchbox.

match<A>(cases: MatchCases<Specs, A, true>, exhaustive?: boolean): A

Defined in: matchbox-factory-types.ts:122

Type Parameter
A
ParameterType
casesMatchCases<Specs, A, true>
exhaustive?boolean

A

match<A>(cases: MatchCases<Specs, A, false>, exhaustive: boolean): A

Defined in: matchbox-factory-types.ts:123

Type Parameter
A
ParameterType
casesMatchCases<Specs, A, false>
exhaustiveboolean

A

PropertyType
is<T>(key: T) => this is MatchboxMember<T, Specs, "key">
as<T>(key: T) => MatchboxMember<T, Specs, "key">
keyTag
dataStateData<Specs[Tag]>