Answers for "an outer value of 'this' is shadowed by this container"

0

an outer value of 'this' is shadowed by this container

In TypeScript (and ES6) exists two kinds of functions: The classic function declaration and the arrow function. Where the classic function declaration has the default floating binding logic for the this keyword - the arrow function will constantly use the value for this of the context containing the arrow function. In the example this will be the instance of the surrounding class.
Posted by: Guest on March-21-2021

Browse Popular Code Answers by Language