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

Member predicate BindingPattern :: getTypeAnnotation

Returns the type annotation for this variable or pattern, if any.

Only the outermost part of a binding pattern can have a type annotation. For instance, in the declaration,

 var {x}: Point
 

the variable x has no type annotation, whereas the pattern {x} has the type annotation Point.

TypeAnnotation getTypeAnnotation ( )