import type {Schema} from '../../../zero-types/src/schema.ts'; import type {Query} from './query.ts'; // Note: Using Query without explicit third type parameter is // intentional. When the default PullRow is left implicit, TypeScript // defers its evaluation, which prevents "type exceeds maximum length" errors // in deeply chained .related() calls (e.g., 90+ calls in stress tests). export type SchemaQuery = { readonly [K in keyof S['tables'] & string]: Query; }; export type ConditionalSchemaQuery = S['enableLegacyQueries'] extends true ? SchemaQuery : undefined;