apS()
apS<
N,A,E,B>(name,fb): (fa) =>Either<E, { readonly [K in string | number | symbol]: K extends keyof A ? A[K<K>] : B }>
Adds a value to the accumulated object in do notation.
Type Parametersโ
N: N extends stringโ
The property name.
A: A extends Record<string, unknown>โ
The accumulated type.
E: Eโ
The error type.
B: Bโ
The new value type.
Parametersโ
name: Exclude<N, keyof A>โ
The property name.
fb: Either<E, B>โ
The Either containing the value.
Returnsโ
A function that adds the value.
Sinceโ
2.0.0