diff --git a/packages/vue/vue/src/jsonFormsCompositions.ts b/packages/vue/vue/src/jsonFormsCompositions.ts index 83ba54a944..5daa05e896 100644 --- a/packages/vue/vue/src/jsonFormsCompositions.ts +++ b/packages/vue/vue/src/jsonFormsCompositions.ts @@ -39,6 +39,7 @@ import { import { PropType, computed, + ComputedRef, inject, onBeforeMount, onUnmounted, @@ -151,12 +152,12 @@ export type Required = T extends object export function useControl( props: P, stateMap: (state: JsonFormsState, props: P) => R -): { control: Required }; +): { control: ComputedRef> }; export function useControl( props: P, stateMap: (state: JsonFormsState, props: P) => R, dispatchMap: (dispatch: Dispatch) => D -): { control: Required } & D; +): { control: ComputedRef> } & D; export function useControl( props: P, stateMap: (state: JsonFormsState, props: P) => R, @@ -192,7 +193,7 @@ export function useControl( }); return { - control: (control as unknown) as R, + control: (control as unknown) as ComputedRef, ...dispatchMethods }; }