fix: add i18n type to collection and globals admin.description (#1675)

This commit is contained in:
Dan Ribbens
2022-12-15 09:45:06 -05:00
committed by GitHub
parent 91493f9e8f
commit 049d560898
2 changed files with 3 additions and 2 deletions

View File

@@ -545,5 +545,6 @@ export type SanitizedConfig = Omit<
export type EntityDescription =
| string
| Record<string, string>
| (() => string)
| React.ComponentType<any>;

View File

@@ -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?: {