TypeScript Introduction, Contact me on : 7709330265(Whats app No)/ramkumarkhub@gmail.com
Typescript is nothing but the subsets of JavaScript, Typescript mainly used in the big project where you are going to integrated with many modules
Typescript can be integrated with any front-end framework or library like Angular, React and Vue etc, Typescript is developed by Microsoft in October 2012, Typescript is open source you can easily clone the project and can be integrate with any JS frameworks.
With the help of Typescript our code become error free, typescript will give you compile type error instead of run time error in the browser.
Typescript support all JavaScript Type like String, Number, Boolean etc.
We can create interface or class in typescript to reuse same code in many place.
Typescript supports `enum` data type which is inherited from c# which gives us better object key understanding and which help us to create better schema handling in big projects.
You can export and import type in any of the file or module with the help of latest ECMA6 features of JavaScript
At the end compilation of Typescript file (.ts) file will be give you output in .js file which will execute in the browser.
Basic examples of interface:
Interface IProps{
Name: string;
City: String;
Phone: number;
}
Const data :IProps[] = [{
Name : “Ramkumar”,
City: “pune”,
Phone: “7709330265”
}];