Experimental port of TerrificJs to TypeScript