UNPKG

665 BTypeScriptView Raw
1import { HasOneDefinition } from '../relation.types';
2/**
3 * Relation definition with optional metadata (e.g. `keyTo`) filled in.
4 * @internal
5 */
6export type HasOneResolvedDefinition = HasOneDefinition & {
7 keyFrom: string;
8 keyTo: string;
9 polymorphic: false | {
10 discriminator: string;
11 };
12};
13/**
14 * Resolves given hasOne metadata if target is specified to be a resolver.
15 * Mainly used to infer what the `keyTo` property should be from the target's
16 * hasOne metadata
17 * @param relationMeta - hasOne metadata to resolve
18 * @internal
19 */
20export declare function resolveHasOneMetadata(relationMeta: HasOneDefinition): HasOneResolvedDefinition;