-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
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
Property indexers not working as intended? #16
Comments
Thanks for the note. The README might not be clear enough, here - the comment's only referring to keys in object literals, not the indexer notation. I'll run back over it and try to clarify with some more examples. The intention is for object literals to work pretty closely to how they do in JavaScript. |
So are you saying that There are places in the README that mention a Can you elaborate? |
Yes, that's the case. The |
While attempting to access a specific property on my template, the following syntax does not appear to be working as documented:
{ {value: @p[propName]} }
When running the application, the
Value
property is not emitted in the final log.However, these work:
{ {value: @p['propName']} }
{ {value: @p.propName} }
The documentation mentions that anything that is a valid identifier can be used directly, and "non-identifiers" can be single quoted.
propName
is a valid identifier, however it is not working without the single quotes for me.In particular, there is this section in the readme:
If
a
is a "valid identifier that doesn't need to be escaped", then my property name shouldn't need to as well.I suspect either the documentation is a bit misleading when talking about these indexers, or there is a bug in the interpreter that is not allowing this to work as it should.
The text was updated successfully, but these errors were encountered: