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

Remove unused properties from external type

$
0
0

Hello,

I’m mapping an external type in my code:

type person = {
  id: int,
  name: string,
  img: string
}

At runtime, the person type has many more properties attached to it. Is there a clever way to strip any properties that are not defined in ReScript? I could manually map it, but I wonder if there’s an alternative approach.


Viewing all articles
Browse latest Browse all 2592

Trending Articles