Closed
Description
Description
JsInterop.jsOptions
compiles to a js record containing the specified fields. This works nicely for simple interfaces, however it behaves unexpectedly with nested ones.
Repro code
open Fable.Core
[<AllowNullLiteral>]
type MyInnerType =
abstract member value: int with get, set
[<AllowNullLiteral>]
type MyOuterType =
abstract member nested: MyInnerType with get, set
let x = JsInterop.jsOptions<MyOuterType> (fun o ->
o.nested.value <- 10
)
Actual output
export const x = {
value: 10,
};
Expected output
export const x = {
nested = {
value: 10,
}
};
or compilation error
Related information
- REPL: 4.2.0
- Fable: 4.23.0
Metadata
Metadata
Assignees
Labels
No labels