fix: add i18n type to collection and globals admin.description (#1675)
This commit is contained in:
@@ -545,5 +545,6 @@ export type SanitizedConfig = Omit<
|
||||
|
||||
export type EntityDescription =
|
||||
| string
|
||||
| Record<string, string>
|
||||
| (() => string)
|
||||
| React.ComponentType<any>;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Model, Document } from 'mongoose';
|
||||
import { DeepRequired } from 'ts-essentials';
|
||||
import { GraphQLNonNull, GraphQLObjectType } from 'graphql';
|
||||
import { PayloadRequest } from '../../express/types';
|
||||
import { Access, Endpoint, GeneratePreviewURL } from '../../config/types';
|
||||
import { Access, Endpoint, EntityDescription, GeneratePreviewURL } from '../../config/types';
|
||||
import { Field } from '../../fields/config/types';
|
||||
import { IncomingGlobalVersions, SanitizedGlobalVersions } from '../../versions/types';
|
||||
|
||||
@@ -78,7 +78,7 @@ export type GlobalConfig = {
|
||||
}
|
||||
fields: Field[];
|
||||
admin?: {
|
||||
description?: string | (() => string);
|
||||
description?: EntityDescription;
|
||||
group?: Record<string, string> | string;
|
||||
hideAPIURL?: boolean;
|
||||
components?: {
|
||||
|
||||
Reference in New Issue
Block a user