• builds an adder function for a store or registry

    Type Parameters

    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>>>>

  • 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>>

  • 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

    Returns Adder<RecordValue<StoreValue<S>>>

Generated using TypeDoc