T
T
the5x2020-05-13 16:47:59
JavaScript
the5x, 2020-05-13 16:47:59

A variable garbage dump that needs an Interface, which solution to choose?

I am rewriting the code.
There is one component that has a global property this.technology .
This property is used in different methods and can be either an empty object or
with different data. I need to make an interface for it, but this variable is garbage .
How to solve this problem? I can't leave any.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2020-05-13
@Xuxicheta

Discriminated Unions + type guards

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question