--

Hi Alejandro Hernandez,

That's a good question. You can replace classes (export const Fruits: Record<FruitType, new () => Fruit>) with objects and use prototype inheritance instead to make code extendable. No room for doubts that it might work even better in some cases.

--

--

Oleh Baranovskyi
Oleh Baranovskyi

Written by Oleh Baranovskyi

Frontend Lead & Architect | Web community manager https://obaranovskyi.com/

No responses yet