Function Relationship with "this"
In this lesson, you will learn about the relationship of functions with the "this" keyword.
We'll cover the following...
Function and this
TypeScript has the capability of letting the author of a function specify the type of this
. Without it, even with the arrow function, this may be of type any
. The lack of a type on this often occurs if you are using an object literal with a function that returns a function that uses this
. The function in the object literal is called a function expression and returns any
type when the value is accessed with this
.
However, we know that the type means the object literal, ...