progress to typing Blocks and Arrays
This commit is contained in:
@@ -25,11 +25,13 @@ type Admin = {
|
||||
hidden?: boolean
|
||||
}
|
||||
|
||||
type Labels = {
|
||||
export type Labels = {
|
||||
singular: string;
|
||||
plural: string;
|
||||
};
|
||||
|
||||
export type Validate = (value: unknown, options: unknown) => string | boolean;
|
||||
|
||||
interface FieldBase {
|
||||
name?: string;
|
||||
label?: string;
|
||||
@@ -41,7 +43,7 @@ interface FieldBase {
|
||||
hidden?: boolean;
|
||||
saveToJWT?: boolean
|
||||
localized?: boolean;
|
||||
validate?: (value: any, field: Field) => any;
|
||||
validate?: Validate;
|
||||
hooks?: {
|
||||
beforeValidate?: FieldHook[];
|
||||
beforeChange?: FieldHook[];
|
||||
|
||||
Reference in New Issue
Block a user