跳到主要内容

useFindOneOrFail()

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

Defined in: hooks.ts:185

Find one entity or throw an error if not found

Type Parameters

Type Parameter
T extends EntityType

Parameters

ParameterTypeDescription
EntityTypeTThe entity class
optionsUseOptions<EntityStaticType<T, "findOneOrFailOptions">>Query options

Returns

RxDBResource<InstanceType<T> | undefined>

A resource object containing the entity