-
Union: In Typescript, a union type is a special type which is denoted by pipe symbol (|) in which we can assign multiple types to a single variable.
-
Enums: Enums allows us to define a set of named constants. TypeScript provides both numeric and string-based enums.
-
Tuples: In TypeScript, a tuple is a data structure that allows you to define an ordered collection of elements, each with a specific type. Tuples are similar to arrays but have a fixed length and the types of their elements are known at compile time
-
Type annotations: Type annotations are a crucial concept in TypeScript. They allow developers to specify the data types of variables, function parameters, and return types. This can help catch errors during development and improve code readability.
-
Interfaces: In typescript Interfaces are used to define the structure of an object. The specify the name and type of object properties. It also helps in consistency across multiple objects.
-
Generic: In typescript, Generic allow us to create resuable functions and classes that can work with different data types. They provide a powerful way to create reusable and type-safe code.
-
Type Inference: It is a feature of Type Script that allows us to omit the type of variable. Type Script automatically inference the type of the variable on the basis of value assigned to the variable.
-
Notifications
You must be signed in to change notification settings - Fork 0
mtr-prabhat-sharma/Typescript-concepts
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
TypeScript important topics and concepts.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published