Skip to content

Instantly share code, notes, and snippets.

@ctrlplusb
Last active February 8, 2019 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctrlplusb/f7fa256177e90cdba33fcc3bc5dcd0ef to your computer and use it in GitHub Desktop.
Save ctrlplusb/f7fa256177e90cdba33fcc3bc5dcd0ef to your computer and use it in GitHub Desktop.
import { Action } from "easy-peasy";
type TodosModel = {
items: string[];
add: Action<TodosModel, string>; // 👈
}
type NotificationModel = {
msg: string;
set: Action<NotificationModel, string>; // 👈
}
export type StoreModel = {
todos: TodosModel;
notification: NotificationModel;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment