UNPKG

@snipsonian/observable-state

Version:

Observable-state snippets (redux-like)

14 lines (11 loc) 549 B
import { IPayloadAction, IObservableStateAction } from './types'; export function createAction<Type, Payload>( action: IPayloadAction<Type, Payload>, ): IPayloadAction<Type, Payload> { return action; } export function createObservableStateAction<Type, Payload, State, ExtraProcessInput, StateChangeNotificationKey>( action: IObservableStateAction<Type, Payload, State, ExtraProcessInput, StateChangeNotificationKey>, ): IObservableStateAction<Type, Payload, State, ExtraProcessInput, StateChangeNotificationKey> { return action; }