Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1784

Spread incoming type in module function

$
0
0

I use ReScript Schema for this. See data in the Stripe integration I recently built GitHub - enviodev/rescript-stripe: 💸 Stripe Billing as a Config

The data is a wrapper around S.object schema which you can also use to describe transformations and field renamings. And after you got the schema, I can use it for decoding/encoding + get a list of fields and do some additional logic around this. Checkout the rescript-stripe source code to see how it’s done.


Viewing all articles
Browse latest Browse all 1784

Trending Articles