Intermediate
TypeScript
Q74 / 100
What does "this" parameter typing, e.g. "function fn(this: HTMLElement, event: Event)", accomplish?
Correct! Well done.
Incorrect.
The correct answer is B) It specifies the expected type of "this" inside the function for type-checking purposes only, without affecting the actual parameter list
B
Correct Answer
It specifies the expected type of "this" inside the function for type-checking purposes only, without affecting the actual parameter list
Explanation
A "this" parameter is a fake parameter used only by the type checker to ensure the function is called with the correct context; it is erased in compiled output.
Progress
74/100