Author: admin
-
Types
The Type System represents the different types of values supported by the language. The Type System checks the validity of the supplied values, before they are stored or manipulated by the program. This ensures that the code behaves as expected. The Type System further allows for richer code hinting and automated documentation too. TypeScript provides…
-
Basic Syntax
Syntax defines a set of rules for writing programs. Every language specification defines its own syntax. A TypeScript program is composed of − Your First TypeScript Code Let us start with the traditional “Hello World” example − var message:string=”Hello World”console.log(message) On compiling, it will generate following JavaScript code. Compile and Execute a TypeScript Program Let…
-
Environment Setup
We already have set up TypeScript programming online, so that you can execute all the available examples online at the same time when you are doing your theory work. This gives you confidence in what you are reading and to check the result with different options. Feel free to modify any example and execute it…
-
Overview
JavaScript was introduced as a language for the client side. The development of Node.js has marked JavaScript as an emerging server-side technology too. However, as JavaScript code grows, it tends to get messier, making it difficult to maintain and reuse the code. Moreover, its failure to embrace the features of Object Orientation, strong type checking…