Skip to main content

Function: hasOne()

hasOne(config)

hasOne<I>(config?): PendingModelRelation<I, false>

Type parameters

I extends null | object = ModelInstance

Parameters

config?: string | string[] | ModelRelationConfig

Returns

PendingModelRelation<I, false>

Source

packages/core/src/model/props/builders/hasOne.ts:12

hasOne(resolver)

hasOne<M>(resolver): PendingModelRelation <PendingModelRelationInstance<M>, false>

Type parameters

M extends object | object[]

Parameters

resolver

Returns

PendingModelRelation <PendingModelRelationInstance<M>, false>

Source

packages/core/src/model/props/builders/hasOne.ts:15