knockout / tko

🥊 Technical Knockout – The Monorepo for Knockout.js (4.0+)
http://www.tko.io
Other
275 stars 34 forks source link

Assignment expression in parser #120

Open tscpp opened 4 years ago

tscpp commented 4 years ago

As far as I know, TKO uses a custom lightweight parser instead of eval nowadays. Correct me if I'm wrong.

I stumbled upon this issue while using knockout-decorators. The decorators convert the class property into a setter/getter observable, but this issue can also be experienced if you try to assign a value to a non-observable variable.

TKO doesn't support normal assignments (var = val), just observable assignment which is just a call expression. It seems to me like assignment expressions should be supported.