Implementing Model View Update Pattern in Typescript