Hello,
Is there a way to do something like the following:
let Defaults = { Val1 = "val1", Val2 = "val2", Bar = "bar" }
let MyType =
{ Type = { Foo : Text, Bar : Text }
, default = { Foo = "foo" } // Defaults
}
in MyType
but with something different that the operator //
so that it only merges the keys if the key is defined in the record type.So in this case, I would like only Bar
to be merged from the Defaults
record and all other keys to be discarded.
So the output I’m looking for is:
{ Type = { Bar : Text, Foo : Text }
, default = { Bar = "bar", Foo = "foo" }
}