Type Alias: ThunkCreator()<T, Thunk, Args>
ThunkCreator<
T,Thunk,Args> =Thunk
Defined in: types.ts:75
A factory for creating asynchronous actions (thunks) with built-in metadata.
Type Parameters
T
T extends string = string
The string type identifier for the thunk.
Thunk
Thunk extends AsyncAction = AsyncAction
The thunk function type (typically AsyncAction).
Args
Args extends any[] = any[]
Argument types accepted by the thunk creator function.
ThunkCreator(...
args):Thunk
Defined in: types.ts:76
Parameters
args
...Args
Returns
Thunk
A callable that produces an AsyncAction when invoked with Args.
Properties
type
type:
T
Defined in: types.ts:77
Unique string identifier for this thunk.
toString()
toString: () =>
T
Defined in: types.ts:78
Returns the thunk's type string.
Returns
T
match()
match: (
action) =>boolean
Defined in: types.ts:79
Determines if a given action matches this thunk.
Parameters
action
Action<any> | AsyncAction
Returns
boolean
isThunk
isThunk:
boolean
Defined in: types.ts:80
Always true, used to distinguish thunks from normal actions.
triggers?
optionaltriggers:string[]
Defined in: types.ts:81