mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
JS: make TypeAnnotation extend Locatable
This commit is contained in:
@@ -7,10 +7,7 @@ import javascript
|
||||
/**
|
||||
* A type annotation, either in the form of a TypeScript type or a JSDoc comment.
|
||||
*/
|
||||
class TypeAnnotation extends @type_annotation {
|
||||
/** Gets a string representation of this type. */
|
||||
string toString() { none() }
|
||||
|
||||
class TypeAnnotation extends @type_annotation, Locatable {
|
||||
/** Holds if this is the `any` type. */
|
||||
predicate isAny() { none() }
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
test_isString
|
||||
| string |
|
||||
| file://:0:0:0:0 | string |
|
||||
test_isNumber
|
||||
| number |
|
||||
| file://:0:0:0:0 | number |
|
||||
test_QualifiedName
|
||||
| VarType | VarType |
|
||||
| boolean | boolean |
|
||||
| foo.bar.baz | foo.bar.baz |
|
||||
| number | number |
|
||||
| string | string |
|
||||
| VarType | file://:0:0:0:0 | VarType |
|
||||
| boolean | file://:0:0:0:0 | boolean |
|
||||
| foo.bar.baz | file://:0:0:0:0 | foo.bar.baz |
|
||||
| number | file://:0:0:0:0 | number |
|
||||
| string | file://:0:0:0:0 | string |
|
||||
test_ParameterType
|
||||
| tst.js:7:12:7:12 | x | string |
|
||||
| tst.js:7:15:7:15 | y | number? |
|
||||
| tst.js:7:18:7:18 | z | foo.bar.baz |
|
||||
| tst.js:7:12:7:12 | x | file://:0:0:0:0 | string |
|
||||
| tst.js:7:15:7:15 | y | file://:0:0:0:0 | number? |
|
||||
| tst.js:7:18:7:18 | z | file://:0:0:0:0 | foo.bar.baz |
|
||||
test_VarType
|
||||
| tst.js:7:12:7:12 | x | string |
|
||||
| tst.js:7:15:7:15 | y | number? |
|
||||
| tst.js:7:18:7:18 | z | foo.bar.baz |
|
||||
| tst.js:11:7:11:7 | w | VarType |
|
||||
| tst.js:7:12:7:12 | x | file://:0:0:0:0 | string |
|
||||
| tst.js:7:15:7:15 | y | file://:0:0:0:0 | number? |
|
||||
| tst.js:7:18:7:18 | z | file://:0:0:0:0 | foo.bar.baz |
|
||||
| tst.js:11:7:11:7 | w | file://:0:0:0:0 | VarType |
|
||||
test_ReturnType
|
||||
| tst.js:7:1:12:1 | functio ... null;\\n} | boolean |
|
||||
| tst.js:7:1:12:1 | functio ... null;\\n} | file://:0:0:0:0 | boolean |
|
||||
|
||||
@@ -1 +1 @@
|
||||
| ResolvedType | resolved | ResolvedType |
|
||||
| tst.ts:5:8:5:19 | ResolvedType | resolved | ResolvedType |
|
||||
|
||||
Reference in New Issue
Block a user