import { observable } from 'mobx' ; export class TodoItem { id ? : number ; @ observable title : string ; @ observable completed : boolean ; public constructor ( init ? ) { Object . assign ( this , init ) ; } public toJs ( ) { return { id : this . id , title : this . title , completed : this . completed } ; } } ;