You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm having some problems writing bindings for a small React component. I have a typical union type with cases that represent props for the component. One of those cases looks like Tabs of ITab list. When I try to turn a list of these props into an object with keyValueList it works fine, until I add the Tabs prop, where the JavaScript will then throw an error saying Cannot infer key and value of [object Object].
Repro code
openFable.CoreopenFable.Core.JsInteroptypeITab={ Name:string
Selected:bool }typeProps=| Tabs ofITablist| Title ofstringlettab={ Name ="Hello"; Selected =true}letworks= keyValueList CaseRules.LowerFirst [Title "My Title"]letdoesNotWork= keyValueList CaseRules.None [Tabs [tab]; Title "My Title"]
Expected and actual results
I'd expect the doesNotWork value to not throw an error and generate an object that looks like:
vardoesNotWork={title: "My Title",tabs: [{name: "Hello",selected: true}]}
Related information
Fable version (dotnet fable --version): 1.3.0
Operating system: Windows 10 Pro
The text was updated successfully, but these errors were encountered:
Description
Hello, I'm having some problems writing bindings for a small React component. I have a typical union type with cases that represent props for the component. One of those cases looks like
Tabs of ITab list
. When I try to turn a list of these props into an object withkeyValueList
it works fine, until I add theTabs
prop, where the JavaScript will then throw an error sayingCannot infer key and value of [object Object]
.Repro code
Expected and actual results
I'd expect the
doesNotWork
value to not throw an error and generate an object that looks like:Related information
dotnet fable --version
): 1.3.0The text was updated successfully, but these errors were encountered: