add support for the new using keyword in TypeScript

This commit is contained in:
erik-krogh
2023-08-10 21:48:21 +02:00
parent a7d92b3473
commit dc454d3a72
4 changed files with 24 additions and 2 deletions

View File

@@ -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 |

View File

@@ -2,3 +2,7 @@ import javascript
from VarDecl decl
select decl
query ConstDeclStmt consts() { any() }
query UsingDeclStmt usings() { any() }

View File

@@ -2,3 +2,9 @@ function f(o) {
const { p: v = [] } = o;
return v;
}
function v() {
using foo = null as any;
const bar = undefined;
}