You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foo['bar'] to be the equivalent of foo.bar (i.e. ember's getter/setter); foo*['bar'] would be its native equivalent.
Main use case is for dynamic property access. In vanilla js, when we access a variable property of an object, we write foo[bar], because foo.bar would compile to a literal key bar.
Extending the . syntax to [] could generate:
get$(foo,bar)set$(foo,bar,'baz')
from both of the following:
foo.barfoo.bar='baz'
foo.get bar
foo.set bar, 'baz'
At present, only the latter is available for dynamic ember getter/setter access.
The text was updated successfully, but these errors were encountered:
Proposed syntax:
foo['bar']
to be the equivalent offoo.bar
(i.e. ember's getter/setter);foo*['bar']
would be its native equivalent.Main use case is for dynamic property access. In vanilla js, when we access a variable property of an object, we write
foo[bar]
, becausefoo.bar
would compile to a literal keybar
.Extending the
.
syntax to[]
could generate:from both of the following:
At present, only the latter is available for dynamic ember getter/setter access.
The text was updated successfully, but these errors were encountered: