S
S
sirinotapple2022-04-09 01:13:54
Vue.js
sirinotapple, 2022-04-09 01:13:54

How to declare this typescript in vue?

Hello, sometimes you need to do this.someMethod()
or this.someData
or in methods, this.$refs.nav
but then typescript swears

any
'this' implicitly has type 'any' because it does not have a type annotation.Vetur(2683)

How to fix it ...
Swears really on this
6250b39e67346456846612.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2022-04-09
@sirinotapple

Arrow functions should be used

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question