Class TypeAnnotation
A type annotation, either in the form of a TypeScript type or a JSDoc comment.
Import path
import javascript
Direct supertypes
Indirect supertypes
Known direct subtypes
Predicates
getAnUnderlyingType | Repeatedly unfolds unions, intersections, parentheses, and nullability/readonly modifiers and gets any of the underlying types, or this type itself if it cannot be unfolded. |
getClass | Gets the class referenced by this type annotation, if any. |
getEnclosingFunction | Gets the function in which this type appears, if any. |
getEnclosingStmt | Gets the statement in which this type appears. |
getTopLevel | Gets the top-level containing this type annotation. |
getType | Gets the static type denoted by this type annotation, if one is provided by the extractor. |
hasQualifiedName | Holds if this is a reference to the type with qualified name |
hasQualifiedName | Holds if this is a reference to the type exported from |
isAny | Holds if this is the |
isBigInt | Holds if this is the |
isBoolean | Holds if this is the |
isBooleany | Holds if this is the |
isConstKeyword | Holds if this is the |
isNever | Holds if this is the |
isNull | Holds if this is the |
isNumber | Holds if this is the |
isNumbery | Holds if this is the |
isObjectKeyword | Holds if this is the |
isRawFunction | Holds if this is the |
isString | Holds if this is the |
isStringy | Holds if this is the |
isSymbol | Holds if this is the |
isThis | Holds if this is the |
isUndefined | Holds if this is the |
isUniqueSymbol | Holds if this is the |
isUnknownKeyword | Holds if this is the |
isVoid | Holds if this is the |
Inherited predicates
getAPrimaryQlClass | Gets the primary QL class for the Locatable. | from Locatable |
getContainer | Gets the function or toplevel to which this node belongs. | from NodeInStmtContainer |
getEndLine | Gets the line on which this element ends. | from Locatable |
getFile | Gets the file this program element comes from. | from Locatable |
getLocation | Gets this element’s location. | from Locatable |
getNumLines | Gets the number of lines covered by this element. | from Locatable |
getPrimaryQlClasses | Gets a comma-separated list of the names of the primary CodeQL classes to which this element belongs. | from Locatable |
getStartLine | Gets the line on which this element starts. | from Locatable |
toString | Gets a textual representation of this element. | from Locatable |