Typescript port of NapkinTour