Skip to content

Commit 9086dfd

Browse files
committed
JS: TypeAnnotation.getType() for backwards compatibility
1 parent e9fcb67 commit 9086dfd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

javascript/ql/src/semmle/javascript/TypeAnnotations.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,11 @@ class TypeAnnotation extends @type_annotation, Locatable {
9898
* Gets the top-level containing this type annotation.
9999
*/
100100
TopLevel getTopLevel() { none() }
101+
102+
/**
103+
* Gets the static type denoted by this type annotation, if one is provided by the extractor.
104+
*
105+
* Note that this has no result for JSDoc type annotations.
106+
*/
107+
Type getType() { none() }
101108
}

0 commit comments

Comments
 (0)