@platform/state
Version:
A small, simple, strongly typed, [rx/observable] state-machine.
30 lines (29 loc) • 633 B
TypeScript
export declare type IMyModel = {
count: number;
foo: IMyFoo;
bar?: IMyBar;
};
export declare type IMyFoo = {
list: number[];
msg?: string;
};
export declare type IMyBar = {
msg: string;
};
export declare type MyEvent = IIncrementEvent | IDecrementEvent | IChangeFooEvent;
export declare type IIncrementEvent = {
type: 'TEST/increment';
payload: {
by: number;
};
};
export declare type IDecrementEvent = {
type: 'TEST/decrement';
payload: {
by: number;
};
};
export declare type IChangeFooEvent = {
type: 'TEST/changeFoo';
payload: Record<string, undefined>;
};