I'm trying to process assemblyscript arrays using the functional syntax.
However, when I try to access variable outside the scope of the functions I get an error:
Example
ts.values.filter(t => t.someField == ts.someField)
I get an error Cannot find name 'ts'
for the ts.someField
access within the function.
How can I add ts to the closure of my anonymous function?