M
M
Maxim Furman2021-11-17 22:35:55
typescript
Maxim Furman, 2021-11-17 22:35:55

How to fix Element implicitly has an 'any'?

Hello everyone help me fix these problems:

(Player.tsx
61955a6b2c96e851620618.jpeg
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'. No index signature with a parameter of type ' string' was found on type '{}'.

),
( App.tsx
61955a78c65ff279680110.jpeg
TS2339: Property 'classList' does not exist on type 'EventTarget'.
)

GitHub: https://github.com/maxim22351/IptvMax

Answer the question

In order to leave comments, you need to log in

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

1. accumyou have {}an object without a type. Give it a type: . At least make it a dictionary: . 2. Use - in theory it can be some kind of nested element, and therefore "cannot be" automatically typed. {} as SomeType{} as Record<string, IListTV>
e.currentTargete.target

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question