ChatGPT - TypeScript Code Conversion