fp-ts Questions

2

Solved

I have to make an array of IO calls in parallel, and merge the contents of the call if successful. If one fails the others get processed as per normal, but an error message. My thought process on ...
Joslin asked 1/3, 2020 at 2:8

2

Solved

I am getting started with fp-ts lib and was wondering what is the advantage of using Option type over typescript's default notion of optional values represented by question mark ? operator?
Inhale asked 27/3, 2020 at 12:42

1

My goal is to request transactions from an API and store them to a database. The response is paginated and I want to read every page and store the transactions in batches. So for one request/respo...
Amieeamiel asked 22/5, 2020 at 23:14

1

Solved

I'm using io-ts and i'm wondering if there's a way to turn an array of strings (literals) into a union of such literals. For example: export const CONTROLS = [ "section", "text&quo...
Hyphenated asked 21/1, 2021 at 20:38

2

Solved

I am still learning and playing with fp-ts and can't figure this out. I have an array of Either<any, number>[] and I would like to get an Either<any, number[]>. I have looked at Apply...
Weeper asked 13/9, 2019 at 2:47

2

I'm trying to create an io-ts interface of the following: export interface myInterface { [key:string]?: string | undefined | null } I want to turn this into the io-ts equivalent. The end goal is ...
Illuminant asked 28/7, 2020 at 22:34

1

Solved

I have a list of strings, string[] I map a validate function that returns Either<Error, string>[] I want [Error[], string[]], all validation errors and all validated strings. Can sequence(Eit...
Antisyphilitic asked 30/7, 2020 at 22:41

1

Solved

In fp-ts, I'm trying to chain some potentially failing async tasks together with TaskEither but I need to use the results from intermediate tasks later on down the chain. In this example: const g...
Rippy asked 25/10, 2019 at 14:17

1

Solved

In fp-ts they have this workaround for higher kinded types: export interface HKT<URI, A> { readonly _URI: URI; readonly _A: A; } And it can be used like this: export interface Foldable&...
Poona asked 14/4, 2018 at 7:10
1

© 2022 - 2025 — McMap. All rights reserved.