Fable.Remoting icon indicating copy to clipboard operation
Fable.Remoting copied to clipboard

Include caveat in the docs about Option<Option<'t>> roundtrip

Open Zaid-Ajaj opened this issue 5 years ago • 2 comments

Because Fable erasing Some None into null can cause problems when deserializing back to Some None. This is a weird edge case because null here can mean both None or Some None

Zaid-Ajaj avatar Jul 21 '20 09:07 Zaid-Ajaj

I think Fable does some extra work to track Some None:

In the Fable Repl

let someNone = Some None
console.log(someNone)

image

0x53A avatar Jul 21 '20 09:07 0x53A

Hi @0x53A, thanks for checking this out! if the structure of a nested optional is maintained when transferred, then we should be able to support the conversion properly. Then I will add a couple of tests to see how it goes

Zaid-Ajaj avatar Jul 21 '20 09:07 Zaid-Ajaj