- adder<R>(registry: R, handler: ((record: Draft<ReturnType<R["get"]>>, entry: RecordValue<ReturnType<R["get"]>>) => void)): R & Adder<ReturnType<RecordValue<RegistryValue<R>>>>
-
Parameters
-
registry: R
-
handler: ((record: Draft<ReturnType<R["get"]>>, entry: RecordValue<ReturnType<R["get"]>>) => void)
-
- (record: Draft<ReturnType<R["get"]>>, entry: RecordValue<ReturnType<R["get"]>>): void
-
Parameters
-
record: Draft<ReturnType<R["get"]>>
-
entry: RecordValue<ReturnType<R["get"]>>
Returns void
Returns R & Adder<ReturnType<RecordValue<RegistryValue<R>>>>
- adder<A, S>(store: S, handler: ((record: Draft<A>, entry: UnionOfValues<A>) => void)): Adder<ArrayValue<A>>
-
Type Parameters
-
A extends any[]
-
S extends Store<A>
Parameters
-
store: S
-
handler: ((record: Draft<A>, entry: UnionOfValues<A>) => void)
-
- (record: Draft<A>, entry: UnionOfValues<A>): void
-
Parameters
-
record: Draft<A>
-
entry: UnionOfValues<A>
Returns void
Returns Adder<ArrayValue<A>>
- adder<S>(store: S, handler: ((record: Draft<ReturnType<S["get"]>>, entry: RecordValue<ReturnType<S["get"]>>) => void)): Adder<RecordValue<StoreValue<S>>>
-
Type Parameters
-
S extends Store<Record<string | number | symbol, any>>
Parameters
-
store: S
-
handler: ((record: Draft<ReturnType<S["get"]>>, entry: RecordValue<ReturnType<S["get"]>>) => void)
-
- (record: Draft<ReturnType<S["get"]>>, entry: RecordValue<ReturnType<S["get"]>>): void
-
Parameters
-
record: Draft<ReturnType<S["get"]>>
-
entry: RecordValue<ReturnType<S["get"]>>
Returns void
builds an adder function for a store or registry