mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
JavaScript: Copy over a test left in internal repo.
This test seems to have been accidentally committed into the old location in the internal repo.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
| tst.ts:122:19:122:32 | import("type") | type | type |
|
||||
| tst.ts:123:26:123:39 | import("type") | type | type |
|
||||
| tst.ts:124:28:124:46 | import("namespace") | namespace | namespace |
|
||||
| tst.ts:125:35:125:53 | import("namespace") | namespace | namespace |
|
||||
| tst.ts:126:28:126:42 | import("value") | value | value |
|
||||
| tst.ts:127:37:127:51 | import("value") | value | value |
|
||||
| tst.ts:128:38:130:3 | import( ... ce'\\n ) | awkard-namespace | namespace |
|
||||
@@ -0,0 +1,13 @@
|
||||
import javascript
|
||||
|
||||
string getKind(ImportTypeExpr imprt) {
|
||||
if imprt.isTypeAccess() then
|
||||
result = "type"
|
||||
else if imprt.isNamespaceAccess() then
|
||||
result = "namespace"
|
||||
else
|
||||
result = "value"
|
||||
}
|
||||
|
||||
from ImportTypeExpr imprt
|
||||
select imprt, imprt.getPath(), getKind(imprt)
|
||||
Reference in New Issue
Block a user