This project will encourage the use of interface in TypeScript Projects to implement Singleton Pattern to enhance testability of code.
- Make sure Node is installed on your machine, you can test it by typing the command below in your terminal. If it doesn't show the version number of Node, please proceed to install node on your machine following instructions from Node official documentation
node -v
- To enable TypeScript, do as below, which installs TypeScript module globally
npm install -g typescript
- You can test your installation by:
tsc --version
All the codes in thos project is written in the src-ts
folder. After writing your TypeScript code in src-ts
folder, you should type:
tsc -w
to transpile and watch the files in src-ts
folder.
To start the project and make sure it is runnable. Open up a new terminal, then:
cd src-js
node .
Then you should see a Hello
greeting for you in the console!