I
I
Ivan2021-02-05 16:38:39
typescript
Ivan, 2021-02-05 16:38:39

What does ts swear at if he specified the correct interface?

I can’t understand what the TS requires of me when I pass the interface to it on the item that lies in the callback. Checked, in the console room === IRoomItem, but the vehicle still does not skip. If I put any, then everything is fine (strange, yeah)
601d49fbc9dec649987152.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Klein Maximus, 2021-02-05
@BenderIsGreat34

Try it differently:

Object.values<IRoomItem>(this.props.rooms).map( /* */ );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question