P
P
p3trukh1n2019-07-11 13:12:12
JavaScript
p3trukh1n, 2019-07-11 13:12:12

Typescript how to fix type this error?

5d270b46c73ae250975419.png
An error pops up

'this' implicitly has type 'any' because it does not have a type annotation.

When using jQuery.
How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2019-07-11
@p3trukh1n

$('...').each(function(this: JQuery) {
  // ...
});

PS https://toster.ru/help/rules 3.8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question