Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 754 Bytes

File metadata and controls

28 lines (20 loc) · 754 Bytes

TypeScript Scripts

Requirements

Pre-requisites:

I recommend using asdf to manage your Nodejs versions. You can install Nodejs with asdf via:

# Add Nodejs plugin and install Nodejs
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf install nodejs 22.2.0
asdf global nodejs 22.2.0
# TypeScript and ts-node
npm install -g typescript
npm install -g ts-node
# You can link to a specific version just for the scripts in the shebang or use the global version like this
sudo ln -s $(asdf which node 22.2.0) /usr/bin/node

Examples

xxtemplate-ts.ts

This script will print the arugments provided to it.