Skip to content

Commit 049d560

Browse files
authored
fix: add i18n type to collection and globals admin.description (#1675)
1 parent 91493f9 commit 049d560

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/config/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,5 +545,6 @@ export type SanitizedConfig = Omit<
545545

546546
export type EntityDescription =
547547
| string
548+
| Record<string, string>
548549
| (() => string)
549550
| React.ComponentType<any>;

src/globals/config/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Model, Document } from 'mongoose';
33
import { DeepRequired } from 'ts-essentials';
44
import { GraphQLNonNull, GraphQLObjectType } from 'graphql';
55
import { PayloadRequest } from '../../express/types';
6-
import { Access, Endpoint, GeneratePreviewURL } from '../../config/types';
6+
import { Access, Endpoint, EntityDescription, GeneratePreviewURL } from '../../config/types';
77
import { Field } from '../../fields/config/types';
88
import { IncomingGlobalVersions, SanitizedGlobalVersions } from '../../versions/types';
99

@@ -78,7 +78,7 @@ export type GlobalConfig = {
7878
}
7979
fields: Field[];
8080
admin?: {
81-
description?: string | (() => string);
81+
description?: EntityDescription;
8282
group?: Record<string, string> | string;
8383
hideAPIURL?: boolean;
8484
components?: {

0 commit comments

Comments
 (0)