UNPKG

patronum

Version:

☄️ Effector utility library delivering modularity and convenience

10 lines (9 loc) 391 B
import { Store } from 'effector'; export declare function reshape<Type, Shape extends Record<string, unknown>>({ source, shape, }: { source: Store<Type>; shape: { [ShapeKey in keyof Shape]: (value: Type) => Shape[ShapeKey]; }; }): { [ResultKey in keyof Shape]: Store<undefined extends Shape[ResultKey] ? Exclude<Shape[ResultKey], void> | null : Shape[ResultKey]>; };