import { ReferenceType } from '../enums' ; import type { OneToManyOptions } from './OneToMany' ; import { createOneToDecorator } from './OneToMany' ; import type { EntityName } from '../typings' ; export function OneToOne < T , O > ( entity ? , mappedBy ? , options = { } ) { return createOneToDecorator < T , O > ( entity as string , mappedBy , options , ReferenceType . ONE_TO_ONE ) ; } export interface OneToOneOptions < T , O > extends Partial < Omit < OneToManyOptions < T , O > , 'orderBy' > > { owner ? : boolean ; inversedBy ? : ( string & keyof T ) | ( ( e : T ) => any ) ; wrappedReference ? : boolean ; primary ? : boolean ; mapToPk ? : boolean ; onDelete ? : 'cascade' | 'no action' | 'set null' | 'set default' | string ; onUpdateIntegrity ? : 'cascade' | 'no action' | 'set null' | 'set default' | string ; }