Vue-next: Generic Ref typings errors

Created on 28 Aug 2020  路  2Comments  路  Source: vuejs/vue-next

Version

3.0.0-rc.9

Reproduction link

https://codesandbox.io/s/bold-fermat-28wgn?file=/src/composition/paginate.ts

Steps to reproduce

Just check the typings errors in the editor, especially at line 28 and 41

What is expected?

my dataTransformer function that returns T[] should be able to assign its return value to data.value

What is actually happening?

Impossible, typings don't allow me to do that.


This code used to work in @vue/composition-api on version 0.6.

I probably don't understand how some typings work, or maybe I need to cast some values differently.

Most helpful comment

All 2 comments

Ohhh that helped a lot. Thank you very much.

Was this page helpful?
0 / 5 - 0 ratings