Code for TypeScript demo