TypeScript functions