phryneasToday at 10:48 AM
@Dzintars There is none. Readonly is a mapped type that creates the second type
Well, minor differences. One is an interface and one is a type.
https://twitter.com/phry/status/1222241038884048896
Lenz Weber (@phry)
This #TypeScriptTuesday, we're going to take a look at #TypeScript's interfaces.
Interfaces are different from types and both have their strengths in different situations.
Let's take a look.
This is just some interface definition - again an example from the #redux types:
:thread::point_down:
But in this situation that probably should not concern you, apart from the different "mouseover" behaviour
DzintarsToday at 11:00 AM
Thank you! Then.. what does the "industry" chooses in this context? Just interfaces?
phryneasToday at 11:02 AM
I've not seen any preference for one or the other really.
DzintarsToday at 11:35 AM
That tweet is really good. Thank you.
Hi all. Could someone explain me an difference of:
and
?
phryneasToday at 10:48 AM @Dzintars There is none. Readonly is a mapped type that creates the second type Well, minor differences. One is an interface and one is a type. https://twitter.com/phry/status/1222241038884048896
Lenz Weber (@phry) This #TypeScriptTuesday, we're going to take a look at #TypeScript's interfaces. Interfaces are different from types and both have their strengths in different situations. Let's take a look. This is just some interface definition - again an example from the #redux types: :thread::point_down:
But in this situation that probably should not concern you, apart from the different "mouseover" behaviour
DzintarsToday at 11:00 AM Thank you! Then.. what does the "industry" chooses in this context? Just interfaces?
phryneasToday at 11:02 AM I've not seen any preference for one or the other really.
DzintarsToday at 11:35 AM That tweet is really good. Thank you.