File Handling in TypeScript

Please run this code in a Node.js environment for file handling.