Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Created September 21, 2018 14:04
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 NetanelBasal/2eed34986ee93c3dac3b567c5bc689f3 to your computer and use it in GitHub Desktop.
Save NetanelBasal/2eed34986ee93c3dac3b567c5bc689f3 to your computer and use it in GitHub Desktop.
import { ID, guid } from '@datorama/akita';
export type Todo = {
id: ID;
text: string;
completed: boolean;
};
export function createTodo(text: string): Todo {
return {
id: guid(),
text,
completed: false
};
}
export const enum VISIBILITY_FILTER {
SHOW_COMPLETED = 'SHOW_COMPLETED',
SHOW_ACTIVE = 'SHOW_ACTIVE',
SHOW_ALL = 'SHOW_ALL'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment