mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
Only allow content types as relation target (cannot target component)
This commit is contained in:
parent
d010ff3a1e
commit
941b8fdad6
@ -9,7 +9,7 @@ export type Relation<
|
|||||||
// It is kept to allow for future iterations without breaking the current type API
|
// It is kept to allow for future iterations without breaking the current type API
|
||||||
_TOrigin extends Common.UID.Schema = Common.UID.Schema,
|
_TOrigin extends Common.UID.Schema = Common.UID.Schema,
|
||||||
TRelationKind extends RelationKind.Any = RelationKind.Any,
|
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'> &
|
> = Attribute.OfType<'relation'> &
|
||||||
// Properties
|
// Properties
|
||||||
Utils.Guard.Never<RelationProperties<TRelationKind, TTarget>, AllRelationProperties<TTarget>> &
|
Utils.Guard.Never<RelationProperties<TRelationKind, TTarget>, AllRelationProperties<TTarget>> &
|
||||||
@ -22,7 +22,7 @@ export type Relation<
|
|||||||
|
|
||||||
export type RelationProperties<
|
export type RelationProperties<
|
||||||
TRelationKind extends RelationKind.Any,
|
TRelationKind extends RelationKind.Any,
|
||||||
TTarget extends Common.UID.Schema
|
TTarget extends Common.UID.ContentType
|
||||||
> = Utils.Expression.MatchFirst<
|
> = Utils.Expression.MatchFirst<
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user