This is a simple Node and Typescript Calculator CLI application created for the purpose of learning TypeScript fundamentals.
-
Install Node.js if not already installed (v20.11.1 was used for this application)
-
Clone or download the repository
-
Navigate to the project directory and initialize Node.js
npm init -y
-
Install TypeScript dependencies locally
npm install --save-dev ts-node typescript
- In the project directory, run the following command:
# Replace 'operand1' and 'operand2' with any two numbers
# Replace operation with a valid operation:
#
# multiply
# divide
# add
# subtract
npm run calculate <operand1> <operand2> <operation>