Closed
Description
Tried out all these examples in the playground, w/ rc.8:
If we have a variant type with an aliased property:
type union =
Member({
@as("annoyinglyLongName") shortName: string
})
we can successfully generate a binding to this property via a function:
let shortName = (Member({shortName})) => shortName
function shortName(param) {
return param.annoyinglyLongName;
}
Huzzah!
However, if instead we grab the inner record, and access the property off that, the name mapping fails to kick in.
let shortName' = (Member(r)) => r.shortName
function accessRec$p(r) {
return r.shortName;
}
Metadata
Metadata
Assignees
Labels
No labels