Last active
July 26, 2018 14:11
-
-
Save YonathanMeguira/9eeff0192a7f4f6b077eb6df0cb24f98 to your computer and use it in GitHub Desktop.
types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ID } from '@datorama/akita'; | |
| export interface List { | |
| name: string; | |
| id: ID; | |
| date: number | Date; | |
| total: number; | |
| items: (ID | Item)[]; | |
| } | |
| export interface Item { | |
| id: ID; | |
| quantity: number; | |
| label: string; | |
| purchased: boolean; | |
| } | |
| export function createNewItem() { | |
| return { label: '', quantity: 1, purchased: false, id: createId() }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment