Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Matchina
GitHub

assignEventApi

assignEventApi<M>(machine:M):M &DrainOuterGeneric<{ [K in string | number | symbol]: (object & TUnionToIntersection<FlatMemberUnion<StateEventTransitionSenders<M, keyof (…)[(…)]>>>)[K] } &object>

Defined in:extras/zen.ts:12

Enhances a FactoryMachine instance with event API and setup functionality.

Type ParameterDescription
MextendsFactoryMachine<any>Type of FactoryMachine
ParameterTypeDescription
machineMThe machine instance to enhance

M &DrainOuterGeneric<{ [K in string | number | symbol]: (object & TUnionToIntersection<FlatMemberUnion<StateEventTransitionSenders<M, keyof (…)[(…)]>>>)[K] } &object>

The enhanced machine with event API mixed in

exportfunctionassignEventApi<MextendsFactoryMachine<any>>(machine:M){
returnObject.assign(machine,eventApi(machine));
}

[8]ページ先頭

©2009-2025 Movatter.jp