diff --git a/packages/core/types/src/modules/entity-service/params/attributes/index.ts b/packages/core/types/src/modules/entity-service/params/attributes/index.ts index 970fd9d28e..28cba45620 100644 --- a/packages/core/types/src/modules/entity-service/params/attributes/index.ts +++ b/packages/core/types/src/modules/entity-service/params/attributes/index.ts @@ -53,7 +53,10 @@ export type GetValues = { * * Fallback to unknown if never is found */ -export type GetValue = Utils.Expression.If< +export type GetValue< + TAttribute extends Attribute.Attribute, + TGuard = unknown +> = Utils.Expression.If< Utils.Expression.IsNotNever, Utils.Expression.MatchFirst< [ @@ -112,7 +115,7 @@ export type GetValue = Utils.Expression. ], // Fallback // If none of the above attribute type, fallback to the original Attribute.GetValue (while making sure it's an attribute) - [Utils.Expression.True, Attribute.GetValue] + [Utils.Expression.True, Attribute.GetValue] ], unknown >,