1 | import { Entity } from '../../model';
|
2 | import { EntityCrudRepository } from '../../repositories';
|
3 | import { Getter, HasOneDefinition, InclusionResolver } from '../relation.types';
|
4 | /**
|
5 | * Creates InclusionResolver for HasOne relation.
|
6 | * Notice that this function only generates the inclusionResolver.
|
7 | * It doesn't register it for the source repository.
|
8 | *
|
9 | * Notice: scope field for inclusion is not supported yet.
|
10 | *
|
11 | * @param meta - resolved HasOneMetadata
|
12 | * @param getTargetRepoDict - dictionary of target model type - target repository
|
13 | * i.e where related instances for different types are
|
14 | */
|
15 | export declare function createHasOneInclusionResolver<Target extends Entity, TargetID, TargetRelations extends object>(meta: HasOneDefinition, getTargetRepoDict: {
|
16 | [repoType: string]: Getter<EntityCrudRepository<Target, TargetID, TargetRelations>>;
|
17 | }): InclusionResolver<Entity, Target>;
|