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

Member predicate Parameter :: isDeclaredOptional

Holds if this is a parameter declared optional with the ? token.

Note that this does not hold for rest parameters, and does not in general hold for parameters with defaults.

For example, x, is declared optional below:

function f(x?: number) {}
predicate isDeclaredOptional ( )