#2 - Type, Type Inference, Type Annotations in TypeScript
Автор: Naveen AutomationLabs
Загружено: 2023-10-13
Просмотров: 12072
In this video, I have explained what is Type, Type Inference, Type Annotations in TypeScript.
Type Inference:
TypeScript has a feature called type inference, which allows the compiler to automatically determine the types of variables if you don't explicitly specify them.
For example, if you declare a variable and assign it a numeric value, TypeScript will infer its type as number without needing explicit type annotations.
Type inference helps reduce verbosity in your code while still providing type safety.
example:
let age = 30;
5. Type Annotations:
Type annotations in TypeScript involve explicitly specifying the types of variables, function parameters, and return values.
let age: number = 30;
let name: string = "John";
let isStudent: boolean = true;
Schedule a meeting in case of any queries/guidance/counselling:
https://calendly.com/naveenautomation...
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
https://www.youtube.com/c/Naveen%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
https://t.me/joinchat/9FrG-KzGlvxjNmQ1
Naveen AutomationLabs Paid Courses:
GIT Hub Course:
https://naveenautomationlabs.com/gitc...
Java & Selenium:
https://naveenautomationlabs.com/sele...
Java & API +POSTMAN + RestAssured + HttpClient:
https://naveenautomationlabs.com/manu...
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: