From a0165d1eeed07ac2a4ccf0f62ea2b93e2a478e14 Mon Sep 17 00:00:00 2001 From: pq <44841842+qianphong@users.noreply.github.com> Date: Wed, 20 Oct 2021 09:13:04 +0800 Subject: [PATCH] perf(useRuleFormItem): more accurate return type (#1290) --- src/hooks/component/useFormItem.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hooks/component/useFormItem.ts b/src/hooks/component/useFormItem.ts index 4fd9a2520..cee415e88 100644 --- a/src/hooks/component/useFormItem.ts +++ b/src/hooks/component/useFormItem.ts @@ -1,4 +1,4 @@ -import type { UnwrapRef, Ref } from 'vue'; +import type { UnwrapRef, Ref, WritableComputedRef, DeepReadonly } from 'vue'; import { reactive, readonly, @@ -12,6 +12,13 @@ import { import { isEqual } from 'lodash-es'; +export function useRuleFormItem>( + props: T, + key?: K, + changeEvent?, + emitData?: Ref, +): [WritableComputedRef, (val: V) => void, DeepReadonly]; + export function useRuleFormItem( props: T, key: keyof T = 'value',