- withAdder<R>(registry: R, addEntry: ((record: Draft<ReturnType<R["get"]>>, entry: RecordValue<ReturnType<R["get"]>>) => void)): R & WithAdder<RecordValue<RegistryValue<R>>>
-
Parameters
-
registry: R
-
addEntry: ((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
- withAdder<A, S>(store: S, addEntry: ((record: Draft<A>, entry: UnionOfValues<A>) => void)): S & WithAdder<ArrayValue<A>>
-
Type Parameters
-
A extends any[]
-
S extends Store<A>
Parameters
-
store: S
-
addEntry: ((record: Draft<A>, entry: UnionOfValues<A>) => void)
-
- (record: Draft<A>, entry: UnionOfValues<A>): void
-
Parameters
-
record: Draft<A>
-
entry: UnionOfValues<A>
Returns void
Returns S & WithAdder<ArrayValue<A>>
- withAdder<S>(store: S, addEntry: ((record: Draft<ReturnType<S["get"]>>, entry: RecordValue<ReturnType<S["get"]>>) => void)): S & WithAdder<RecordValue<StoreValue<S>>>
-
Type Parameters
-
S extends Store<Record<any, any>>
Parameters
-
store: S
-
addEntry: ((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