mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
fix: remove conditionals for attribute filtering, causing infinite recursion
This commit is contained in:
parent
84d5b5f2a0
commit
01e89d1a40
@ -58,23 +58,19 @@ export type AttributesFiltering<TSchemaUID extends Common.UID.Schema> = Utils.Gu
|
|||||||
* Definition of scalar attribute filtering for a given schema UID.
|
* Definition of scalar attribute filtering for a given schema UID.
|
||||||
* @template TSchemaUID - The UID of the schema.
|
* @template TSchemaUID - The UID of the schema.
|
||||||
*/
|
*/
|
||||||
export type ScalarAttributesFiltering<TSchemaUID extends Common.UID.Schema> =
|
export type ScalarAttributesFiltering<TSchemaUID extends Common.UID.Schema> = IDFiltering & {
|
||||||
AttributeUtils.GetScalarKeys<TSchemaUID> extends infer TKeys
|
[TKey in AttributeUtils.GetScalarKeys<TSchemaUID>]?: AttributeCondition<TSchemaUID, TKey>;
|
||||||
? TKeys extends AttributeUtils.GetScalarKeys<TSchemaUID>
|
};
|
||||||
? IDFiltering & { [TKey in TKeys]?: AttributeCondition<TSchemaUID, TKey> }
|
|
||||||
: never
|
|
||||||
: never;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters object for nested schema attributes.
|
* Filters object for nested schema attributes.
|
||||||
* @template TSchemaUID - The UID of the schema to perform filtering on.
|
* @template TSchemaUID - The UID of the schema to perform filtering on.
|
||||||
*/
|
*/
|
||||||
export type NestedAttributeFiltering<TSchemaUID extends Common.UID.Schema> =
|
export type NestedAttributeFiltering<TSchemaUID extends Common.UID.Schema> = {
|
||||||
AttributeUtils.GetNestedKeys<TSchemaUID> extends infer TKeys
|
[TKey in AttributeUtils.GetNestedKeys<TSchemaUID>]?: ObjectNotation<
|
||||||
? TKeys extends AttributeUtils.GetNestedKeys<TSchemaUID>
|
Attribute.GetTarget<TSchemaUID, TKey>
|
||||||
? { [TKey in TKeys]?: ObjectNotation<Attribute.GetTarget<TSchemaUID, TKey>> }
|
>;
|
||||||
: never
|
};
|
||||||
: never;
|
|
||||||
|
|
||||||
type IDFiltering = { id?: AttributeCondition<never, IDKey> };
|
type IDFiltering = { id?: AttributeCondition<never, IDKey> };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user