fix: make name required on field types (#337)

* fix: make name required on field types

* fix: improve typescript types
This commit is contained in:
Dan Ribbens
2021-10-11 15:52:18 -04:00
committed by GitHub
parent d0259ceecd
commit b257e01c8d
8 changed files with 20 additions and 10 deletions

View File

@@ -57,7 +57,7 @@ export type OptionObject = {
export type Option = OptionObject | string
export interface FieldBase {
name?: string;
name: string;
label?: string | false;
required?: boolean;
unique?: boolean;
@@ -146,6 +146,7 @@ export type RowAdmin = Omit<Admin, 'description'> & {
};
export type RowField = Omit<FieldBase, 'admin'> & {
name?: string;
admin?: RowAdmin;
type: 'row';
fields: Field[];