-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Labels
enhancementNew feature or requestNew feature or requesthas PRmisalignmentMisalign with the latest RFCMisalign with the latest RFC
Description
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.
type Refs<T> = {
[P in keyof T]: 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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthas PRmisalignmentMisalign with the latest RFCMisalign with the latest RFC