Merge pull request #14053 from erik-krogh/ts52

JS: Add support for TypeScript 5.2
This commit is contained in:
Erik Krogh Kristensen
2023-08-31 14:39:50 +02:00
committed by GitHub
31 changed files with 5374 additions and 53 deletions

View File

@@ -25,7 +25,7 @@
Python [8]_,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11",Not applicable,``.py``
Ruby [9]_,"up to 3.2",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``"
Swift [10]_,"Swift 5.4-5.8.1","Swift compiler","``.swift``"
TypeScript [11]_,"2.6-5.1",Standard TypeScript compiler,"``.ts``, ``.tsx``, ``.mts``, ``.cts``"
TypeScript [11]_,"2.6-5.2",Standard TypeScript compiler,"``.ts``, ``.tsx``, ``.mts``, ``.cts``"
.. container:: footnote-group

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Add @using_decl_stmt
compatibility: backwards

View File

@@ -0,0 +1,35 @@
{
"name": "typescript-parser-wrapper",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "typescript-parser-wrapper",
"dependencies": {
"typescript": "5.2.2"
},
"devDependencies": {
"@types/node": "18.15.3"
}
},
"node_modules/@types/node": {
"version": "18.15.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz",
"integrity": "sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==",
"dev": true,
"license": "MIT"
},
"node_modules/typescript": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
}
}
}

View File

@@ -2,7 +2,7 @@
"name": "typescript-parser-wrapper",
"private": true,
"dependencies": {
"typescript": "5.1.3"
"typescript": "5.2.2"
},
"scripts": {
"build": "tsc --project tsconfig.json",

View File

@@ -4,10 +4,10 @@
"@types/node@18.15.3":
version "18.15.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.3.tgz#f0b991c32cfc6a4e7f3399d6cb4b8cf9a0315014"
resolved "https://registry.npmjs.org/@types/node/-/node-18.15.3.tgz"
integrity sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==
typescript@5.1.3:
version "5.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.3.tgz#8d84219244a6b40b6fb2b33cc1c062f715b9e826"
integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==
typescript@5.2.2:
version "5.2.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==

View File

@@ -2674,17 +2674,42 @@ public class Parser {
// - 'async /*foo*/ function' is OK.
// - 'async /*\n*/ function' is invalid.
boolean isAsyncFunction() {
return isAsyncKeyword("async", "function");
}
boolean isAwaitUsing() {
return isAsyncKeyword("await", "using");
}
// check 'pre [no LineTerminator here] keyword'
// e.g. `await using" or `async function`.
// is only used for async/await parsing, so it requires ecmaVersion >= 8.
boolean isAsyncKeyword(String pre, String keyword) {
if (this.type != TokenType.name
|| this.options.ecmaVersion() < 8
|| !this.value.equals("async")) return false;
|| !this.value.equals(pre)) return false;
Matcher m = Whitespace.skipWhiteSpace.matcher(this.input);
m.find(this.pos);
int next = m.end();
int len = keyword.length();
return !Whitespace.lineBreakG.matcher(inputSubstring(this.pos, next)).matches()
&& inputSubstring(next, next + len).equals(keyword)
&& (next + len == this.input.length()
|| !Identifiers.isIdentifierChar(this.input.codePointAt(next + len), false));
}
// matches "using [identifier]"
boolean isUsingDecl() {
if (this.type != TokenType.name
|| this.options.ecmaVersion() < 8
|| !this.value.equals("using")) return false;
Matcher m = Whitespace.skipWhiteSpace.matcher(this.input);
m.find(this.pos);
int next = m.end();
return !Whitespace.lineBreakG.matcher(inputSubstring(this.pos, next)).matches()
&& inputSubstring(next, next + 8).equals("function")
&& (next + 8 == this.input.length()
|| !Identifiers.isIdentifierChar(this.input.codePointAt(next + 8), false));
&& Identifiers.isIdentifierChar(this.input.codePointAt(next), false);
}
/**
@@ -2737,7 +2762,7 @@ public class Parser {
return this.parseThrowStatement(startLoc);
} else if (starttype == TokenType._try) {
return this.parseTryStatement(startLoc);
} else if (starttype == TokenType._const || starttype == TokenType._var) {
} else if (starttype == TokenType._const || starttype == TokenType._var || this.isUsingDecl()) {
if (kind == null) kind = String.valueOf(this.value);
if (!declaration && !kind.equals("var")) this.unexpected();
return this.parseVarStatement(startLoc, kind);
@@ -2761,6 +2786,10 @@ public class Parser {
: this.parseExport(startLoc, exports);
} else {
if (this.isAwaitUsing() && (this.inAsync || options.esnext() && !this.inFunction)) {
this.next();
return this.parseVarStatement(startLoc, "using");
}
if (this.isAsyncFunction() && declaration) {
this.next();
return this.parseFunctionStatement(startLoc, true);
@@ -2840,7 +2869,10 @@ public class Parser {
this.expect(TokenType.parenL);
if (this.type == TokenType.semi) return this.parseFor(startLoc, null);
boolean isLet = this.isLet();
if (this.type == TokenType._var || this.type == TokenType._const || isLet) {
if (this.isAwaitUsing() && this.inAsync) {
this.next(); // just skip the await and treat it as a `using` statement
}
if (this.type == TokenType._var || this.type == TokenType._const || isLet || (this.type == TokenType.name && this.value.equals("using"))) {
Position initStartLoc = this.startLoc;
String kind = isLet ? "let" : String.valueOf(this.value);
this.next();
@@ -3122,7 +3154,7 @@ public class Parser {
Expression init = null;
if (this.eat(TokenType.eq)) {
init = this.parseMaybeAssign(isFor, null, null);
} else if (kind.equals("const")
} else if ((kind.equals("const") || kind.equals("using"))
&& !(this.type == TokenType._in
|| (this.options.ecmaVersion() >= 6 && this.isContextual("of")))) {
this.raiseRecoverable(

View File

@@ -28,8 +28,8 @@ public class VariableDeclaration extends Statement {
}
/**
* The kind of this variable declaration statement; one of <code>"var"</code>, <code>"let"</code>
* or <code>"const"</code>.
* The kind of this variable declaration statement; one of <code>"var"</code>, <code>"let"</code>,
* <code>"const"</code>, or <code>"using"</code>.
*/
public String getKind() {
return kind;
@@ -42,6 +42,7 @@ public class VariableDeclaration extends Statement {
*/
public boolean isBlockScoped(ECMAVersion ecmaVersion) {
return "let".equals(kind)
|| "using".equals(kind)
|| ecmaVersion.compareTo(ECMAVersion.ECMA2015) >= 0 && "const".equals(kind);
}

View File

@@ -41,7 +41,7 @@ public class Main {
* A version identifier that should be updated every time the extractor changes in such a way that
* it may produce different tuples for the same file under the same {@link ExtractorConfig}.
*/
public static final String EXTRACTOR_VERSION = "2023-04-19";
public static final String EXTRACTOR_VERSION = "2023-08-10";
public static final Pattern NEWLINE = Pattern.compile("\n");

View File

@@ -58,6 +58,7 @@ public class StmtKinds {
declKinds.put("var", 18);
declKinds.put("const", 22);
declKinds.put("let", 23);
declKinds.put("using", 40);
}
public static int getStmtKind(final Statement stmt) {

View File

@@ -2683,10 +2683,13 @@ public class TypeScriptASTConverter {
}
/**
* Gets the declaration kind of the given node, which is one of {@code "var"}, {@code "let"} or
* {@code "const"}.
* Gets the declaration kind of the given node, which is one of {@code "var"}, {@code "let"},
* {@code "const"}, or {@code "using"}.
*/
private String getDeclarationKind(JsonObject declarationList) {
if (hasFlag(declarationList, "Using")) {
return "using";
}
return declarationList.get("$declarationKind").getAsString();
}
}

View File

@@ -0,0 +1,4 @@
---
category: majorAnalysis
---
* Added support for TypeScript 5.2.

View File

@@ -246,13 +246,15 @@ private module PrintJavaScript {
}
/**
* Gets "var" or "const" or "let" depending on what type of declaration `decl` is.
* Gets "var" or "const" or "let" or "using" depending on what type of declaration `decl` is.
*/
private string getDeclarationKeyword(DeclStmt decl) {
decl instanceof VarDeclStmt and result = "var"
or
decl instanceof ConstDeclStmt and result = "const"
or
decl instanceof UsingDeclStmt and result = "using"
or
decl instanceof LetStmt and result = "let"
}
}

View File

@@ -1041,6 +1041,17 @@ class VarDeclStmt extends @var_decl_stmt, DeclStmt { }
*/
class ConstDeclStmt extends @const_decl_stmt, DeclStmt { }
/**
* A `using` declaration statement.
*
* Example:
*
* ```
* using file = new TextFile("file.txt");
* ```
*/
class UsingDeclStmt extends @using_decl_stmt, DeclStmt { }
/**
* A `let` declaration statement.
*

View File

@@ -162,9 +162,10 @@ case @stmt.kind of
| 37 = @external_module_declaration
| 38 = @export_as_namespace_declaration
| 39 = @global_augmentation_declaration
| 40 = @using_decl_stmt
;
@decl_stmt = @var_decl_stmt | @const_decl_stmt | @let_stmt | @legacy_let_stmt;
@decl_stmt = @var_decl_stmt | @const_decl_stmt | @let_stmt | @legacy_let_stmt | @using_decl_stmt;
@export_declaration = @export_all_declaration | @export_default_declaration | @export_named_declaration;

View File

@@ -170,6 +170,10 @@
<v>5</v>
</e>
<e>
<k>@using_decl_stmt</k>
<v>5</v>
</e>
<e>
<k>@export_default_declaration</k>
<v>5</v>
</e>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: add support for TypeScript 5.2
compatibility: backwards

View File

@@ -13,8 +13,9 @@
import javascript
import semmle.javascript.RestrictedLocations
from ConstDeclStmt cds, VariableDeclarator decl, VarDef def, Variable v
from DeclStmt cds, VariableDeclarator decl, VarDef def, Variable v
where
(cds instanceof ConstDeclStmt or cds instanceof UsingDeclStmt) and
decl = cds.getADecl() and
def.getAVariable() = v and
decl.getBindingPattern().getAVariable() = v and

View File

@@ -39,6 +39,8 @@ predicate isSymbolicConstant(Variable v) {
exists(VarDef vd | vd = getSingleDef(v) |
vd.(VariableDeclarator).getDeclStmt() instanceof ConstDeclStmt
or
vd.(VariableDeclarator).getDeclStmt() instanceof UsingDeclStmt
or
isConstant(vd.getSource())
)
}

View File

@@ -0,0 +1,193 @@
nodes
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | semmle.label | [FunctionDeclStmt] functio ... } } |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | semmle.order | 1 |
| tst.js:1:10:1:10 | [VarDecl] g | semmle.label | [VarDecl] g |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | semmle.label | [BlockStmt] { u ... } } |
| tst.js:2:5:2:33 | [DeclStmt] using stream = ... | semmle.label | [DeclStmt] using stream = ... |
| tst.js:2:11:2:16 | [VarDecl] stream | semmle.label | [VarDecl] stream |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | semmle.label | [VariableDeclarator] stream ... ource() |
| tst.js:2:20:2:30 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:2:20:2:32 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:4:5:4:7 | [VarRef] let | semmle.label | [VarRef] let |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | semmle.label | [CallExpr] let (test = 20) |
| tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | semmle.label | [ExprStmt] let (test = 20); |
| tst.js:4:10:4:13 | [VarRef] test | semmle.label | [VarRef] test |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.label | [AssignExpr] test = 20 |
| tst.js:4:17:4:18 | [Literal] 20 | semmle.label | [Literal] 20 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | semmle.label | [ForStmt] for (us ... ; } |
| tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | semmle.label | [DeclStmt] using stream2 = ... |
| tst.js:6:16:6:22 | [VarDecl] stream2 | semmle.label | [VarDecl] stream2 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | semmle.label | [VariableDeclarator] stream2 ... ource() |
| tst.js:6:26:6:36 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:6:26:6:38 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:6:45:9:5 | [BlockStmt] { ... ; } | semmle.label | [BlockStmt] { ... ; } |
| tst.js:8:9:8:14 | [BreakStmt] break; | semmle.label | [BreakStmt] break; |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | semmle.label | [FunctionDeclStmt] async f ... nd"); } |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | semmle.order | 2 |
| tst.js:12:16:12:16 | [VarDecl] h | semmle.label | [VarDecl] h |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | semmle.label | [BlockStmt] { a ... nd"); } |
| tst.js:13:5:13:39 | [DeclStmt] using stream = ... | semmle.label | [DeclStmt] using stream = ... |
| tst.js:13:17:13:22 | [VarDecl] stream | semmle.label | [VarDecl] stream |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | semmle.label | [VariableDeclarator] stream ... ource() |
| tst.js:13:26:13:36 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:13:26:13:38 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | semmle.label | [ForStmt] for (aw ... ; } |
| tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | semmle.label | [DeclStmt] using stream2 = ... |
| tst.js:15:22:15:28 | [VarDecl] stream2 | semmle.label | [VarDecl] stream2 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | semmle.label | [VariableDeclarator] stream2 ... ource() |
| tst.js:15:32:15:42 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:15:32:15:44 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:15:51:18:5 | [BlockStmt] { ... ; } | semmle.label | [BlockStmt] { ... ; } |
| tst.js:17:9:17:14 | [BreakStmt] break; | semmle.label | [BreakStmt] break; |
| tst.js:20:5:20:11 | [VarRef] console | semmle.label | [VarRef] console |
| tst.js:20:5:20:15 | [DotExpr] console.log | semmle.label | [DotExpr] console.log |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.label | [MethodCallExpr] console.log("end") |
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | semmle.label | [ExprStmt] console.log("end"); |
| tst.js:20:13:20:15 | [Label] log | semmle.label | [Label] log |
| tst.js:20:17:20:21 | [Literal] "end" | semmle.label | [Literal] "end" |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | semmle.label | [FunctionDeclStmt] functio ... ing); } |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | semmle.order | 3 |
| tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.label | [VarDecl] usesUsing |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.label | [BlockStmt] { u ... ing); } |
| tst.js:24:5:24:9 | [VarRef] using | semmle.label | [VarRef] using |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | semmle.label | [CallExpr] using("foo") |
| tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.label | [ExprStmt] using("foo"); |
| tst.js:24:11:24:15 | [Literal] "foo" | semmle.label | [Literal] "foo" |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.label | [FunctionDeclStmt] functio ... . } |
| tst.js:25:14:25:18 | [VarDecl] using | semmle.label | [VarDecl] using |
| tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.label | [SimpleParameter] foo |
| tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.label | [BlockStmt] { ... . } |
| tst.js:28:5:28:9 | [VarRef] using | semmle.label | [VarRef] using |
| tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.label | [CallExpr] using(using) |
| tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.label | [ExprStmt] using(using); |
| tst.js:28:11:28:15 | [VarRef] using | semmle.label | [VarRef] using |
edges
| file://:0:0:0:0 | (Arguments) | tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:20:17:20:21 | [Literal] "end" | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:20:17:20:21 | [Literal] "end" | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:24:11:24:15 | [Literal] "foo" | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:24:11:24:15 | [Literal] "foo" | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:28:11:28:15 | [VarRef] using | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:28:11:28:15 | [VarRef] using | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.order | 0 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:10:1:10 | [VarDecl] g | semmle.label | 0 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:10:1:10 | [VarDecl] g | semmle.order | 0 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:14:10:1 | [BlockStmt] { u ... } } | semmle.label | 5 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:14:10:1 | [BlockStmt] { u ... } } | semmle.order | 5 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:2:5:2:33 | [DeclStmt] using stream = ... | semmle.label | 1 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:2:5:2:33 | [DeclStmt] using stream = ... | semmle.order | 1 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | semmle.label | 2 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | semmle.order | 2 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | semmle.label | 3 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | semmle.order | 3 |
| tst.js:2:5:2:33 | [DeclStmt] using stream = ... | tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | semmle.label | 1 |
| tst.js:2:5:2:33 | [DeclStmt] using stream = ... | tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | semmle.order | 1 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:11:2:16 | [VarDecl] stream | semmle.label | 1 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:11:2:16 | [VarDecl] stream | semmle.order | 1 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:20:2:32 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:20:2:32 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:2:20:2:32 | [CallExpr] getResource() | tst.js:2:20:2:30 | [VarRef] getResource | semmle.label | 0 |
| tst.js:2:20:2:32 | [CallExpr] getResource() | tst.js:2:20:2:30 | [VarRef] getResource | semmle.order | 0 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | tst.js:4:5:4:7 | [VarRef] let | semmle.label | 0 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | tst.js:4:5:4:7 | [VarRef] let | semmle.order | 0 |
| tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | tst.js:4:5:4:19 | [CallExpr] let (test = 20) | semmle.label | 1 |
| tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | tst.js:4:5:4:19 | [CallExpr] let (test = 20) | semmle.order | 1 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:10:4:13 | [VarRef] test | semmle.label | 1 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:10:4:13 | [VarRef] test | semmle.order | 1 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:17:4:18 | [Literal] 20 | semmle.label | 2 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:17:4:18 | [Literal] 20 | semmle.order | 2 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | semmle.label | 1 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | semmle.order | 1 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:45:9:5 | [BlockStmt] { ... ; } | semmle.label | 2 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:45:9:5 | [BlockStmt] { ... ; } | semmle.order | 2 |
| tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | semmle.label | 1 |
| tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | semmle.order | 1 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:16:6:22 | [VarDecl] stream2 | semmle.label | 1 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:16:6:22 | [VarDecl] stream2 | semmle.order | 1 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:26:6:38 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:26:6:38 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:6:26:6:38 | [CallExpr] getResource() | tst.js:6:26:6:36 | [VarRef] getResource | semmle.label | 0 |
| tst.js:6:26:6:38 | [CallExpr] getResource() | tst.js:6:26:6:36 | [VarRef] getResource | semmle.order | 0 |
| tst.js:6:45:9:5 | [BlockStmt] { ... ; } | tst.js:8:9:8:14 | [BreakStmt] break; | semmle.label | 1 |
| tst.js:6:45:9:5 | [BlockStmt] { ... ; } | tst.js:8:9:8:14 | [BreakStmt] break; | semmle.order | 1 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:16:12:16 | [VarDecl] h | semmle.label | 0 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:16:12:16 | [VarDecl] h | semmle.order | 0 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | semmle.label | 5 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | semmle.order | 5 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:13:5:13:39 | [DeclStmt] using stream = ... | semmle.label | 1 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:13:5:13:39 | [DeclStmt] using stream = ... | semmle.order | 1 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | semmle.label | 2 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | semmle.order | 2 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | semmle.label | 3 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | semmle.order | 3 |
| tst.js:13:5:13:39 | [DeclStmt] using stream = ... | tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | semmle.label | 1 |
| tst.js:13:5:13:39 | [DeclStmt] using stream = ... | tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | semmle.order | 1 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:17:13:22 | [VarDecl] stream | semmle.label | 1 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:17:13:22 | [VarDecl] stream | semmle.order | 1 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:26:13:38 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:26:13:38 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:13:26:13:38 | [CallExpr] getResource() | tst.js:13:26:13:36 | [VarRef] getResource | semmle.label | 0 |
| tst.js:13:26:13:38 | [CallExpr] getResource() | tst.js:13:26:13:36 | [VarRef] getResource | semmle.order | 0 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | semmle.label | 1 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | semmle.order | 1 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:51:18:5 | [BlockStmt] { ... ; } | semmle.label | 2 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:51:18:5 | [BlockStmt] { ... ; } | semmle.order | 2 |
| tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | semmle.label | 1 |
| tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | semmle.order | 1 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:22:15:28 | [VarDecl] stream2 | semmle.label | 1 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:22:15:28 | [VarDecl] stream2 | semmle.order | 1 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:32:15:44 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:32:15:44 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:15:32:15:44 | [CallExpr] getResource() | tst.js:15:32:15:42 | [VarRef] getResource | semmle.label | 0 |
| tst.js:15:32:15:44 | [CallExpr] getResource() | tst.js:15:32:15:42 | [VarRef] getResource | semmle.order | 0 |
| tst.js:15:51:18:5 | [BlockStmt] { ... ; } | tst.js:17:9:17:14 | [BreakStmt] break; | semmle.label | 1 |
| tst.js:15:51:18:5 | [BlockStmt] { ... ; } | tst.js:17:9:17:14 | [BreakStmt] break; | semmle.order | 1 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:5:20:11 | [VarRef] console | semmle.label | 1 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:5:20:11 | [VarRef] console | semmle.order | 1 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:13:20:15 | [Label] log | semmle.label | 2 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:13:20:15 | [Label] log | semmle.order | 2 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | tst.js:20:5:20:15 | [DotExpr] console.log | semmle.label | 0 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | tst.js:20:5:20:15 | [DotExpr] console.log | semmle.order | 0 |
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.label | 1 |
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.order | 1 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.label | 0 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.order | 0 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.label | 5 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.order | 5 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.label | 1 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.order | 1 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.label | 2 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.order | 2 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.label | 3 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.order | 3 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | tst.js:24:5:24:9 | [VarRef] using | semmle.label | 0 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | tst.js:24:5:24:9 | [VarRef] using | semmle.order | 0 |
| tst.js:24:5:24:17 | [ExprStmt] using("foo"); | tst.js:24:5:24:16 | [CallExpr] using("foo") | semmle.label | 1 |
| tst.js:24:5:24:17 | [ExprStmt] using("foo"); | tst.js:24:5:24:16 | [CallExpr] using("foo") | semmle.order | 1 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | file://:0:0:0:0 | (Parameters) | semmle.label | 1 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | file://:0:0:0:0 | (Parameters) | semmle.order | 1 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:14:25:18 | [VarDecl] using | semmle.label | 0 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:14:25:18 | [VarDecl] using | semmle.order | 0 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.label | 5 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.order | 5 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | tst.js:28:5:28:9 | [VarRef] using | semmle.label | 0 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | tst.js:28:5:28:9 | [VarRef] using | semmle.order | 0 |
| tst.js:28:5:28:17 | [ExprStmt] using(using); | tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.label | 1 |
| tst.js:28:5:28:17 | [ExprStmt] using(using); | tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.order | 1 |
graphProperties
| semmle.graphKind | tree |

View File

@@ -0,0 +1,2 @@
import javascript
import semmle.javascript.PrintAst

View File

@@ -0,0 +1,29 @@
function g() {
using stream = getResource();
let (test = 20); // <- I didn't know this was a thing
for (using stream2 = getResource(); ; ) {
// ...
break;
}
}
async function h() {
await using stream = getResource();
for (await using stream2 = getResource(); ; ) {
// ...
break;
}
console.log("end");
}
function usesUsing() {
using("foo");
function using(foo) {
// ...
}
using(using);
}

View File

@@ -1,3 +1,15 @@
#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 |
| tst.tsx:12:16:12:16 | b |
| tst.tsx:13:17:13:19 | foo |
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; |
| tst.tsx:13:5:13:34 | await u ... as any; |

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,13 @@ function f(o) {
const { p: v = [] } = o;
return v;
}
function v() {
using foo = null as any;
const bar = undefined;
}
async function b() {
await using foo = null as any;
}

View File

@@ -109,6 +109,8 @@ nodes
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
@@ -151,6 +153,8 @@ nodes
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| file://:0:0:0:0 | (TypeParameters) | semmle.label | (TypeParameters) |
| file://:0:0:0:0 | (TypeParameters) | semmle.label | (TypeParameters) |
| file://:0:0:0:0 | (TypeParameters) | semmle.label | (TypeParameters) |
| file://:0:0:0:0 | (TypeParameters) | semmle.label | (TypeParameters) |
@@ -1692,8 +1696,56 @@ nodes
| tst.ts:467:15:467:17 | [VarRef] foo | semmle.label | [VarRef] foo |
| tst.ts:467:15:467:20 | [IndexExpr] foo[1] | semmle.label | [IndexExpr] foo[1] |
| tst.ts:467:19:467:19 | [Literal] 1 | semmle.label | [Literal] 1 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | semmle.label | [NamespaceDeclaration] module ... ng>); } |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | semmle.order | 87 |
| tst.ts:472:8:472:11 | [VarDecl] TS52 | semmle.label | [VarDecl] TS52 |
| tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | semmle.label | [ClassDefinition,TypeDefinition] class S ... ; } |
| tst.ts:473:11:473:19 | [VarDecl] SomeClass | semmle.label | [VarDecl] SomeClass |
| tst.ts:473:21:473:20 | [BlockStmt] {} | semmle.label | [BlockStmt] {} |
| tst.ts:473:21:473:20 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | semmle.label | [ClassInitializedMember,ConstructorDefinition] constructor() {} |
| tst.ts:473:21:473:20 | [FunctionExpr] () {} | semmle.label | [FunctionExpr] () {} |
| tst.ts:473:21:473:20 | [Label] constructor | semmle.label | [Label] constructor |
| tst.ts:474:9:474:36 | [Decorator] @((_tar ... => {}) | semmle.label | [Decorator] @((_tar ... => {}) |
| tst.ts:474:10:474:36 | [ParExpr] ((_targ ... => {}) | semmle.label | [ParExpr] ((_targ ... => {}) |
| tst.ts:474:11:474:35 | [ArrowFunctionExpr] (_targe ... ) => {} | semmle.label | [ArrowFunctionExpr] (_targe ... ) => {} |
| tst.ts:474:12:474:18 | [SimpleParameter] _target | semmle.label | [SimpleParameter] _target |
| tst.ts:474:21:474:28 | [SimpleParameter] _context | semmle.label | [SimpleParameter] _context |
| tst.ts:474:34:474:35 | [BlockStmt] {} | semmle.label | [BlockStmt] {} |
| tst.ts:475:9:475:11 | [Label] foo | semmle.label | [Label] foo |
| tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | semmle.label | [FieldDeclaration] foo = 123; |
| tst.ts:475:15:475:17 | [Literal] 123 | semmle.label | [Literal] 123 |
| tst.ts:478:5:478:11 | [VarRef] console | semmle.label | [VarRef] console |
| tst.ts:478:5:478:15 | [DotExpr] console.log | semmle.label | [DotExpr] console.log |
| tst.ts:478:5:478:43 | [MethodCallExpr] console ... adata]) | semmle.label | [MethodCallExpr] console ... adata]) |
| tst.ts:478:5:478:44 | [ExprStmt] console ... data]); | semmle.label | [ExprStmt] console ... data]); |
| tst.ts:478:13:478:15 | [Label] log | semmle.label | [Label] log |
| tst.ts:478:17:478:25 | [VarRef] SomeClass | semmle.label | [VarRef] SomeClass |
| tst.ts:478:17:478:42 | [IndexExpr] SomeCla ... tadata] | semmle.label | [IndexExpr] SomeCla ... tadata] |
| tst.ts:478:27:478:32 | [VarRef] Symbol | semmle.label | [VarRef] Symbol |
| tst.ts:478:27:478:41 | [DotExpr] Symbol.metadata | semmle.label | [DotExpr] Symbol.metadata |
| tst.ts:478:34:478:41 | [Label] metadata | semmle.label | [Label] metadata |
| tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; |
| tst.ts:481:10:481:14 | [Identifier] Pair3 | semmle.label | [Identifier] Pair3 |
| tst.ts:481:16:481:16 | [Identifier] T | semmle.label | [Identifier] T |
| tst.ts:481:16:481:16 | [TypeParameter] T | semmle.label | [TypeParameter] T |
| tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | semmle.label | [TupleTypeExpr] [first: T, T] |
| tst.ts:481:22:481:26 | [Identifier] first | semmle.label | [Identifier] first |
| tst.ts:481:29:481:29 | [LocalTypeAccess] T | semmle.label | [LocalTypeAccess] T |
| tst.ts:481:32:481:32 | [LocalTypeAccess] T | semmle.label | [LocalTypeAccess] T |
| tst.ts:483:5:483:11 | [VarRef] console | semmle.label | [VarRef] console |
| tst.ts:483:5:483:15 | [DotExpr] console.log | semmle.label | [DotExpr] console.log |
| tst.ts:483:5:483:59 | [MethodCallExpr] console ... tring>) | semmle.label | [MethodCallExpr] console ... tring>) |
| tst.ts:483:5:483:60 | [ExprStmt] console ... ring>); | semmle.label | [ExprStmt] console ... ring>); |
| tst.ts:483:13:483:15 | [Label] log | semmle.label | [Label] log |
| tst.ts:483:17:483:34 | [ArrayExpr] ["hello", "world"] | semmle.label | [ArrayExpr] ["hello", "world"] |
| tst.ts:483:17:483:58 | [SatisfiesExpr] ["hello ... string> | semmle.label | [SatisfiesExpr] ["hello ... string> |
| tst.ts:483:18:483:24 | [Literal] "hello" | semmle.label | [Literal] "hello" |
| tst.ts:483:27:483:33 | [Literal] "world" | semmle.label | [Literal] "world" |
| tst.ts:483:46:483:50 | [LocalTypeAccess] Pair3 | semmle.label | [LocalTypeAccess] Pair3 |
| tst.ts:483:46:483:58 | [GenericTypeExpr] Pair3<string> | semmle.label | [GenericTypeExpr] Pair3<string> |
| tst.ts:483:52:483:57 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tstModuleCJS.cts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | semmle.label | [ExportDeclaration] export ... 'b'; } |
| tstModuleCJS.cts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | semmle.order | 87 |
| tstModuleCJS.cts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | semmle.order | 88 |
| tstModuleCJS.cts:1:8:3:1 | [FunctionDeclStmt] functio ... 'b'; } | semmle.label | [FunctionDeclStmt] functio ... 'b'; } |
| tstModuleCJS.cts:1:17:1:28 | [VarDecl] tstModuleCJS | semmle.label | [VarDecl] tstModuleCJS |
| tstModuleCJS.cts:1:33:1:35 | [LiteralTypeExpr] 'a' | semmle.label | [LiteralTypeExpr] 'a' |
@@ -1711,7 +1763,7 @@ nodes
| tstModuleCJS.cts:2:34:2:36 | [Literal] 'a' | semmle.label | [Literal] 'a' |
| tstModuleCJS.cts:2:40:2:42 | [Literal] 'b' | semmle.label | [Literal] 'b' |
| tstModuleES.mts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | semmle.label | [ExportDeclaration] export ... 'b'; } |
| tstModuleES.mts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | semmle.order | 88 |
| tstModuleES.mts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | semmle.order | 89 |
| tstModuleES.mts:1:16:3:1 | [FunctionDeclStmt] functio ... 'b'; } | semmle.label | [FunctionDeclStmt] functio ... 'b'; } |
| tstModuleES.mts:1:25:1:35 | [VarDecl] tstModuleES | semmle.label | [VarDecl] tstModuleES |
| tstModuleES.mts:1:40:1:42 | [LiteralTypeExpr] 'a' | semmle.label | [LiteralTypeExpr] 'a' |
@@ -1729,7 +1781,7 @@ nodes
| tstModuleES.mts:2:34:2:36 | [Literal] 'a' | semmle.label | [Literal] 'a' |
| tstModuleES.mts:2:40:2:42 | [Literal] 'b' | semmle.label | [Literal] 'b' |
| tstSuffixA.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.label | [ExportDeclaration] export ... .ts'; } |
| tstSuffixA.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.order | 89 |
| tstSuffixA.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.order | 90 |
| tstSuffixA.ts:1:8:3:1 | [FunctionDeclStmt] functio ... .ts'; } | semmle.label | [FunctionDeclStmt] functio ... .ts'; } |
| tstSuffixA.ts:1:17:1:28 | [VarDecl] resolvedFile | semmle.label | [VarDecl] resolvedFile |
| tstSuffixA.ts:1:33:1:47 | [LiteralTypeExpr] 'tstSuffixA.ts' | semmle.label | [LiteralTypeExpr] 'tstSuffixA.ts' |
@@ -1737,7 +1789,7 @@ nodes
| tstSuffixA.ts:2:5:2:27 | [ReturnStmt] return ... xA.ts'; | semmle.label | [ReturnStmt] return ... xA.ts'; |
| tstSuffixA.ts:2:12:2:26 | [Literal] 'tstSuffixA.ts' | semmle.label | [Literal] 'tstSuffixA.ts' |
| tstSuffixB.ios.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.label | [ExportDeclaration] export ... .ts'; } |
| tstSuffixB.ios.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.order | 90 |
| tstSuffixB.ios.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.order | 91 |
| tstSuffixB.ios.ts:1:8:3:1 | [FunctionDeclStmt] functio ... .ts'; } | semmle.label | [FunctionDeclStmt] functio ... .ts'; } |
| tstSuffixB.ios.ts:1:17:1:28 | [VarDecl] resolvedFile | semmle.label | [VarDecl] resolvedFile |
| tstSuffixB.ios.ts:1:33:1:51 | [LiteralTypeExpr] 'tstSuffixB.ios.ts' | semmle.label | [LiteralTypeExpr] 'tstSuffixB.ios.ts' |
@@ -1745,7 +1797,7 @@ nodes
| tstSuffixB.ios.ts:2:5:2:31 | [ReturnStmt] return ... os.ts'; | semmle.label | [ReturnStmt] return ... os.ts'; |
| tstSuffixB.ios.ts:2:12:2:30 | [Literal] 'tstSuffixB.ios.ts' | semmle.label | [Literal] 'tstSuffixB.ios.ts' |
| tstSuffixB.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.label | [ExportDeclaration] export ... .ts'; } |
| tstSuffixB.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.order | 91 |
| tstSuffixB.ts:1:1:3:1 | [ExportDeclaration] export ... .ts'; } | semmle.order | 92 |
| tstSuffixB.ts:1:8:3:1 | [FunctionDeclStmt] functio ... .ts'; } | semmle.label | [FunctionDeclStmt] functio ... .ts'; } |
| tstSuffixB.ts:1:17:1:28 | [VarDecl] resolvedFile | semmle.label | [VarDecl] resolvedFile |
| tstSuffixB.ts:1:33:1:47 | [LiteralTypeExpr] 'tstSuffixB.ts' | semmle.label | [LiteralTypeExpr] 'tstSuffixB.ts' |
@@ -1753,16 +1805,16 @@ nodes
| tstSuffixB.ts:2:5:2:27 | [ReturnStmt] return ... xB.ts'; | semmle.label | [ReturnStmt] return ... xB.ts'; |
| tstSuffixB.ts:2:12:2:26 | [Literal] 'tstSuffixB.ts' | semmle.label | [Literal] 'tstSuffixB.ts' |
| type_alias.ts:1:1:1:17 | [TypeAliasDeclaration,TypeDefinition] type B = boolean; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type B = boolean; |
| type_alias.ts:1:1:1:17 | [TypeAliasDeclaration,TypeDefinition] type B = boolean; | semmle.order | 92 |
| type_alias.ts:1:1:1:17 | [TypeAliasDeclaration,TypeDefinition] type B = boolean; | semmle.order | 93 |
| type_alias.ts:1:6:1:6 | [Identifier] B | semmle.label | [Identifier] B |
| type_alias.ts:1:10:1:16 | [KeywordTypeExpr] boolean | semmle.label | [KeywordTypeExpr] boolean |
| type_alias.ts:3:1:3:9 | [DeclStmt] var b = ... | semmle.label | [DeclStmt] var b = ... |
| type_alias.ts:3:1:3:9 | [DeclStmt] var b = ... | semmle.order | 93 |
| type_alias.ts:3:1:3:9 | [DeclStmt] var b = ... | semmle.order | 94 |
| type_alias.ts:3:5:3:5 | [VarDecl] b | semmle.label | [VarDecl] b |
| type_alias.ts:3:5:3:8 | [VariableDeclarator] b: B | semmle.label | [VariableDeclarator] b: B |
| type_alias.ts:3:8:3:8 | [LocalTypeAccess] B | semmle.label | [LocalTypeAccess] B |
| type_alias.ts:5:1:5:50 | [TypeAliasDeclaration,TypeDefinition] type Va ... ay<T>>; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type Va ... ay<T>>; |
| type_alias.ts:5:1:5:50 | [TypeAliasDeclaration,TypeDefinition] type Va ... ay<T>>; | semmle.order | 94 |
| type_alias.ts:5:1:5:50 | [TypeAliasDeclaration,TypeDefinition] type Va ... ay<T>>; | semmle.order | 95 |
| type_alias.ts:5:6:5:17 | [Identifier] ValueOrArray | semmle.label | [Identifier] ValueOrArray |
| type_alias.ts:5:19:5:19 | [Identifier] T | semmle.label | [Identifier] T |
| type_alias.ts:5:19:5:19 | [TypeParameter] T | semmle.label | [TypeParameter] T |
@@ -1774,14 +1826,14 @@ nodes
| type_alias.ts:5:34:5:48 | [GenericTypeExpr] ValueOrArray<T> | semmle.label | [GenericTypeExpr] ValueOrArray<T> |
| type_alias.ts:5:47:5:47 | [LocalTypeAccess] T | semmle.label | [LocalTypeAccess] T |
| type_alias.ts:7:1:7:28 | [DeclStmt] var c = ... | semmle.label | [DeclStmt] var c = ... |
| type_alias.ts:7:1:7:28 | [DeclStmt] var c = ... | semmle.order | 95 |
| type_alias.ts:7:1:7:28 | [DeclStmt] var c = ... | semmle.order | 96 |
| type_alias.ts:7:5:7:5 | [VarDecl] c | semmle.label | [VarDecl] c |
| type_alias.ts:7:5:7:27 | [VariableDeclarator] c: Valu ... number> | semmle.label | [VariableDeclarator] c: Valu ... number> |
| type_alias.ts:7:8:7:19 | [LocalTypeAccess] ValueOrArray | semmle.label | [LocalTypeAccess] ValueOrArray |
| type_alias.ts:7:8:7:27 | [GenericTypeExpr] ValueOrArray<number> | semmle.label | [GenericTypeExpr] ValueOrArray<number> |
| type_alias.ts:7:21:7:26 | [KeywordTypeExpr] number | semmle.label | [KeywordTypeExpr] number |
| type_alias.ts:9:1:15:13 | [TypeAliasDeclaration,TypeDefinition] type Js ... Json[]; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type Js ... Json[]; |
| type_alias.ts:9:1:15:13 | [TypeAliasDeclaration,TypeDefinition] type Js ... Json[]; | semmle.order | 96 |
| type_alias.ts:9:1:15:13 | [TypeAliasDeclaration,TypeDefinition] type Js ... Json[]; | semmle.order | 97 |
| type_alias.ts:9:6:9:9 | [Identifier] Json | semmle.label | [Identifier] Json |
| type_alias.ts:10:5:15:12 | [UnionTypeExpr] \| strin ... Json[] | semmle.label | [UnionTypeExpr] \| strin ... Json[] |
| type_alias.ts:10:7:10:12 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
@@ -1797,12 +1849,12 @@ nodes
| type_alias.ts:15:7:15:10 | [LocalTypeAccess] Json | semmle.label | [LocalTypeAccess] Json |
| type_alias.ts:15:7:15:12 | [ArrayTypeExpr] Json[] | semmle.label | [ArrayTypeExpr] Json[] |
| type_alias.ts:17:1:17:15 | [DeclStmt] var json = ... | semmle.label | [DeclStmt] var json = ... |
| type_alias.ts:17:1:17:15 | [DeclStmt] var json = ... | semmle.order | 97 |
| type_alias.ts:17:1:17:15 | [DeclStmt] var json = ... | semmle.order | 98 |
| type_alias.ts:17:5:17:8 | [VarDecl] json | semmle.label | [VarDecl] json |
| type_alias.ts:17:5:17:14 | [VariableDeclarator] json: Json | semmle.label | [VariableDeclarator] json: Json |
| type_alias.ts:17:11:17:14 | [LocalTypeAccess] Json | semmle.label | [LocalTypeAccess] Json |
| type_alias.ts:19:1:21:57 | [TypeAliasDeclaration,TypeDefinition] type Vi ... ode[]]; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type Vi ... ode[]]; |
| type_alias.ts:19:1:21:57 | [TypeAliasDeclaration,TypeDefinition] type Vi ... ode[]]; | semmle.order | 98 |
| type_alias.ts:19:1:21:57 | [TypeAliasDeclaration,TypeDefinition] type Vi ... ode[]]; | semmle.order | 99 |
| type_alias.ts:19:6:19:16 | [Identifier] VirtualNode | semmle.label | [Identifier] VirtualNode |
| type_alias.ts:20:5:21:56 | [UnionTypeExpr] \| strin ... Node[]] | semmle.label | [UnionTypeExpr] \| strin ... Node[]] |
| type_alias.ts:20:7:20:12 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
@@ -1818,7 +1870,7 @@ nodes
| type_alias.ts:21:43:21:53 | [LocalTypeAccess] VirtualNode | semmle.label | [LocalTypeAccess] VirtualNode |
| type_alias.ts:21:43:21:55 | [ArrayTypeExpr] VirtualNode[] | semmle.label | [ArrayTypeExpr] VirtualNode[] |
| type_alias.ts:23:1:27:6 | [DeclStmt] const myNode = ... | semmle.label | [DeclStmt] const myNode = ... |
| type_alias.ts:23:1:27:6 | [DeclStmt] const myNode = ... | semmle.order | 99 |
| type_alias.ts:23:1:27:6 | [DeclStmt] const myNode = ... | semmle.order | 100 |
| type_alias.ts:23:7:23:12 | [VarDecl] myNode | semmle.label | [VarDecl] myNode |
| type_alias.ts:23:7:27:5 | [VariableDeclarator] myNode: ... ] ] | semmle.label | [VariableDeclarator] myNode: ... ] ] |
| type_alias.ts:23:15:23:25 | [LocalTypeAccess] VirtualNode | semmle.label | [LocalTypeAccess] VirtualNode |
@@ -1843,12 +1895,12 @@ nodes
| type_alias.ts:26:23:26:36 | [Literal] "second-child" | semmle.label | [Literal] "second-child" |
| type_alias.ts:26:41:26:62 | [Literal] "I'm the second child" | semmle.label | [Literal] "I'm the second child" |
| type_definition_objects.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.label | [ImportDeclaration] import ... dummy"; |
| type_definition_objects.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.order | 100 |
| type_definition_objects.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.order | 101 |
| type_definition_objects.ts:1:8:1:17 | [ImportSpecifier] * as dummy | semmle.label | [ImportSpecifier] * as dummy |
| type_definition_objects.ts:1:13:1:17 | [VarDecl] dummy | semmle.label | [VarDecl] dummy |
| type_definition_objects.ts:1:24:1:32 | [Literal] "./dummy" | semmle.label | [Literal] "./dummy" |
| type_definition_objects.ts:3:1:3:17 | [ExportDeclaration] export class C {} | semmle.label | [ExportDeclaration] export class C {} |
| type_definition_objects.ts:3:1:3:17 | [ExportDeclaration] export class C {} | semmle.order | 101 |
| type_definition_objects.ts:3:1:3:17 | [ExportDeclaration] export class C {} | semmle.order | 102 |
| type_definition_objects.ts:3:8:3:17 | [ClassDefinition,TypeDefinition] class C {} | semmle.label | [ClassDefinition,TypeDefinition] class C {} |
| type_definition_objects.ts:3:14:3:14 | [VarDecl] C | semmle.label | [VarDecl] C |
| type_definition_objects.ts:3:16:3:15 | [BlockStmt] {} | semmle.label | [BlockStmt] {} |
@@ -1856,36 +1908,36 @@ nodes
| type_definition_objects.ts:3:16:3:15 | [FunctionExpr] () {} | semmle.label | [FunctionExpr] () {} |
| type_definition_objects.ts:3:16:3:15 | [Label] constructor | semmle.label | [Label] constructor |
| type_definition_objects.ts:4:1:4:17 | [DeclStmt] let classObj = ... | semmle.label | [DeclStmt] let classObj = ... |
| type_definition_objects.ts:4:1:4:17 | [DeclStmt] let classObj = ... | semmle.order | 102 |
| type_definition_objects.ts:4:1:4:17 | [DeclStmt] let classObj = ... | semmle.order | 103 |
| type_definition_objects.ts:4:5:4:12 | [VarDecl] classObj | semmle.label | [VarDecl] classObj |
| type_definition_objects.ts:4:5:4:16 | [VariableDeclarator] classObj = C | semmle.label | [VariableDeclarator] classObj = C |
| type_definition_objects.ts:4:16:4:16 | [VarRef] C | semmle.label | [VarRef] C |
| type_definition_objects.ts:6:1:6:16 | [ExportDeclaration] export enum E {} | semmle.label | [ExportDeclaration] export enum E {} |
| type_definition_objects.ts:6:1:6:16 | [ExportDeclaration] export enum E {} | semmle.order | 103 |
| type_definition_objects.ts:6:1:6:16 | [ExportDeclaration] export enum E {} | semmle.order | 104 |
| type_definition_objects.ts:6:8:6:16 | [EnumDeclaration,TypeDefinition] enum E {} | semmle.label | [EnumDeclaration,TypeDefinition] enum E {} |
| type_definition_objects.ts:6:13:6:13 | [VarDecl] E | semmle.label | [VarDecl] E |
| type_definition_objects.ts:7:1:7:16 | [DeclStmt] let enumObj = ... | semmle.label | [DeclStmt] let enumObj = ... |
| type_definition_objects.ts:7:1:7:16 | [DeclStmt] let enumObj = ... | semmle.order | 104 |
| type_definition_objects.ts:7:1:7:16 | [DeclStmt] let enumObj = ... | semmle.order | 105 |
| type_definition_objects.ts:7:5:7:11 | [VarDecl] enumObj | semmle.label | [VarDecl] enumObj |
| type_definition_objects.ts:7:5:7:15 | [VariableDeclarator] enumObj = E | semmle.label | [VariableDeclarator] enumObj = E |
| type_definition_objects.ts:7:15:7:15 | [VarRef] E | semmle.label | [VarRef] E |
| type_definition_objects.ts:9:1:9:22 | [ExportDeclaration] export ... e N {;} | semmle.label | [ExportDeclaration] export ... e N {;} |
| type_definition_objects.ts:9:1:9:22 | [ExportDeclaration] export ... e N {;} | semmle.order | 105 |
| type_definition_objects.ts:9:1:9:22 | [ExportDeclaration] export ... e N {;} | semmle.order | 106 |
| type_definition_objects.ts:9:8:9:22 | [NamespaceDeclaration] namespace N {;} | semmle.label | [NamespaceDeclaration] namespace N {;} |
| type_definition_objects.ts:9:18:9:18 | [VarDecl] N | semmle.label | [VarDecl] N |
| type_definition_objects.ts:9:21:9:21 | [EmptyStmt] ; | semmle.label | [EmptyStmt] ; |
| type_definition_objects.ts:10:1:10:21 | [DeclStmt] let namespaceObj = ... | semmle.label | [DeclStmt] let namespaceObj = ... |
| type_definition_objects.ts:10:1:10:21 | [DeclStmt] let namespaceObj = ... | semmle.order | 106 |
| type_definition_objects.ts:10:1:10:21 | [DeclStmt] let namespaceObj = ... | semmle.order | 107 |
| type_definition_objects.ts:10:5:10:16 | [VarDecl] namespaceObj | semmle.label | [VarDecl] namespaceObj |
| type_definition_objects.ts:10:5:10:20 | [VariableDeclarator] namespaceObj = N | semmle.label | [VariableDeclarator] namespaceObj = N |
| type_definition_objects.ts:10:20:10:20 | [VarRef] N | semmle.label | [VarRef] N |
| type_definitions.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.label | [ImportDeclaration] import ... dummy"; |
| type_definitions.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.order | 107 |
| type_definitions.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.order | 108 |
| type_definitions.ts:1:8:1:17 | [ImportSpecifier] * as dummy | semmle.label | [ImportSpecifier] * as dummy |
| type_definitions.ts:1:13:1:17 | [VarDecl] dummy | semmle.label | [VarDecl] dummy |
| type_definitions.ts:1:24:1:32 | [Literal] "./dummy" | semmle.label | [Literal] "./dummy" |
| type_definitions.ts:3:1:5:1 | [InterfaceDeclaration,TypeDefinition] interfa ... x: S; } | semmle.label | [InterfaceDeclaration,TypeDefinition] interfa ... x: S; } |
| type_definitions.ts:3:1:5:1 | [InterfaceDeclaration,TypeDefinition] interfa ... x: S; } | semmle.order | 108 |
| type_definitions.ts:3:1:5:1 | [InterfaceDeclaration,TypeDefinition] interfa ... x: S; } | semmle.order | 109 |
| type_definitions.ts:3:11:3:11 | [Identifier] I | semmle.label | [Identifier] I |
| type_definitions.ts:3:13:3:13 | [Identifier] S | semmle.label | [Identifier] S |
| type_definitions.ts:3:13:3:13 | [TypeParameter] S | semmle.label | [TypeParameter] S |
@@ -1893,14 +1945,14 @@ nodes
| type_definitions.ts:4:3:4:7 | [FieldDeclaration] x: S; | semmle.label | [FieldDeclaration] x: S; |
| type_definitions.ts:4:6:4:6 | [LocalTypeAccess] S | semmle.label | [LocalTypeAccess] S |
| type_definitions.ts:6:1:6:16 | [DeclStmt] let i = ... | semmle.label | [DeclStmt] let i = ... |
| type_definitions.ts:6:1:6:16 | [DeclStmt] let i = ... | semmle.order | 109 |
| type_definitions.ts:6:1:6:16 | [DeclStmt] let i = ... | semmle.order | 110 |
| type_definitions.ts:6:5:6:5 | [VarDecl] i | semmle.label | [VarDecl] i |
| type_definitions.ts:6:5:6:16 | [VariableDeclarator] i: I<number> | semmle.label | [VariableDeclarator] i: I<number> |
| type_definitions.ts:6:8:6:8 | [LocalTypeAccess] I | semmle.label | [LocalTypeAccess] I |
| type_definitions.ts:6:8:6:16 | [GenericTypeExpr] I<number> | semmle.label | [GenericTypeExpr] I<number> |
| type_definitions.ts:6:10:6:15 | [KeywordTypeExpr] number | semmle.label | [KeywordTypeExpr] number |
| type_definitions.ts:8:1:10:1 | [ClassDefinition,TypeDefinition] class C ... x: T } | semmle.label | [ClassDefinition,TypeDefinition] class C ... x: T } |
| type_definitions.ts:8:1:10:1 | [ClassDefinition,TypeDefinition] class C ... x: T } | semmle.order | 110 |
| type_definitions.ts:8:1:10:1 | [ClassDefinition,TypeDefinition] class C ... x: T } | semmle.order | 111 |
| type_definitions.ts:8:7:8:7 | [VarDecl] C | semmle.label | [VarDecl] C |
| type_definitions.ts:8:8:8:7 | [BlockStmt] {} | semmle.label | [BlockStmt] {} |
| type_definitions.ts:8:8:8:7 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | semmle.label | [ClassInitializedMember,ConstructorDefinition] constructor() {} |
@@ -1912,14 +1964,14 @@ nodes
| type_definitions.ts:9:3:9:6 | [FieldDeclaration] x: T | semmle.label | [FieldDeclaration] x: T |
| type_definitions.ts:9:6:9:6 | [LocalTypeAccess] T | semmle.label | [LocalTypeAccess] T |
| type_definitions.ts:11:1:11:17 | [DeclStmt] let c = ... | semmle.label | [DeclStmt] let c = ... |
| type_definitions.ts:11:1:11:17 | [DeclStmt] let c = ... | semmle.order | 111 |
| type_definitions.ts:11:1:11:17 | [DeclStmt] let c = ... | semmle.order | 112 |
| type_definitions.ts:11:5:11:5 | [VarDecl] c | semmle.label | [VarDecl] c |
| type_definitions.ts:11:5:11:16 | [VariableDeclarator] c: C<number> | semmle.label | [VariableDeclarator] c: C<number> |
| type_definitions.ts:11:8:11:8 | [LocalTypeAccess] C | semmle.label | [LocalTypeAccess] C |
| type_definitions.ts:11:8:11:16 | [GenericTypeExpr] C<number> | semmle.label | [GenericTypeExpr] C<number> |
| type_definitions.ts:11:10:11:15 | [KeywordTypeExpr] number | semmle.label | [KeywordTypeExpr] number |
| type_definitions.ts:13:1:15:1 | [EnumDeclaration,TypeDefinition] enum Co ... blue } | semmle.label | [EnumDeclaration,TypeDefinition] enum Co ... blue } |
| type_definitions.ts:13:1:15:1 | [EnumDeclaration,TypeDefinition] enum Co ... blue } | semmle.order | 112 |
| type_definitions.ts:13:1:15:1 | [EnumDeclaration,TypeDefinition] enum Co ... blue } | semmle.order | 113 |
| type_definitions.ts:13:6:13:10 | [VarDecl] Color | semmle.label | [VarDecl] Color |
| type_definitions.ts:14:3:14:5 | [EnumMember,TypeDefinition] red | semmle.label | [EnumMember,TypeDefinition] red |
| type_definitions.ts:14:3:14:5 | [VarDecl] red | semmle.label | [VarDecl] red |
@@ -1928,29 +1980,29 @@ nodes
| type_definitions.ts:14:15:14:18 | [EnumMember,TypeDefinition] blue | semmle.label | [EnumMember,TypeDefinition] blue |
| type_definitions.ts:14:15:14:18 | [VarDecl] blue | semmle.label | [VarDecl] blue |
| type_definitions.ts:16:1:16:17 | [DeclStmt] let color = ... | semmle.label | [DeclStmt] let color = ... |
| type_definitions.ts:16:1:16:17 | [DeclStmt] let color = ... | semmle.order | 113 |
| type_definitions.ts:16:1:16:17 | [DeclStmt] let color = ... | semmle.order | 114 |
| type_definitions.ts:16:5:16:9 | [VarDecl] color | semmle.label | [VarDecl] color |
| type_definitions.ts:16:5:16:16 | [VariableDeclarator] color: Color | semmle.label | [VariableDeclarator] color: Color |
| type_definitions.ts:16:12:16:16 | [LocalTypeAccess] Color | semmle.label | [LocalTypeAccess] Color |
| type_definitions.ts:18:1:18:33 | [EnumDeclaration,TypeDefinition] enum En ... ember } | semmle.label | [EnumDeclaration,TypeDefinition] enum En ... ember } |
| type_definitions.ts:18:1:18:33 | [EnumDeclaration,TypeDefinition] enum En ... ember } | semmle.order | 114 |
| type_definitions.ts:18:1:18:33 | [EnumDeclaration,TypeDefinition] enum En ... ember } | semmle.order | 115 |
| type_definitions.ts:18:6:18:22 | [VarDecl] EnumWithOneMember | semmle.label | [VarDecl] EnumWithOneMember |
| type_definitions.ts:18:26:18:31 | [EnumMember,TypeDefinition] member | semmle.label | [EnumMember,TypeDefinition] member |
| type_definitions.ts:18:26:18:31 | [VarDecl] member | semmle.label | [VarDecl] member |
| type_definitions.ts:19:1:19:25 | [DeclStmt] let e = ... | semmle.label | [DeclStmt] let e = ... |
| type_definitions.ts:19:1:19:25 | [DeclStmt] let e = ... | semmle.order | 115 |
| type_definitions.ts:19:1:19:25 | [DeclStmt] let e = ... | semmle.order | 116 |
| type_definitions.ts:19:5:19:5 | [VarDecl] e | semmle.label | [VarDecl] e |
| type_definitions.ts:19:5:19:24 | [VariableDeclarator] e: EnumWithOneMember | semmle.label | [VariableDeclarator] e: EnumWithOneMember |
| type_definitions.ts:19:8:19:24 | [LocalTypeAccess] EnumWithOneMember | semmle.label | [LocalTypeAccess] EnumWithOneMember |
| type_definitions.ts:21:1:21:20 | [TypeAliasDeclaration,TypeDefinition] type Alias<T> = T[]; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type Alias<T> = T[]; |
| type_definitions.ts:21:1:21:20 | [TypeAliasDeclaration,TypeDefinition] type Alias<T> = T[]; | semmle.order | 116 |
| type_definitions.ts:21:1:21:20 | [TypeAliasDeclaration,TypeDefinition] type Alias<T> = T[]; | semmle.order | 117 |
| type_definitions.ts:21:6:21:10 | [Identifier] Alias | semmle.label | [Identifier] Alias |
| type_definitions.ts:21:12:21:12 | [Identifier] T | semmle.label | [Identifier] T |
| type_definitions.ts:21:12:21:12 | [TypeParameter] T | semmle.label | [TypeParameter] T |
| type_definitions.ts:21:17:21:17 | [LocalTypeAccess] T | semmle.label | [LocalTypeAccess] T |
| type_definitions.ts:21:17:21:19 | [ArrayTypeExpr] T[] | semmle.label | [ArrayTypeExpr] T[] |
| type_definitions.ts:22:1:22:39 | [DeclStmt] let aliasForNumberArray = ... | semmle.label | [DeclStmt] let aliasForNumberArray = ... |
| type_definitions.ts:22:1:22:39 | [DeclStmt] let aliasForNumberArray = ... | semmle.order | 117 |
| type_definitions.ts:22:1:22:39 | [DeclStmt] let aliasForNumberArray = ... | semmle.order | 118 |
| type_definitions.ts:22:5:22:23 | [VarDecl] aliasForNumberArray | semmle.label | [VarDecl] aliasForNumberArray |
| type_definitions.ts:22:5:22:38 | [VariableDeclarator] aliasFo ... number> | semmle.label | [VariableDeclarator] aliasFo ... number> |
| type_definitions.ts:22:26:22:30 | [LocalTypeAccess] Alias | semmle.label | [LocalTypeAccess] Alias |
@@ -2129,6 +2181,10 @@ edges
| file://:0:0:0:0 | (Arguments) | tst.ts:460:26:460:31 | [Literal] "John" | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.ts:465:35:465:49 | [ArrayExpr] ["a", "b" ,"c"] | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.ts:465:35:465:49 | [ArrayExpr] ["a", "b" ,"c"] | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.ts:478:17:478:42 | [IndexExpr] SomeCla ... tadata] | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.ts:478:17:478:42 | [IndexExpr] SomeCla ... tadata] | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.ts:483:17:483:58 | [SatisfiesExpr] ["hello ... string> | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.ts:483:17:483:58 | [SatisfiesExpr] ["hello ... string> | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:14:17:14:17 | [SimpleParameter] x | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:14:17:14:17 | [SimpleParameter] x | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:14:28:14:28 | [SimpleParameter] y | semmle.label | 1 |
@@ -2223,6 +2279,10 @@ edges
| file://:0:0:0:0 | (Parameters) | tst.ts:449:21:449:24 | [SimpleParameter] name | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:462:75:462:78 | [SimpleParameter] args | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:462:75:462:78 | [SimpleParameter] args | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:474:12:474:18 | [SimpleParameter] _target | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:474:12:474:18 | [SimpleParameter] _target | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:474:21:474:28 | [SimpleParameter] _context | semmle.label | 1 |
| file://:0:0:0:0 | (Parameters) | tst.ts:474:21:474:28 | [SimpleParameter] _context | semmle.order | 1 |
| file://:0:0:0:0 | (Parameters) | type_alias.ts:14:10:14:17 | [SimpleParameter] property | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | type_alias.ts:14:10:14:17 | [SimpleParameter] property | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | type_alias.ts:21:19:21:21 | [SimpleParameter] key | semmle.label | 0 |
@@ -2253,6 +2313,8 @@ edges
| file://:0:0:0:0 | (TypeParameters) | tst.ts:431:53:431:58 | [TypeParameter] Return | semmle.order | 2 |
| file://:0:0:0:0 | (TypeParameters) | tst.ts:462:40:462:72 | [TypeParameter] const T ... tring[] | semmle.label | 0 |
| file://:0:0:0:0 | (TypeParameters) | tst.ts:462:40:462:72 | [TypeParameter] const T ... tring[] | semmle.order | 0 |
| file://:0:0:0:0 | (TypeParameters) | tst.ts:481:16:481:16 | [TypeParameter] T | semmle.label | 0 |
| file://:0:0:0:0 | (TypeParameters) | tst.ts:481:16:481:16 | [TypeParameter] T | semmle.order | 0 |
| file://:0:0:0:0 | (TypeParameters) | type_alias.ts:5:19:5:19 | [TypeParameter] T | semmle.label | 0 |
| file://:0:0:0:0 | (TypeParameters) | type_alias.ts:5:19:5:19 | [TypeParameter] T | semmle.order | 0 |
| file://:0:0:0:0 | (TypeParameters) | type_definitions.ts:3:13:3:13 | [TypeParameter] S | semmle.label | 0 |
@@ -4999,6 +5061,96 @@ edges
| tst.ts:467:15:467:20 | [IndexExpr] foo[1] | tst.ts:467:15:467:17 | [VarRef] foo | semmle.order | 1 |
| tst.ts:467:15:467:20 | [IndexExpr] foo[1] | tst.ts:467:19:467:19 | [Literal] 1 | semmle.label | 2 |
| tst.ts:467:15:467:20 | [IndexExpr] foo[1] | tst.ts:467:19:467:19 | [Literal] 1 | semmle.order | 2 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:472:8:472:11 | [VarDecl] TS52 | semmle.label | 1 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:472:8:472:11 | [VarDecl] TS52 | semmle.order | 1 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | semmle.label | 2 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | semmle.order | 2 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:478:5:478:44 | [ExprStmt] console ... data]); | semmle.label | 3 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:478:5:478:44 | [ExprStmt] console ... data]); | semmle.order | 3 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | semmle.label | 4 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | semmle.order | 4 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:483:5:483:60 | [ExprStmt] console ... ring>); | semmle.label | 5 |
| tst.ts:472:1:484:1 | [NamespaceDeclaration] module ... ng>); } | tst.ts:483:5:483:60 | [ExprStmt] console ... ring>); | semmle.order | 5 |
| tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | tst.ts:473:11:473:19 | [VarDecl] SomeClass | semmle.label | 1 |
| tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | tst.ts:473:11:473:19 | [VarDecl] SomeClass | semmle.order | 1 |
| tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | tst.ts:473:21:473:20 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | semmle.label | 2 |
| tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | tst.ts:473:21:473:20 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | semmle.order | 2 |
| tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | semmle.label | 3 |
| tst.ts:473:5:476:5 | [ClassDefinition,TypeDefinition] class S ... ; } | tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | semmle.order | 3 |
| tst.ts:473:21:473:20 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | tst.ts:473:21:473:20 | [FunctionExpr] () {} | semmle.label | 2 |
| tst.ts:473:21:473:20 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | tst.ts:473:21:473:20 | [FunctionExpr] () {} | semmle.order | 2 |
| tst.ts:473:21:473:20 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | tst.ts:473:21:473:20 | [Label] constructor | semmle.label | 1 |
| tst.ts:473:21:473:20 | [ClassInitializedMember,ConstructorDefinition] constructor() {} | tst.ts:473:21:473:20 | [Label] constructor | semmle.order | 1 |
| tst.ts:473:21:473:20 | [FunctionExpr] () {} | tst.ts:473:21:473:20 | [BlockStmt] {} | semmle.label | 5 |
| tst.ts:473:21:473:20 | [FunctionExpr] () {} | tst.ts:473:21:473:20 | [BlockStmt] {} | semmle.order | 5 |
| tst.ts:474:9:474:36 | [Decorator] @((_tar ... => {}) | tst.ts:474:10:474:36 | [ParExpr] ((_targ ... => {}) | semmle.label | 1 |
| tst.ts:474:9:474:36 | [Decorator] @((_tar ... => {}) | tst.ts:474:10:474:36 | [ParExpr] ((_targ ... => {}) | semmle.order | 1 |
| tst.ts:474:10:474:36 | [ParExpr] ((_targ ... => {}) | tst.ts:474:11:474:35 | [ArrowFunctionExpr] (_targe ... ) => {} | semmle.label | 1 |
| tst.ts:474:10:474:36 | [ParExpr] ((_targ ... => {}) | tst.ts:474:11:474:35 | [ArrowFunctionExpr] (_targe ... ) => {} | semmle.order | 1 |
| tst.ts:474:11:474:35 | [ArrowFunctionExpr] (_targe ... ) => {} | file://:0:0:0:0 | (Parameters) | semmle.label | 1 |
| tst.ts:474:11:474:35 | [ArrowFunctionExpr] (_targe ... ) => {} | file://:0:0:0:0 | (Parameters) | semmle.order | 1 |
| tst.ts:474:11:474:35 | [ArrowFunctionExpr] (_targe ... ) => {} | tst.ts:474:34:474:35 | [BlockStmt] {} | semmle.label | 5 |
| tst.ts:474:11:474:35 | [ArrowFunctionExpr] (_targe ... ) => {} | tst.ts:474:34:474:35 | [BlockStmt] {} | semmle.order | 5 |
| tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | tst.ts:474:9:474:36 | [Decorator] @((_tar ... => {}) | semmle.label | 1 |
| tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | tst.ts:474:9:474:36 | [Decorator] @((_tar ... => {}) | semmle.order | 1 |
| tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | tst.ts:475:9:475:11 | [Label] foo | semmle.label | 2 |
| tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | tst.ts:475:9:475:11 | [Label] foo | semmle.order | 2 |
| tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | tst.ts:475:15:475:17 | [Literal] 123 | semmle.label | 3 |
| tst.ts:475:9:475:18 | [FieldDeclaration] foo = 123; | tst.ts:475:15:475:17 | [Literal] 123 | semmle.order | 3 |
| tst.ts:478:5:478:15 | [DotExpr] console.log | tst.ts:478:5:478:11 | [VarRef] console | semmle.label | 1 |
| tst.ts:478:5:478:15 | [DotExpr] console.log | tst.ts:478:5:478:11 | [VarRef] console | semmle.order | 1 |
| tst.ts:478:5:478:15 | [DotExpr] console.log | tst.ts:478:13:478:15 | [Label] log | semmle.label | 2 |
| tst.ts:478:5:478:15 | [DotExpr] console.log | tst.ts:478:13:478:15 | [Label] log | semmle.order | 2 |
| tst.ts:478:5:478:43 | [MethodCallExpr] console ... adata]) | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.ts:478:5:478:43 | [MethodCallExpr] console ... adata]) | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.ts:478:5:478:43 | [MethodCallExpr] console ... adata]) | tst.ts:478:5:478:15 | [DotExpr] console.log | semmle.label | 0 |
| tst.ts:478:5:478:43 | [MethodCallExpr] console ... adata]) | tst.ts:478:5:478:15 | [DotExpr] console.log | semmle.order | 0 |
| tst.ts:478:5:478:44 | [ExprStmt] console ... data]); | tst.ts:478:5:478:43 | [MethodCallExpr] console ... adata]) | semmle.label | 1 |
| tst.ts:478:5:478:44 | [ExprStmt] console ... data]); | tst.ts:478:5:478:43 | [MethodCallExpr] console ... adata]) | semmle.order | 1 |
| tst.ts:478:17:478:42 | [IndexExpr] SomeCla ... tadata] | tst.ts:478:17:478:25 | [VarRef] SomeClass | semmle.label | 1 |
| tst.ts:478:17:478:42 | [IndexExpr] SomeCla ... tadata] | tst.ts:478:17:478:25 | [VarRef] SomeClass | semmle.order | 1 |
| tst.ts:478:17:478:42 | [IndexExpr] SomeCla ... tadata] | tst.ts:478:27:478:41 | [DotExpr] Symbol.metadata | semmle.label | 2 |
| tst.ts:478:17:478:42 | [IndexExpr] SomeCla ... tadata] | tst.ts:478:27:478:41 | [DotExpr] Symbol.metadata | semmle.order | 2 |
| tst.ts:478:27:478:41 | [DotExpr] Symbol.metadata | tst.ts:478:27:478:32 | [VarRef] Symbol | semmle.label | 1 |
| tst.ts:478:27:478:41 | [DotExpr] Symbol.metadata | tst.ts:478:27:478:32 | [VarRef] Symbol | semmle.order | 1 |
| tst.ts:478:27:478:41 | [DotExpr] Symbol.metadata | tst.ts:478:34:478:41 | [Label] metadata | semmle.label | 2 |
| tst.ts:478:27:478:41 | [DotExpr] Symbol.metadata | tst.ts:478:34:478:41 | [Label] metadata | semmle.order | 2 |
| tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | file://:0:0:0:0 | (TypeParameters) | semmle.label | -100 |
| tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | file://:0:0:0:0 | (TypeParameters) | semmle.order | -100 |
| tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | tst.ts:481:10:481:14 | [Identifier] Pair3 | semmle.label | 1 |
| tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | tst.ts:481:10:481:14 | [Identifier] Pair3 | semmle.order | 1 |
| tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | semmle.label | 3 |
| tst.ts:481:5:481:34 | [TypeAliasDeclaration,TypeDefinition] type Pa ... T, T]; | tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | semmle.order | 3 |
| tst.ts:481:16:481:16 | [TypeParameter] T | tst.ts:481:16:481:16 | [Identifier] T | semmle.label | 1 |
| tst.ts:481:16:481:16 | [TypeParameter] T | tst.ts:481:16:481:16 | [Identifier] T | semmle.order | 1 |
| tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | tst.ts:481:22:481:26 | [Identifier] first | semmle.label | 1 |
| tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | tst.ts:481:22:481:26 | [Identifier] first | semmle.order | 1 |
| tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | tst.ts:481:29:481:29 | [LocalTypeAccess] T | semmle.label | 2 |
| tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | tst.ts:481:29:481:29 | [LocalTypeAccess] T | semmle.order | 2 |
| tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | tst.ts:481:32:481:32 | [LocalTypeAccess] T | semmle.label | 3 |
| tst.ts:481:21:481:33 | [TupleTypeExpr] [first: T, T] | tst.ts:481:32:481:32 | [LocalTypeAccess] T | semmle.order | 3 |
| tst.ts:483:5:483:15 | [DotExpr] console.log | tst.ts:483:5:483:11 | [VarRef] console | semmle.label | 1 |
| tst.ts:483:5:483:15 | [DotExpr] console.log | tst.ts:483:5:483:11 | [VarRef] console | semmle.order | 1 |
| tst.ts:483:5:483:15 | [DotExpr] console.log | tst.ts:483:13:483:15 | [Label] log | semmle.label | 2 |
| tst.ts:483:5:483:15 | [DotExpr] console.log | tst.ts:483:13:483:15 | [Label] log | semmle.order | 2 |
| tst.ts:483:5:483:59 | [MethodCallExpr] console ... tring>) | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.ts:483:5:483:59 | [MethodCallExpr] console ... tring>) | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.ts:483:5:483:59 | [MethodCallExpr] console ... tring>) | tst.ts:483:5:483:15 | [DotExpr] console.log | semmle.label | 0 |
| tst.ts:483:5:483:59 | [MethodCallExpr] console ... tring>) | tst.ts:483:5:483:15 | [DotExpr] console.log | semmle.order | 0 |
| tst.ts:483:5:483:60 | [ExprStmt] console ... ring>); | tst.ts:483:5:483:59 | [MethodCallExpr] console ... tring>) | semmle.label | 1 |
| tst.ts:483:5:483:60 | [ExprStmt] console ... ring>); | tst.ts:483:5:483:59 | [MethodCallExpr] console ... tring>) | semmle.order | 1 |
| tst.ts:483:17:483:34 | [ArrayExpr] ["hello", "world"] | tst.ts:483:18:483:24 | [Literal] "hello" | semmle.label | 1 |
| tst.ts:483:17:483:34 | [ArrayExpr] ["hello", "world"] | tst.ts:483:18:483:24 | [Literal] "hello" | semmle.order | 1 |
| tst.ts:483:17:483:34 | [ArrayExpr] ["hello", "world"] | tst.ts:483:27:483:33 | [Literal] "world" | semmle.label | 2 |
| tst.ts:483:17:483:34 | [ArrayExpr] ["hello", "world"] | tst.ts:483:27:483:33 | [Literal] "world" | semmle.order | 2 |
| tst.ts:483:17:483:58 | [SatisfiesExpr] ["hello ... string> | tst.ts:483:17:483:34 | [ArrayExpr] ["hello", "world"] | semmle.label | 1 |
| tst.ts:483:17:483:58 | [SatisfiesExpr] ["hello ... string> | tst.ts:483:17:483:34 | [ArrayExpr] ["hello", "world"] | semmle.order | 1 |
| tst.ts:483:17:483:58 | [SatisfiesExpr] ["hello ... string> | tst.ts:483:46:483:58 | [GenericTypeExpr] Pair3<string> | semmle.label | 2 |
| tst.ts:483:17:483:58 | [SatisfiesExpr] ["hello ... string> | tst.ts:483:46:483:58 | [GenericTypeExpr] Pair3<string> | semmle.order | 2 |
| tst.ts:483:46:483:58 | [GenericTypeExpr] Pair3<string> | tst.ts:483:46:483:50 | [LocalTypeAccess] Pair3 | semmle.label | 1 |
| tst.ts:483:46:483:58 | [GenericTypeExpr] Pair3<string> | tst.ts:483:46:483:50 | [LocalTypeAccess] Pair3 | semmle.order | 1 |
| tst.ts:483:46:483:58 | [GenericTypeExpr] Pair3<string> | tst.ts:483:52:483:57 | [KeywordTypeExpr] string | semmle.label | 2 |
| tst.ts:483:46:483:58 | [GenericTypeExpr] Pair3<string> | tst.ts:483:52:483:57 | [KeywordTypeExpr] string | semmle.order | 2 |
| tstModuleCJS.cts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | tstModuleCJS.cts:1:8:3:1 | [FunctionDeclStmt] functio ... 'b'; } | semmle.label | 1 |
| tstModuleCJS.cts:1:1:3:1 | [ExportDeclaration] export ... 'b'; } | tstModuleCJS.cts:1:8:3:1 | [FunctionDeclStmt] functio ... 'b'; } | semmle.order | 1 |
| tstModuleCJS.cts:1:8:3:1 | [FunctionDeclStmt] functio ... 'b'; } | tstModuleCJS.cts:1:17:1:28 | [VarDecl] tstModuleCJS | semmle.label | 0 |

View File

@@ -633,6 +633,31 @@ getExprType
| tst.ts:467:15:467:17 | foo | readonly ["a", "b", "c"] |
| tst.ts:467:15:467:20 | foo[1] | "b" |
| tst.ts:467:19:467:19 | 1 | 1 |
| tst.ts:472:8:472:11 | TS52 | typeof TS52 in library-tests/TypeScript/Types/tst.ts |
| tst.ts:473:11:473:19 | SomeClass | SomeClass |
| tst.ts:474:10:474:36 | ((_targ ... => {}) | (_target: undefined, _context: ClassFieldDecora... |
| tst.ts:474:11:474:35 | (_targe ... ) => {} | (_target: undefined, _context: ClassFieldDecora... |
| tst.ts:474:12:474:18 | _target | undefined |
| tst.ts:474:21:474:28 | _context | ClassFieldDecoratorContext<SomeClass, number> &... |
| tst.ts:475:9:475:11 | foo | number |
| tst.ts:475:15:475:17 | 123 | 123 |
| tst.ts:478:5:478:11 | console | Console |
| tst.ts:478:5:478:15 | console.log | (...data: any[]) => void |
| tst.ts:478:5:478:43 | console ... adata]) | void |
| tst.ts:478:13:478:15 | log | (...data: any[]) => void |
| tst.ts:478:17:478:25 | SomeClass | typeof SomeClass in tst.ts:472 |
| tst.ts:478:17:478:42 | SomeCla ... tadata] | DecoratorMetadataObject |
| tst.ts:478:27:478:32 | Symbol | SymbolConstructor |
| tst.ts:478:27:478:41 | Symbol.metadata | typeof metadata |
| tst.ts:478:34:478:41 | metadata | typeof metadata |
| tst.ts:483:5:483:11 | console | Console |
| tst.ts:483:5:483:15 | console.log | (...data: any[]) => void |
| tst.ts:483:5:483:59 | console ... tring>) | void |
| tst.ts:483:13:483:15 | log | (...data: any[]) => void |
| tst.ts:483:17:483:34 | ["hello", "world"] | Pair3<string> |
| tst.ts:483:17:483:58 | ["hello ... string> | [first: string, string] |
| tst.ts:483:18:483:24 | "hello" | "hello" |
| tst.ts:483:27:483:33 | "world" | "world" |
| tstModuleCJS.cts:1:17:1:28 | tstModuleCJS | () => "a" \| "b" |
| tstModuleCJS.cts:2:12:2:15 | Math | Math |
| tstModuleCJS.cts:2:12:2:22 | Math.random | () => number |
@@ -744,6 +769,8 @@ getTypeDefinitionType
| tst.ts:408:3:410:3 | interfa ... er;\\n } | HSVObj |
| tst.ts:419:3:425:3 | class P ... }\\n } | Person |
| tst.ts:447:5:458:5 | class P ... }\\n } | Person |
| tst.ts:473:5:476:5 | class S ... ;\\n } | SomeClass |
| tst.ts:481:5:481:34 | type Pa ... T, T]; | Pair3<T> |
| type_alias.ts:1:1:1:17 | type B = boolean; | boolean |
| type_alias.ts:5:1:5:50 | type Va ... ay<T>>; | ValueOrArray<T> |
| type_alias.ts:9:1:15:13 | type Js ... Json[]; | Json |
@@ -1093,6 +1120,15 @@ getTypeExprType
| tst.ts:462:65:462:72 | string[] | readonly string[] |
| tst.ts:462:81:462:81 | T | T |
| tst.ts:462:85:462:85 | T | T |
| tst.ts:481:10:481:14 | Pair3 | Pair3<T> |
| tst.ts:481:16:481:16 | T | T |
| tst.ts:481:21:481:33 | [first: T, T] | [first: T, T] |
| tst.ts:481:22:481:26 | first | any |
| tst.ts:481:29:481:29 | T | T |
| tst.ts:481:32:481:32 | T | T |
| tst.ts:483:46:483:50 | Pair3 | Pair3<T> |
| tst.ts:483:46:483:58 | Pair3<string> | Pair3<string> |
| tst.ts:483:52:483:57 | string | string |
| tstModuleCJS.cts:1:33:1:35 | 'a' | "a" |
| tstModuleCJS.cts:1:33:1:41 | 'a' \| 'b' | "a" \| "b" |
| tstModuleCJS.cts:1:39:1:41 | 'b' | "b" |
@@ -1196,12 +1232,15 @@ referenceDefinition
| MyUnion | tst.ts:65:1:65:54 | type My ... true}; |
| MyUnion2 | tst.ts:68:1:68:49 | type My ... true}; |
| NonAbstractDummy | tst.ts:54:1:56:1 | interfa ... mber;\\n} |
| Pair3<T> | tst.ts:481:5:481:34 | type Pa ... T, T]; |
| Pair3<string> | tst.ts:481:5:481:34 | type Pa ... T, T]; |
| Person | tst.ts:222:3:234:3 | class P ... }\\n } |
| Person | tst.ts:419:3:425:3 | class P ... }\\n } |
| Person | tst.ts:447:5:458:5 | class P ... }\\n } |
| RGB | tst.ts:393:3:393:56 | type RG ... umber]; |
| RGBObj | tst.ts:404:3:406:3 | interfa ... er;\\n } |
| Shape | tst.ts:140:3:142:47 | type Sh ... mber }; |
| SomeClass | tst.ts:473:5:476:5 | class S ... ;\\n } |
| State<T> | tst.ts:342:1:345:1 | interfa ... void;\\n} |
| State<number> | tst.ts:342:1:345:1 | interfa ... void;\\n} |
| Sub | tst.ts:97:3:101:3 | class S ... }\\n } |
@@ -1275,6 +1314,8 @@ tupleTypes
| tst.ts:467:15:467:17 | foo | readonly ["a", "b", "c"] | 0 | "a" | 3 | no-rest |
| tst.ts:467:15:467:17 | foo | readonly ["a", "b", "c"] | 1 | "b" | 3 | no-rest |
| tst.ts:467:15:467:17 | foo | readonly ["a", "b", "c"] | 2 | "c" | 3 | no-rest |
| tst.ts:483:17:483:58 | ["hello ... string> | [first: string, string] | 0 | string | 2 | no-rest |
| tst.ts:483:17:483:58 | ["hello ... string> | [first: string, string] | 1 | string | 2 | no-rest |
unknownType
| tst.ts:40:5:40:15 | unknownType | unknown |
| tst.ts:47:8:47:8 | e | unknown |
@@ -1355,6 +1396,7 @@ unionIndex
| number | 1 | string \| number |
| number | 1 | string \| number \| boolean |
| number | 1 | string \| number \| boolean \| { [property: string... |
| number | 1 | string \| number \| symbol |
| number | 1 | string \| number \| true |
| string | 0 | VirtualNode \| { [key: string]: any; } |
| string | 0 | string \| Error |
@@ -1363,10 +1405,12 @@ unionIndex
| string | 0 | string \| number |
| string | 0 | string \| number \| boolean |
| string | 0 | string \| number \| boolean \| { [property: string... |
| string | 0 | string \| number \| symbol |
| string | 0 | string \| number \| true |
| string | 0 | string \| symbol |
| string | 0 | string \| { [key: string]: any; } |
| symbol | 1 | string \| symbol |
| symbol | 2 | string \| number \| symbol |
| true | 1 | boolean |
| true | 1 | boolean \| Promise<number> |
| true | 2 | number \| boolean |

View File

@@ -465,4 +465,20 @@ module TS50 {
const foo = myConstIdFunction(["a", "b" ,"c"]);
const b = foo[1]; // <- "b"
}
/////////////////
module TS52 {
class SomeClass {
@((_target, _context) => {})
foo = 123;
}
console.log(SomeClass[Symbol.metadata]); // <- has type DecoratorMetadataObject
// named and anonymous tuple elements.
type Pair3<T> = [first: T, T];
console.log(["hello", "world"] satisfies Pair3<string>);
}