You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I just want to say how much I enjoy using Vue and the new composition api is amazing. Great job 馃憤
I'm using Typescript in my project and I've generally been using pretty basic interfaces and inference where possible, but I hit a problem yesterday wherein the return type of toRefs() wasn't valid.
I spent quite a while poking around in the composition-api source, inspecting type definitions, and eventually I realised that I could create the following type which will wrap an existing type/interface's properties in Ref.
typeRefs<T>={[PinkeyofT]: Ref<T[P]>;};
But I couldn't see something available/documented to provide this. Is this something that should be part of the library or would people be expected to provide something themselves?
Regards,
James.
The text was updated successfully, but these errors were encountered:
Howdy,
First of all, I just want to say how much I enjoy using Vue and the new composition api is amazing. Great job 馃憤
I'm using Typescript in my project and I've generally been using pretty basic interfaces and inference where possible, but I hit a problem yesterday wherein the return type of
toRefs()
wasn't valid.I spent quite a while poking around in the composition-api source, inspecting type definitions, and eventually I realised that I could create the following type which will wrap an existing type/interface's properties in
Ref
.But I couldn't see something available/documented to provide this. Is this something that should be part of the library or would people be expected to provide something themselves?
Regards,
James.
The text was updated successfully, but these errors were encountered: