2:17 What is Typescript? 3:50 Components of Typescript (pretty much the same as first question) 5:35 Why should we use Typescript 7:11 Access Modifiers 8:23 What type did Typescript add to Javascript? 9:33 Difference between interface and type? 10:57 Generic types 12:03 Structural Typing 13:22 Private fields rules 14:24 Never vs unknown vs any 17:31 Declare keyword 18:52 What are ambients? (unanswered)
Ambient declarations are typically used to describe the shape of libraries that are written in JavaScript, so that you can use them in your TypeScript code with type checking and IDE support. They are defined in .d.ts files, which are TypeScript declaration files that contain only type information and no actual implementation code.
10:46 types cannot be extended, but they can be intersected to create new types. This should be mentioned when asked how types are different than interfaces.
Any allows you to perform any operation on a value without any type checking, whereas unknown requires you to perform type checking before performing any operations on the value. The 'never' keyword to make a variable of never type. Users can use the never type when they are sure about any situation that will never occur. For example, we can use the never as a return type when we are sure that the function will never return any value.
An ambient declaration is a way to tell the TypeScript compiler about the existence of a value that is not written in TypeScript, such as a global variable or a third-party library.
16:00 when using the any type, you can freely assign and reassign values of different types without TypeScript raising type errors. When you assign a type never, you cannot reassign it to any other type, including an object.
Ambient declarations in TypeScript allow you to provide type information for external libraries, global variables, or other non-TypeScript code. To use ambient declarations, you create `.d.ts` files where you define the ambient types. These declaration files should be included in your TypeScript project so that the compiler can recognize and apply the type information. Overall, ambient declarations in TypeScript enable better type-checking and tooling support in projects that involve external entities.
2:17 What is Typescript?
3:50 Components of Typescript (pretty much the same as first question)
5:35 Why should we use Typescript
7:11 Access Modifiers
8:23 What type did Typescript add to Javascript?
9:33 Difference between interface and type?
10:57 Generic types
12:03 Structural Typing
13:22 Private fields rules
14:24 Never vs unknown vs any
17:31 Declare keyword
18:52 What are ambients? (unanswered)
thank you for summarizing
Ambient declarations are typically used to describe the shape of libraries that are written in JavaScript, so that you can use them in your TypeScript code with type checking and IDE support. They are defined in .d.ts files, which are TypeScript declaration files that contain only type information and no actual implementation code.
Always nice to see a fellow BR speaking English so well. 💪
10:46 types cannot be extended, but they can be intersected to create new types. This should be mentioned when asked how types are different than interfaces.
You mean aggregating various types to create another type in the case of interface?
Any allows you to perform any operation on a value without any type checking, whereas unknown requires you to perform type checking before performing any operations on the value.
The 'never' keyword to make a variable of never type. Users can use the never type when they are sure about any situation that will never occur. For example, we can use the never as a return type when we are sure that the function will never return any value.
An ambient declaration is a way to tell the TypeScript compiler about the existence of a value that is not written in TypeScript, such as a global variable or a third-party library.
The intervieww has a very good knowledge of typescript. I was able to learn a lot from the video. Thank you for sharing the great video :)
16:00
when using the any type, you can freely assign and reassign values of different types without TypeScript raising type errors.
When you assign a type never, you cannot reassign it to any other type, including an object.
Thank you so much to Turning bros! Please publish many many videos like this. It's pretty helpful for everyone there, including me.
Ambient declarations in TypeScript allow you to provide type information for external libraries, global variables, or other non-TypeScript code.
To use ambient declarations, you create `.d.ts` files where you define the ambient types. These declaration files should be included in your TypeScript project so that the compiler can recognize and apply the type information.
Overall, ambient declarations in TypeScript enable better type-checking and tooling support in projects that involve external entities.
I would say no need to create it, just to set up declararion: true in tsconfig and it will be generated automatically from .ts files with types
Very Informative!!
can extends but it is not extends, it call Intersection. so it is not wrong if we say type can't extend.
Very well done.👍
Thank you! Cheers!
Awesome. Turing 🥰🥰🥰🥰
Thanks for watching! :)
Awesome.. Thank you so much it is very Usefull
Useful video
good one!
oh man i would crush these interviews
Hey buddy what kind of question is that “ u like typescript or not “ seriously is it concern with Candidate who is giving interview
`any` is funny, you can resassign `string | number | boolean` anything lol. Purpose of typescript defeated with single keyword.
he/him/his :D