You should mention about Interfaces vs Types so that people do not get confused later. :) And in oposite. Mention Interfaces when talking about Type.
@joaopedroschmitt11122 жыл бұрын
I think interfaces intention is not about class structure only, but about creating an abstraction (contract) between two domains that allow you to decouple one part from another by not requiring one part to understand the details of the implementation. A better explanation can be found by searching for the principles of Dependency Inversion, or, Dependency Injection. Interfaces is an essential tool for polymorphism
@ardavanansari4 жыл бұрын
first thing I do before watching a NetNinja video : hit the like button
@meylis_so26 ай бұрын
and yours also
@pulkitaggarwal19314 жыл бұрын
Hi, Could you please elaborate difference b/w interface and type for defining any type like isPerson in this video
@chiubaca4 жыл бұрын
its confusing... Summary from - medium.com/@martin_hotell/interface-vs-type-alias-in-typescript-2-7-2a8f1777af4c - type aliases can act sort of like interfaces, however, there are 3 important differences ( union types, declaration merging) - use whatever suites you and your team, just be consistent - always use interface for public API's definition when authoring a library or 3rd party ambient type definitions - consider using type for your React Component Props and State
@helengu4 жыл бұрын
you can redeclare interfaces multiple times and merge them together.
@Shakeel7143 жыл бұрын
Thanks Shaun for the wonderful tutorial series.
@boykasarboo94322 жыл бұрын
Hi! bro you are one of my favorite teachers..Stay blessed..
@rahulyavvari8 ай бұрын
Shaun is the best! @1:23 Maybe we have a method speak, cz people speak (lol : ) )
@eggziom2 жыл бұрын
Found naming interfaces a little bit confusing in the tutorial An interface basically describes functionality the object must have so you can interact with it. "Is-something" sounds more how you should name a type guard. I personally prefer just "Person". In the wild, you also may come across a convention to precede interface names with "I" (from "interface"; "IPerson"), like it was popular in Java, for example
@potantirittisak8494 Жыл бұрын
Very clear. Thank you!
@victoradeniji4554 Жыл бұрын
Thank you so much for this. Thank you.
@NetNinja Жыл бұрын
No worries! :) thanks for watching
@Pylogicx Жыл бұрын
Thanks, a lot. You have saved me time.
@AnweshAdhikari Жыл бұрын
Thanks, this helped!❤
@NikiL21344 жыл бұрын
Why wouldn't I just create a type alias of an object with these properties?
@mohdkamran5302 жыл бұрын
Same question
@andikasaputra13904 жыл бұрын
So, what is the difference between type & interface?
@samuelopeyemi83773 жыл бұрын
Type is what typescript infered or inbuilt type you declear e.g number, string. While interface is your custom type that doesn't come with TypeScript
@itaibiton90683 жыл бұрын
@@samuelopeyemi8377 yea but you can also create types
@usama_khalid4 жыл бұрын
your videos are great. i have a request - please make videos on Nuxt js (Vue ssr)
@cyanfroste55594 жыл бұрын
interfaces are mostly used with classes to define a class, but in js, classes are just glorified objects. so the differences are very small.
@gaddiji Жыл бұрын
can you explain me Interfaces, i cant understand wth is this..
@mylesdavies9476 Жыл бұрын
It's odd that you can't extend the object with additional properties. Surely as long as it still satisfies the interface, additional properties shouldn't be a problem. This would be allowed in C# for example and would be very common, for example an object implementing multiple interfaces through a range of different properties and methods.
@matheuscampos25662 жыл бұрын
great... tnx
@crucru40002 жыл бұрын
Which syntax highlighter do you have enabled here? very cool
@avtheprowd5 ай бұрын
Did you find it ?
@nomads_._land5 ай бұрын
@@avtheprowd That was me 2 years ago haha. No, but I use synthwave80 on vscode for everything except solidity :)
@avtheprowd5 ай бұрын
@@nomads_._land On which domain are you working on this days ?
@Santix_Oficial4 жыл бұрын
I have an Issue at compile time Uncaught ReferenceError: exports is not defined at my app.js file on the line Object.defineProperty(exports, "__esModule", { value: true }); someone help me please.
@loba89242 жыл бұрын
Thanks
@bouamarelouahhabi95254 жыл бұрын
I hope after this series you do another one about mern or mevn stack with typescript (a big one, it could be in udemy), you're the best man!
@avigarg3357 Жыл бұрын
how can we use pick utility type on new someone person you made from same interface"inperson"
@priyojitsingha10 ай бұрын
So interfaces can be considered as schemas for a object, am I right?
@AP-no6uc3 жыл бұрын
Hello! Can you tell me please which color theme you use in VS Code? it looks nice.
@TheMisieq933 жыл бұрын
I think he uses Monokai++
@R_Samnan4 жыл бұрын
Super cool
@johnconnor9787 Жыл бұрын
What is the difference between Interface and Type aliases?
@Djinn6672 жыл бұрын
This is similar to classes in C++
@zes72152 жыл бұрын
wrg, sx any nmw and any s perfx, not stringx etc
@Mikevets2 жыл бұрын
How is Interface different from Type Alias?
@ridl274 жыл бұрын
ty.
@amanin43264 жыл бұрын
whatsup with the 30 man ?
@vaibhavshukl82654 жыл бұрын
Can you make one series on Wordpress and one on Native android development using Kotlin?
@aayushkumarthakur30953 жыл бұрын
Make a method speak because people do speak 🙂
@imdeadserious6102Ай бұрын
When you're taught that JS has nothing to do with Java, then JS becomes Typescript and as close to Java as it can be... I really don't like typescript... but full stack school. yay