apS()
apS<
N,A,E,B>(name,fb): (fa) =>Either<E, { readonly [K in string | number | symbol]: K extends keyof A ? A[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