B
B
BonBon Slick2021-11-11 02:38:51
typescript
BonBon Slick, 2021-11-11 02:38:51

Live examples of type/interface?

Can you please give an example from the production code of the most used type in comparison with the interface?
https://stackoverflow.com/questions/37233735/inter...
I see the difference, but I don't understand how to use it yet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-11-11
@BonBonSlick

Interfaces can be declared merged - that's why it makes sense to use them for something that can be extended by someone else.
Otherwise, there is not much difference.
Well, you can program on types - that's why they can be used to create (unnecessarily) cunning, but convenient constructions.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question