mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
add support for the new using keyword in TypeScript
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
consts
|
||||
| tst.tsx:2:3:2:26 | const { ... } = o; |
|
||||
| tst.tsx:9:5:9:26 | const b ... efined; |
|
||||
usings
|
||||
| tst.tsx:7:5:7:28 | using f ... as any; |
|
||||
#select
|
||||
| tst.tsx:1:10:1:10 | f |
|
||||
| tst.tsx:1:12:1:12 | o |
|
||||
| tst.tsx:2:14:2:14 | v |
|
||||
| tst.tsx:6:10:6:10 | v |
|
||||
| tst.tsx:7:11:7:13 | foo |
|
||||
| tst.tsx:9:11:9:13 | bar |
|
||||
|
||||
@@ -2,3 +2,7 @@ import javascript
|
||||
|
||||
from VarDecl decl
|
||||
select decl
|
||||
|
||||
query ConstDeclStmt consts() { any() }
|
||||
|
||||
query UsingDeclStmt usings() { any() }
|
||||
|
||||
@@ -2,3 +2,9 @@ function f(o) {
|
||||
const { p: v = [] } = o;
|
||||
return v;
|
||||
}
|
||||
|
||||
function v() {
|
||||
using foo = null as any;
|
||||
|
||||
const bar = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user