Fixed a problem in definition of EntityRefLinksProps

Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2022-09-27 15:57:53 +02:00
parent 34a7a46700
commit 8bb14a6ae6
@@ -26,19 +26,21 @@ import { FetchedEntityRefLinks } from './FetchedEntityRefLinks';
*/
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'>);
}
) &
Omit<LinkProps, 'to'>;
/**
* Shows a list of clickable links to entities.