// add new commands [./src/innovativeToDoList/interactionController/interactionController.ts]interfaceICommand{name: string,make: ()=>void}constcommand: ICommand={name: '/exit',make: ()=>process.exit(0)}commands.push(command)
// working with Flux (observable)import{Stream}from"./observable/FLux";import{ITodoItem}from"./innovativeToDoList/types/types";conststream=newStream<Array<ITodoItem>>([])stream.addSubscriber({name: 'change',do(data){console.log(data)}})constnewTodo: ITodoItem={text: 'new todo item',createdDate: newDate(),id: Date.now(),isDone: false}stream.setData(prev=>[ ...prev,newTodo])