Welcome new members to UB's MakeOpenSource club! This project is to help you get accustomed to the basics of Frontend development involving HTML, CSS, and TypeScript.
TypeScript is a free and open-source high-level programming language developed by Microsoft that adds static typing with optional type annotations to JavaScript. It is designed for the development of large applications and transpiles to JavaScript. TypeScript can drastically reduce runtime errors, catching them before compile time.
TypeScript is the primary language being used for DevU, which is used for both the client and API.
You will be designing the functionality for a simple calculator with TypeScript. The HTML and CSS of the calculator have been completed for you, but the overall functionality of the calculator is left incomplete, which is where you come in!
For TypeScript to successfully transpile to JavaScript, you need to ensure you have the latest version of Node downloaded and installed. Proceed to download the recommended version of Node that corresponds to your operating system.
In the terminal, run this command to install the TypeScript Compiler
npm i -g typescript
sudo npm i -g typescript
To help make the accessibility of the webpage calculator easier, it is HIGHLY recommended to install Visual Studio Code.
After installing Visual Studio Code, install the extension, Live Server. The Live Server extension will allow you to start up the calculator webpage with the click of a button.
The TypeScript calculator will have the following functionality:
- The user can enter any integer via the number buttons.
- The user can enter any floating point/decimal number via the number buttons.
- The number entered by the user can deleted character by character via the delete button.
- The calculator's display can be fully cleared via the clear button.
- Addition.
- Multiplication.
- Subtraction.
- Division.