HandleOf<C>Handle inferred from a store contract.
models
Source src/Store.ts:5361 lines
export type type HandleOf<
C extends StoreContractValue
> = {
[K in keyof (Simplify<
StoreShapeHandleTree<C["shapes"]>
> &
Simplify<{
readonly [K in CustomHandleKeys<C>]: CustomMethodOf<
C,
K
>
}>)]: (Simplify<
StoreShapeHandleTree<C["shapes"]>
> &
Simplify<{
readonly [K in CustomHandleKeys<C>]: CustomMethodOf<
C,
K
>
}>)[K]
} extends infer B
? B
: never
Handle inferred from a store contract.
HandleOf<function (type parameter) C in type HandleOf<C extends StoreContractValue>C extends type StoreContractValue<Shapes extends StoreShapes = Readonly<Record<string, StoreShapeInput>>, Custom extends Readonly<Record<string, unknown>> = Readonly<Record<never, never>>> = StoreContractDef<Shapes, Custom> & PipeableStoreContractValue> = type StoreHandleFromContract<C extends StoreContractValue> = { [K in keyof (Simplify<StoreShapeHandleTree<C["shapes"]>> & Simplify<{ readonly [K in CustomHandleKeys<C>]: CustomMethodOf<C, K>; }>)]: (Simplify<StoreShapeHandleTree<C["shapes"]>> & Simplify<{ readonly [K in CustomHandleKeys<C>]: CustomMethodOf<C, K>; }>)[K]; } extends infer B ? B : neverHandle materialized from a
StoreContractValue
— nested shape tree plus top-level custom methods.
StoreHandleFromContract<function (type parameter) C in type HandleOf<C extends StoreContractValue>C>;