With just a few tricks you can start writing your scripts in TypeScript. The only magic that's required is the first line needs to be a shebang statement. Set up your environment and globally install node and npm packages to create your script. Then mark the script as executable and use bash to execute the contents of the file. You can now directly execute your typescript file using bash or node-node-generated-script. Using bash to run your TypeScript script is easy to do with bash.
Company Mentioned
Ben Force
@theBenForce
5x AWS Certified Senior Software Engineer. I write about architecture, infrastructure as code, and automation.