Working project root directory:
-
Run
npm i
to install dependencies, like typescript compiler. (Only needs to be repeated if anything changes inpackage.json
). -
Run
npx tsc
to compile all Typescript files into javascript. Needs to be repeated every time Typescript code is changed.
Working in a "day of advent" directory, eg aoc22/2: run node 2.js
to execute the compiled JS code and print an answer on the console.