@solfacil/girassol
Version:
Girassol design system
19 lines (18 loc) • 571 B
TypeScript
import type { useField } from 'vee-validate';
import type { ComputedRef, Ref } from 'vue';
type Error = ComputedRef<string | null>;
export interface ParentValidation<T = unknown> {
error?: Error;
useFieldParent?: typeof useField;
rules?: Parameters<typeof useField>['1'];
opts?: Parameters<typeof useField<T>>['2'];
}
export interface VModelSetting<T = unknown> {
propKey: string;
emit: (args: T) => void;
}
export type ValidateFieldReturn<T = string> = {
value: Ref<T>;
errorMessage: ComputedRef<string | null> | undefined;
};
export {};