diff --git a/packages/bindx-client/src/selection/types.ts b/packages/bindx-client/src/selection/types.ts index 86ec63a6..95f06cd4 100644 --- a/packages/bindx-client/src/selection/types.ts +++ b/packages/bindx-client/src/selection/types.ts @@ -94,7 +94,10 @@ export interface FluentFragment< /** * Scalar method on selection builder - selects a scalar field */ -export interface ScalarMethod { +// TEntity is declared `in out` on all three *Method interfaces. Measured instead, it cycles through the `-?` mapped +// type in SelectionBuilderMethods and comes out unmeasurable, so TypeScript 7.1 compares builders structurally: +// quadratic in the entity's field count, TS2589 on large schemas. +export interface ScalarMethod { /** Select field with original name */ (): SelectionBuilder, THasManyParams> /** Select field with alias */ @@ -109,7 +112,7 @@ export interface ScalarMethod = TOptions extends { as: infer A extends string } * Has-many method on selection builder - selects a relation to multiple entities */ export interface HasManyMethod< - TEntity, + in out TEntity, // see ScalarMethod K extends keyof TEntity, TItem, TSelected extends object,