import type { Knex } from 'knex'; import type { ModelCastType } from '../types'; export type ExpressionRelationConfig = { relation: string; fn: 'count' | 'sum' | 'avg' | 'min' | 'max'; column?: string | Knex.Raw; cast?: ModelCastType; callback?: (q: any) => void; }; export type ExpressionCallback = (db: any, parentTable: string) => any; export declare function Expression(config: ExpressionRelationConfig | ExpressionCallback, castOption?: ModelCastType): (target: any, key: string) => void;