Answer the question
In order to leave comments, you need to log in
How to fix Element implicitly has an 'any'?
Hello everyone help me fix these problems:
(Player.tsx
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
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. accum
you 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.currentTarget
e.target
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question