Closed FrankBro closed 7 years ago
For some reason I thought this was already implemented and forgot about it, sorry! I already fixed it (the only difference being you've to use parens instead of angled brackets nameof(record.String)
) and it'll be included in the next Fable 1.0 pre-release.
nameof
will also work with type references"Record" = nameof(typeof<Record>)
, and I also addednameofLambda
as it's not always possible to have an instance reference to access the properties:nameofLambda(fun (x: Record) -> x.String)
. Unfortunately, it's a bit more verbose so please tell me if you've another proposal.
Description
With the addition of FSharp.Reflection, it is very easy to create dynamic form applications. Adding a simpler version of nameof would make it even easier and less error prone.
Repro code
Expected and actual results
For those tests to pass
Related information