Search
Loading...
Skip to content

Type Alias: ActionFunction

type ActionFunction<T, C> = T extends keyof RegisteredActions ? RegisteredActions[T] : C;

Type helper for retrieving the correct action function type based on the action ID. Returns the strongly-typed action for known actions, or a custom action type for unknown IDs.

Type Parameters#

Type ParameterDefault typeDescription
T extends ActionId-The action ID type
CCustomActionFunctionThe custom action function type (defaults to CustomActionFunction)