wip: fixed TS build; moved TS typings to common; introduced knockout.js