We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@as
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; }
The text was updated successfully, but these errors were encountered:
oh that's a good catch.
Repro with v11-rc.8 here
Kind of a duplicate of #6438, unfortunately #6456 seems to only fix for the first case, not your second function.
Sorry, something went wrong.
fixed by #6551
Successfully merging a pull request may close this issue.
Tried out all these examples in the playground, w/ rc.8:
If we have a variant type with an aliased property:
we can successfully generate a binding to this property via a function:
Huzzah!
However, if instead we grab the inner record, and access the property off that, the name mapping fails to kick in.
The text was updated successfully, but these errors were encountered: