Exploring @unwrap for use in foreign interfaces and it seems incomplete in covariant position?
// A js library for a select input that can be either single or multi select.
@unwrap
type value<'option> = [#Option('option) | #Options(array<'option>)]
let defaultValue: option<Types.value<'optionType>> = defaultValue->Option.map((v): Types.value<'o> => #Option(v))
Js.Console.log2("RSSDV", defaultValue)
Prints
RSSDV {NAME: "Option", VAL: {…}}
I was expecting this value to be unboxed?
The boxed value is getting passed into my select component and breaks rendering, unsurprisingly
Thanks
A