import type { Collection, FilterQuery } from '@mikro-orm/core'; import type { StandardBaseEntity } from '../StandardBaseEntity'; import type { ResolvedEntityContext } from './resolveEntityContext'; interface LoadTypeOptions extends ResolvedEntityContext {} export function loadType(_opts: LoadTypeOptions) {} interface FindCollectionOptions extends ResolvedEntityContext { refresh?: boolean; where?: FilterQuery; } export function findCollection(col: Collection, _opts: FindCollectionOptions) { const where: FilterQuery[] = []; if (!where) { return col.loadItems(); } return col.matching({ where }); }