TypeScript error: Initializer of instance member variable cannot reference identifier declared in the constructor.
In a TypeScript application we are building, we have code similar to the following:
However when we try to run this, TypeScript complains with the following error message:
Error 19 Initializer of instance member variable 'processAllOrders' cannot reference identifier 'that' declared in the constructor.
I think it’s a bug in TypeScript as I don’t see any reason why this shouldn’t work.