N
N
neomichi2020-10-15 09:04:59
typescript
neomichi, 2020-10-15 09:04:59

How to do it in Typescript?

Vue 3.0 has already "released" and I want to use typescript, but here's the problem - ref types
in the figure show problem areas.

5f87e3fb1c3b0180487924.png

found, like this, but (did not understand how, with the help of the code I can solve the problem)

interface Ref<T> {
  value: T
}

function ref<T>(value: T): Ref<T>


thanks for the help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Leo Mavrin, 2020-10-16
@neomichi

In addition to the comment, I can say that it is better to write like thislist['value'].push()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question