From 941b8fdad6fb01312e394ae8e11d1828d598fc1e Mon Sep 17 00:00:00 2001 From: Convly Date: Sat, 30 Sep 2023 13:31:21 +0200 Subject: [PATCH] Only allow content types as relation target (cannot target component) --- packages/core/types/src/types/core/attributes/relation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/types/src/types/core/attributes/relation.ts b/packages/core/types/src/types/core/attributes/relation.ts index 8543dbb0de..c74bdd4e84 100644 --- a/packages/core/types/src/types/core/attributes/relation.ts +++ b/packages/core/types/src/types/core/attributes/relation.ts @@ -9,7 +9,7 @@ export type Relation< // It is kept to allow for future iterations without breaking the current type API _TOrigin extends Common.UID.Schema = Common.UID.Schema, TRelationKind extends RelationKind.Any = RelationKind.Any, - TTarget extends Common.UID.Schema = Common.UID.Schema + TTarget extends Common.UID.ContentType = Common.UID.ContentType > = Attribute.OfType<'relation'> & // Properties Utils.Guard.Never, AllRelationProperties> & @@ -22,7 +22,7 @@ export type Relation< export type RelationProperties< TRelationKind extends RelationKind.Any, - TTarget extends Common.UID.Schema + TTarget extends Common.UID.ContentType > = Utils.Expression.MatchFirst< [ [