fix: clean up dependencies and config schema (#704)

This commit is contained in:
Daniel Lautzenheiser
2023-04-17 10:35:35 -04:00
committed by GitHub
parent 778e6bac75
commit ecb1218646
28 changed files with 304 additions and 179 deletions

View File

@ -121,8 +121,9 @@ export interface FieldsErrors {
[field: string]: FieldError[];
}
export type FieldGetValidValueMethod<T = unknown> = (
export type FieldGetValidValueMethod<T = unknown, F extends BaseField = UnknownField> = (
value: T | undefined | null,
field: F,
) => T | undefined | null;
export type FieldGetDefaultMethod<T = unknown, F extends BaseField = UnknownField> = (
@ -363,7 +364,7 @@ export interface Widget<T = unknown, F extends BaseField = UnknownField> {
control: ComponentType<WidgetControlProps<T, F>>;
preview?: WidgetPreviewComponent<T, F>;
validator: FieldValidationMethod<T, F>;
getValidValue: FieldGetValidValueMethod<T>;
getValidValue: FieldGetValidValueMethod<T, F>;
getDefaultValue?: FieldGetDefaultMethod<T, F>;
schema?: PropertiesSchema<unknown>;
}