S
S
Spooky 20202021-11-06 19:38:40
Design patterns
Spooky 2020, 2021-11-06 19:38:40

Does TypeScript have the kind of OOP stuff you see in design pattern books?

I'm currently reading Design Patterns , the code of examples is in Java, I don't know Java very well and I'm too lazy to make files for each class/interface.
Therefore, the question is - are the approaches described in the book applicable to TypeScript and will it be possible to do all the examples on it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2021-11-06
@spooky_2020

Design patterns are abstracted from the language and work almost everywhere in the same way. Some imprint can be imposed on them by dynamic typing, as in JS, but even here nothing will change much.
In addition, it is fundamentally wrong to attribute patterns to OOP. They work exactly the same in all paradigms, with a few minor exceptions.
And finally, the OOP part in TS is directly copied from Java, so many examples will even look similar.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question