CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.0.1 (changelog, source)

Member predicate Function::getThisTypeAnnotation

Gets the type annotation for the special this parameter, if it is present.

For example, this would be void for the following function:

function f(this: void, x: number, y: string) {}

The this parameter is not counted as an ordinary parameter. The x parameter above is thus considered the first parameter of the function f.

this parameter types are specific to TypeScript.

TypeAnnotation getThisTypeAnnotation()