-
Notifications
You must be signed in to change notification settings - Fork 310
Description
Description
In numerous occasions, I find myself having to use anonymous records for a POJO and this discards a whole bunch of type-safety and conciseness (destructuring & reusability) when I'm able to re-use a defined type. I noticed in older examples there's a [<POJO>]
attribute which is exactly what I'm in need of, and I've also seen a couple of other people mention this in the Slack too.
This would obviously open up destructuring, but also allow a record as React component props (I think?). Additionally, it makes interop a lot easier as it doesn't mean dropping down to potentially unsafe anonymous records.
Repro code
[<POJO>]
type Foo =
{
A: string
B: int
}
would become something like
{ A: "whatever", B: 10 }
Was this removed for a technical reason or was it just to remove the amount of options?
Would you be open to this returning?