- TypeScript is a superset of JavaScript.
- TypeScript file gets transpiled into a JavaScript file.
- TypeScript is all about Types. A JavaScript variable can be assigned with any primitive type. TypeScript on the other hand helps to define the type of a variable.
- Following are the pre-defined types in TypeScript: boolean, bigint, null, number, string, symbol, object, undefined, any, unknown, never, void.
- On the other hand, TypeScript provides two syntaxes to build types: Interfaces and Types.
- Also, TypeScript helps you to create complex types by combining simple ones. There are two popular ways to do so: Unions, Generics.
- Read more: https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html. This page is good enough to get a clear understanding of TypeScript.
Other references:
No comments:
Post a Comment