跳到主要内容

useFindOneOrFail()

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

Defined in: hooks.ts:155

查找匹配的实体,未找到则抛出错误

Type Parameters

Type Parameter
T extends EntityType

Parameters

ParameterTypeDescription
EntityTypeT实体类
optionsUseOptions<EntityStaticType<T, "findOneOrFailOptions">>查询参数

Returns

RxDBResource<InstanceType<T> | undefined>

返回包含实体的资源 signal