CodeQL library for JavaScript
codeql/javascript-all 0.3.0-dev (changelog, source)
Search

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()