Fixed a problem in definition of EntityRefLinksProps

Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2022-09-27 16:28:14 +02:00
parent 8bb14a6ae6
commit d3ae8eed67
+20 -6
View File
@@ -279,14 +279,28 @@ export type EntityRefLinkProps = {
} & Omit<LinkProps, 'to'>;
// @public
export function EntityRefLinks(props: EntityRefLinksProps): JSX.Element;
export function EntityRefLinks<
TRef extends string | CompoundEntityRef | Entity,
>(props: EntityRefLinksProps<TRef>): JSX.Element;
// @public
export type EntityRefLinksProps = {
entityRefs: (string | Entity | CompoundEntityRef)[];
defaultKind?: string;
getTitle?: (cer: CompoundEntityRef) => string | undefined;
} & Omit<LinkProps, 'to'>;
export type EntityRefLinksProps<
TRef extends string | CompoundEntityRef | Entity,
> = (
| {
defaultKind?: string;
entityRefs: TRef[];
fetchEntities?: false;
getTitle?(entity: TRef): string | undefined;
}
| {
defaultKind?: string;
entityRefs: TRef[];
fetchEntities: true;
getTitle(entity: Entity): string | undefined;
}
) &
Omit<LinkProps, 'to'>;
// @public
export function entityRouteParams(entity: Entity): {