Conversion to TypeScript