跳到主要内容

useFindOneOrFail()

function useFindOneOrFail<T>(EntityType, options): RxDBResource<InstanceType<T> | undefined>;

Defined in: hooks.ts:134

查找第一个匹配实体,仓库未找到时返回错误。

Type Parameters

Type Parameter
T extends EntityType

Parameters

ParameterType
EntityTypeT
optionsUseOptions<EntityStaticType<T, "findOneOrFailOptions">>

Returns

RxDBResource<InstanceType<T> | undefined>