File tree Expand file tree Collapse file tree
javascript/ql/test/library-tests/TypeAnnotations/JSDoc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ test_isString
2+ | string |
3+ test_isNumber
4+ | number |
5+ test_QualifiedName
6+ | VarType | VarType |
7+ | boolean | boolean |
8+ | foo.bar.baz | foo.bar.baz |
9+ | number | number |
10+ | string | string |
11+ test_ParameterType
12+ | tst.js:7:12:7:12 | x | string |
13+ | tst.js:7:15:7:15 | y | number? |
14+ | tst.js:7:18:7:18 | z | foo.bar.baz |
15+ test_VarType
16+ | tst.js:7:12:7:12 | x | string |
17+ | tst.js:7:15:7:15 | y | number? |
18+ | tst.js:7:18:7:18 | z | foo.bar.baz |
19+ | tst.js:11:7:11:7 | w | VarType |
20+ test_ReturnType
21+ | tst.js:7:1:12:1 | functio ... null;\\n} | boolean |
Original file line number Diff line number Diff line change 1+ import javascript
2+
3+ query TypeAnnotation test_isString ( ) {
4+ result .isString ( )
5+ }
6+
7+ query TypeAnnotation test_isNumber ( ) {
8+ result .isNumber ( )
9+ }
10+
11+ query TypeAnnotation test_QualifiedName ( string name ) {
12+ result .hasQualifiedName ( name )
13+ }
14+
15+ query TypeAnnotation test_ParameterType ( Parameter p ) {
16+ result = p .getTypeAnnotation ( )
17+ }
18+
19+ query TypeAnnotation test_VarType ( VarDecl decl ) {
20+ result = decl .getTypeAnnotation ( )
21+ }
22+
23+ query TypeAnnotation test_ReturnType ( Function f ) {
24+ result = f .getReturnTypeAnnotation ( )
25+ }
Original file line number Diff line number Diff line change 1+ /**
2+ * @param {string } x
3+ * @param {number? } y
4+ * @param {foo.bar.baz } z
5+ * @returns {boolean }
6+ */
7+ function f ( x , y , z ) {
8+ /**
9+ * @type {VarType }
10+ */
11+ var w = null ;
12+ }
You can’t perform that action at this time.
0 commit comments