I have a function (method) that returns a function, and it's being used in a class:
public myMethod(): (row: number) => number {
return (row) => {
const newData = this.form[row]; // this.form is not defined
When returning the function (with row
argument), I don't have access to this
anymore. How should I refactor the function so that it has access to this
of the class?