@prefecthq/prefect-ui-library
Version:
This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.
13 lines (12 loc) • 594 B
TypeScript
import { MaybeRefOrGetter, Ref } from 'vue';
import { Schema } from '../../schemas/types/schema';
import { SchemaValues } from '../../schemas/types/schemaValues';
import { SchemaValueError } from '../../schemas/types/schemaValuesValidationResponse';
type UseSchemaValidation = {
valid: Ref<boolean>;
errors: Ref<SchemaValueError[]>;
validate: () => Promise<boolean>;
reset: () => void;
};
export declare function useSchemaValidation(schema: MaybeRefOrGetter<Schema | null | undefined>, values: MaybeRefOrGetter<SchemaValues | null | undefined>): UseSchemaValidation;
export {};