Merge pull request #7216 from erik-krogh/ts45

JS: Add support for TypeScript 4.5
This commit is contained in:
Erik Krogh Kristensen
2021-12-09 20:33:52 +01:00
committed by GitHub
35 changed files with 3363 additions and 243 deletions

View File

@@ -23,7 +23,7 @@
JavaScript,ECMAScript 2021 or lower,Not applicable,"``.js``, ``.jsx``, ``.mjs``, ``.es``, ``.es6``, ``.htm``, ``.html``, ``.xhtm``, ``.xhtml``, ``.vue``, ``.hbs``, ``.ejs``, ``.njk``, ``.json``, ``.yaml``, ``.yml``, ``.raml``, ``.xml`` [6]_"
Python,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9",Not applicable,``.py``
Ruby [7]_,"up to 3.02",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``"
TypeScript [8]_,"2.6-4.4",Standard TypeScript compiler,"``.ts``, ``.tsx``"
TypeScript [8]_,"2.6-4.5",Standard TypeScript compiler,"``.ts``, ``.tsx``"
.. container:: footnote-group

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* TypeScript 4.5 is now supported.

View File

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

View File

@@ -6,7 +6,7 @@
version "12.7.11"
resolved node-12.7.11.tgz#be879b52031cfb5d295b047f5462d8ef1a716446
typescript@4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86"
integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==
typescript@4.5.2:
version "4.5.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998"
integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==

View File

@@ -1646,6 +1646,15 @@ public class Parser {
node = new ThisExpression(new SourceLocation(this.startLoc));
this.next();
return this.finishNode(node);
} else if (this.type == TokenType.pound) {
Position startLoc = this.startLoc;
// there is only one case where this is valid, and that is "Ergonomic brand checks for Private Fields", i.e. `#name in obj`.
Identifier id = parseIdent(true);
String op = String.valueOf(this.value);
if (!op.equals("in")) {
this.unexpected(startLoc);
}
return this.parseExprOp(id, this.start, startLoc, -1, false);
} else if (this.type == TokenType.name) {
Position startLoc = this.startLoc;
Identifier id = this.parseIdent(this.type != TokenType.name);
@@ -3314,9 +3323,6 @@ public class Parser {
if (pi.kind.equals("set") && node.getValue().hasRest())
this.raiseRecoverable(params.get(params.size() - 1), "Setter cannot use rest params");
}
if (pi.key instanceof Identifier && ((Identifier)pi.key).getName().startsWith("#")) {
raiseRecoverable(pi.key, "Only fields, not methods, can be declared private.");
}
return node;
}

View File

@@ -10,15 +10,25 @@ package com.semmle.js.ast;
*/
public class ImportSpecifier extends Expression {
private final Identifier imported, local;
private final boolean isTypeOnly;
public ImportSpecifier(SourceLocation loc, Identifier imported, Identifier local) {
this("ImportSpecifier", loc, imported, local);
this(loc, imported, local, false);
}
public ImportSpecifier(SourceLocation loc, Identifier imported, Identifier local, boolean isTypeOnly) {
this("ImportSpecifier", loc, imported, local, isTypeOnly);
}
public ImportSpecifier(String type, SourceLocation loc, Identifier imported, Identifier local) {
this(type, loc, imported, local, false);
}
private ImportSpecifier(String type, SourceLocation loc, Identifier imported, Identifier local, boolean isTypeOnly) {
super(type, loc);
this.imported = imported;
this.local = local == imported ? new NodeCopier().copy(local) : local;
this.isTypeOnly = isTypeOnly;
}
public Identifier getImported() {
@@ -33,4 +43,8 @@ public class ImportSpecifier extends Expression {
public <C, R> R accept(Visitor<C, R> v, C c) {
return v.visit(this, c);
}
public boolean hasTypeKeyword() {
return isTypeOnly;
}
}

View File

@@ -847,8 +847,15 @@ public class ASTExtractor {
@Override
public Label visit(BinaryExpression nd, Context c) {
Label key = super.visit(nd, c);
visit(nd.getLeft(), key, 0, true);
if (nd.getOperator().equals("in") && nd.getLeft() instanceof Identifier && ((Identifier)nd.getLeft()).getName().startsWith("#")) {
// this happens with Ergonomic brand checks for Private Fields (see https://github.com/tc39/proposal-private-fields-in-in).
// it's the only case where private field identifiers are used not as a field.
visit(nd.getLeft(), key, 0, IdContext.LABEL, true);
} else {
visit(nd.getLeft(), key, 0, true);
}
visit(nd.getRight(), key, 1, true);
extractRegxpFromBinop(nd, c);
return key;
}
@@ -1805,7 +1812,10 @@ public class ASTExtractor {
public Label visit(ImportSpecifier nd, Context c) {
Label lbl = super.visit(nd, c);
visit(nd.getImported(), lbl, 0, IdContext.LABEL);
visit(nd.getLocal(), lbl, 1, c.idcontext);
visit(nd.getLocal(), lbl, 1, nd.hasTypeKeyword() ? IdContext.TYPE_ONLY_IMPORT : c.idcontext);
if (nd.hasTypeKeyword()) {
trapwriter.addTuple("has_type_keyword", lbl);
}
return lbl;
}

View File

@@ -43,7 +43,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 = "2021-10-28";
public static final String EXTRACTOR_VERSION = "2021-11-23";
public static final Pattern NEWLINE = Pattern.compile("\n");

View File

@@ -1406,7 +1406,8 @@ public class TypeScriptASTConverter {
boolean hasImported = hasChild(node, "propertyName");
Identifier imported = convertChild(node, hasImported ? "propertyName" : "name");
Identifier local = convertChild(node, "name");
return new ImportSpecifier(loc, imported, local);
boolean isTypeOnly = node.get("isTypeOnly").getAsBoolean() == true;
return new ImportSpecifier(loc, imported, local, isTypeOnly);
}
private Node convertImportType(JsonObject node, SourceLocation loc) throws ParseError {

View File

@@ -152,241 +152,259 @@ toplevels(#20044,4)
locations_default(#20045,#10000,6,16,6,16)
hasLocation(#20044,#20045)
#20046=*
js_parse_errors(#20046,#20044,"Error: Unexpected token","#foo")
hasLocation(#20046,#20045)
#20047=*
lines(#20047,#20044,"#foo","")
#20048=@"loc,{#10000},6,16,6,19"
locations_default(#20048,#10000,6,16,6,19)
hasLocation(#20047,#20048)
js_parse_errors(#20046,#20044,"Error: Cannot use private fields outside a class","#foo")
#20047=@"loc,{#10000},6,20,6,20"
locations_default(#20047,#10000,6,20,6,20)
hasLocation(#20046,#20047)
#20048=*
lines(#20048,#20044,"#foo","")
#20049=@"loc,{#10000},6,16,6,19"
locations_default(#20049,#10000,6,16,6,19)
hasLocation(#20048,#20049)
numlines(#20044,1,0,0)
#20050=*
js_parse_errors(#20050,#20044,"Error: Unexpected token","#foo")
hasLocation(#20050,#20045)
#20051=*
lines(#20051,#20044,"#foo","")
hasLocation(#20051,#20049)
numlines(#20044,1,0,0)
toplevel_parent_xml_node(#20044,#20041)
#20049=*
template_placeholder_tag_info(#20049,#20042,"{{/foo}}")
#20050=@"loc,{#10000},6,22,6,29"
locations_default(#20050,#10000,6,22,6,29)
hasLocation(#20049,#20050)
#20052=*
template_placeholder_tag_info(#20052,#20042,"{{/foo}}")
#20053=@"loc,{#10000},6,22,6,29"
locations_default(#20053,#10000,6,22,6,29)
hasLocation(#20052,#20053)
scopes(#20000,0)
#20051=@"script;{#10000},6,24"
toplevels(#20051,4)
#20052=@"loc,{#10000},6,24,6,24"
locations_default(#20052,#10000,6,24,6,24)
hasLocation(#20051,#20052)
#20053=*
js_parse_errors(#20053,#20051,"Error: Unterminated regular expression","/foo")
#20054=@"loc,{#10000},6,25,6,25"
locations_default(#20054,#10000,6,25,6,25)
hasLocation(#20053,#20054)
#20055=*
lines(#20055,#20051,"/foo","")
#20056=@"loc,{#10000},6,24,6,27"
locations_default(#20056,#10000,6,24,6,27)
hasLocation(#20055,#20056)
numlines(#20051,1,0,0)
toplevel_parent_xml_node(#20051,#20049)
#20057=*
#20054=@"script;{#10000},6,24"
toplevels(#20054,4)
#20055=@"loc,{#10000},6,24,6,24"
locations_default(#20055,#10000,6,24,6,24)
hasLocation(#20054,#20055)
#20056=*
js_parse_errors(#20056,#20054,"Error: Unterminated regular expression","/foo")
#20057=@"loc,{#10000},6,25,6,25"
locations_default(#20057,#10000,6,25,6,25)
hasLocation(#20056,#20057)
#20058=*
template_placeholder_tag_info(#20057,#20058,"{{#foo}}")
#20059=@"loc,{#10000},8,18,8,25"
locations_default(#20059,#10000,8,18,8,25)
hasLocation(#20057,#20059)
lines(#20058,#20054,"/foo","")
#20059=@"loc,{#10000},6,24,6,27"
locations_default(#20059,#10000,6,24,6,27)
hasLocation(#20058,#20059)
numlines(#20054,1,0,0)
toplevel_parent_xml_node(#20054,#20052)
#20060=*
#20061=*
template_placeholder_tag_info(#20060,#20061,"{{#foo}}")
#20062=@"loc,{#10000},8,18,8,25"
locations_default(#20062,#10000,8,18,8,25)
hasLocation(#20060,#20062)
scopes(#20000,0)
#20060=@"script;{#10000},8,20"
toplevels(#20060,4)
#20061=@"loc,{#10000},8,20,8,20"
locations_default(#20061,#10000,8,20,8,20)
hasLocation(#20060,#20061)
#20062=*
js_parse_errors(#20062,#20060,"Error: Unexpected token","#foo")
hasLocation(#20062,#20061)
#20063=*
lines(#20063,#20060,"#foo","")
#20064=@"loc,{#10000},8,20,8,23"
locations_default(#20064,#10000,8,20,8,23)
#20063=@"script;{#10000},8,20"
toplevels(#20063,4)
#20064=@"loc,{#10000},8,20,8,20"
locations_default(#20064,#10000,8,20,8,20)
hasLocation(#20063,#20064)
numlines(#20060,1,0,0)
toplevel_parent_xml_node(#20060,#20057)
#20065=*
template_placeholder_tag_info(#20065,#20058,"{{baz}}")
#20066=@"loc,{#10000},8,30,8,36"
locations_default(#20066,#10000,8,30,8,36)
js_parse_errors(#20065,#20063,"Error: Cannot use private fields outside a class","#foo")
#20066=@"loc,{#10000},8,24,8,24"
locations_default(#20066,#10000,8,24,8,24)
hasLocation(#20065,#20066)
scopes(#20000,0)
#20067=@"script;{#10000},8,32"
#20068=*
lines(#20068,#20067,"baz","")
#20069=@"loc,{#10000},8,32,8,34"
locations_default(#20069,#10000,8,32,8,34)
hasLocation(#20068,#20069)
numlines(#20067,1,1,0)
#20067=*
lines(#20067,#20063,"#foo","")
#20068=@"loc,{#10000},8,20,8,23"
locations_default(#20068,#10000,8,20,8,23)
hasLocation(#20067,#20068)
numlines(#20063,1,0,0)
#20069=*
js_parse_errors(#20069,#20063,"Error: Unexpected token","#foo")
hasLocation(#20069,#20064)
#20070=*
tokeninfo(#20070,6,#20067,0,"baz")
hasLocation(#20070,#20069)
lines(#20070,#20063,"#foo","")
hasLocation(#20070,#20068)
numlines(#20063,1,0,0)
toplevel_parent_xml_node(#20063,#20060)
#20071=*
tokeninfo(#20071,0,#20067,1,"")
#20072=@"loc,{#10000},8,35,8,34"
locations_default(#20072,#10000,8,35,8,34)
template_placeholder_tag_info(#20071,#20061,"{{baz}}")
#20072=@"loc,{#10000},8,30,8,36"
locations_default(#20072,#10000,8,30,8,36)
hasLocation(#20071,#20072)
toplevels(#20067,4)
hasLocation(#20067,#20069)
#20073=@"module;{#10000},8,32"
scopes(#20073,3)
scopenodes(#20067,#20073)
scopenesting(#20073,#20000)
is_module(#20067)
#20074=*
stmts(#20074,2,#20067,0,"baz")
hasLocation(#20074,#20069)
stmt_containers(#20074,#20067)
#20075=*
exprs(#20075,79,#20074,0,"baz")
hasLocation(#20075,#20069)
enclosing_stmt(#20075,#20074)
expr_containers(#20075,#20067)
literals("baz","baz",#20075)
#20076=@"var;{baz};{#20073}"
variables(#20076,"baz",#20073)
bind(#20075,#20076)
#20077=*
entry_cfg_node(#20077,#20067)
#20078=@"loc,{#10000},8,32,8,31"
locations_default(#20078,#10000,8,32,8,31)
hasLocation(#20077,#20078)
#20079=*
exit_cfg_node(#20079,#20067)
hasLocation(#20079,#20072)
successor(#20074,#20075)
successor(#20075,#20079)
successor(#20077,#20074)
toplevel_parent_xml_node(#20067,#20065)
#20080=*
template_placeholder_tag_info(#20080,#20058,"{{/foo}}")
#20081=@"loc,{#10000},8,37,8,44"
locations_default(#20081,#10000,8,37,8,44)
hasLocation(#20080,#20081)
scopes(#20000,0)
#20082=@"script;{#10000},8,39"
toplevels(#20082,4)
#20083=@"loc,{#10000},8,39,8,39"
locations_default(#20083,#10000,8,39,8,39)
hasLocation(#20082,#20083)
#20084=*
js_parse_errors(#20084,#20082,"Error: Unterminated regular expression","/foo")
#20085=@"loc,{#10000},8,40,8,40"
locations_default(#20085,#10000,8,40,8,40)
hasLocation(#20084,#20085)
#20073=@"script;{#10000},8,32"
#20074=*
lines(#20074,#20073,"baz","")
#20075=@"loc,{#10000},8,32,8,34"
locations_default(#20075,#10000,8,32,8,34)
hasLocation(#20074,#20075)
numlines(#20073,1,1,0)
#20076=*
tokeninfo(#20076,6,#20073,0,"baz")
hasLocation(#20076,#20075)
#20077=*
tokeninfo(#20077,0,#20073,1,"")
#20078=@"loc,{#10000},8,35,8,34"
locations_default(#20078,#10000,8,35,8,34)
hasLocation(#20077,#20078)
toplevels(#20073,4)
hasLocation(#20073,#20075)
#20079=@"module;{#10000},8,32"
scopes(#20079,3)
scopenodes(#20073,#20079)
scopenesting(#20079,#20000)
is_module(#20073)
#20080=*
stmts(#20080,2,#20073,0,"baz")
hasLocation(#20080,#20075)
stmt_containers(#20080,#20073)
#20081=*
exprs(#20081,79,#20080,0,"baz")
hasLocation(#20081,#20075)
enclosing_stmt(#20081,#20080)
expr_containers(#20081,#20073)
literals("baz","baz",#20081)
#20082=@"var;{baz};{#20079}"
variables(#20082,"baz",#20079)
bind(#20081,#20082)
#20083=*
entry_cfg_node(#20083,#20073)
#20084=@"loc,{#10000},8,32,8,31"
locations_default(#20084,#10000,8,32,8,31)
hasLocation(#20083,#20084)
#20085=*
exit_cfg_node(#20085,#20073)
hasLocation(#20085,#20078)
successor(#20080,#20081)
successor(#20081,#20085)
successor(#20083,#20080)
toplevel_parent_xml_node(#20073,#20071)
#20086=*
lines(#20086,#20082,"/foo","")
#20087=@"loc,{#10000},8,39,8,42"
locations_default(#20087,#10000,8,39,8,42)
template_placeholder_tag_info(#20086,#20061,"{{/foo}}")
#20087=@"loc,{#10000},8,37,8,44"
locations_default(#20087,#10000,8,37,8,44)
hasLocation(#20086,#20087)
numlines(#20082,1,0,0)
toplevel_parent_xml_node(#20082,#20080)
#20088=*
xmlChars(#20088,"
",#10000,0,0,#10000)
#20089=@"loc,{#10000},1,16,1,16"
locations_default(#20089,#10000,1,16,1,16)
xmllocations(#20088,#20089)
scopes(#20000,0)
#20088=@"script;{#10000},8,39"
toplevels(#20088,4)
#20089=@"loc,{#10000},8,39,8,39"
locations_default(#20089,#10000,8,39,8,39)
hasLocation(#20088,#20089)
#20090=*
xmlChars(#20090,"
",#10000,2,0,#10000)
#20091=@"loc,{#10000},10,8,10,8"
locations_default(#20091,#10000,10,8,10,8)
xmllocations(#20090,#20091)
js_parse_errors(#20090,#20088,"Error: Unterminated regular expression","/foo")
#20091=@"loc,{#10000},8,40,8,40"
locations_default(#20091,#10000,8,40,8,40)
hasLocation(#20090,#20091)
#20092=*
xmlElements(#20092,"html",#10000,1,#10000)
#20093=@"loc,{#10000},2,1,10,7"
locations_default(#20093,#10000,2,1,10,7)
xmllocations(#20092,#20093)
lines(#20092,#20088,"/foo","")
#20093=@"loc,{#10000},8,39,8,42"
locations_default(#20093,#10000,8,39,8,42)
hasLocation(#20092,#20093)
numlines(#20088,1,0,0)
toplevel_parent_xml_node(#20088,#20086)
#20094=*
xmlChars(#20094,"
",#20092,0,0,#10000)
#20095=@"loc,{#10000},2,7,3,2"
locations_default(#20095,#10000,2,7,3,2)
",#10000,0,0,#10000)
#20095=@"loc,{#10000},1,16,1,16"
locations_default(#20095,#10000,1,16,1,16)
xmllocations(#20094,#20095)
#20096=*
xmlChars(#20096,"
",#20092,2,0,#10000)
#20097=@"loc,{#10000},9,10,9,10"
locations_default(#20097,#10000,9,10,9,10)
",#10000,2,0,#10000)
#20097=@"loc,{#10000},10,8,10,8"
locations_default(#20097,#10000,10,8,10,8)
xmllocations(#20096,#20097)
#20098=*
xmlElements(#20098,"body",#20092,1,#10000)
#20099=@"loc,{#10000},3,3,9,9"
locations_default(#20099,#10000,3,3,9,9)
xmlElements(#20098,"html",#10000,1,#10000)
#20099=@"loc,{#10000},2,1,10,7"
locations_default(#20099,#10000,2,1,10,7)
xmllocations(#20098,#20099)
#20100=*
xmlChars(#20100,"
",#20098,0,0,#10000)
#20101=@"loc,{#10000},3,9,4,4"
locations_default(#20101,#10000,3,9,4,4)
",#20098,0,0,#10000)
#20101=@"loc,{#10000},2,7,3,2"
locations_default(#20101,#10000,2,7,3,2)
xmllocations(#20100,#20101)
#20102=*
xmlChars(#20102,"
",#20098,2,0,#10000)
#20103=@"loc,{#10000},4,28,5,4"
locations_default(#20103,#10000,4,28,5,4)
",#20098,2,0,#10000)
#20103=@"loc,{#10000},9,10,9,10"
locations_default(#20103,#10000,9,10,9,10)
xmllocations(#20102,#20103)
#20104=*
xmlChars(#20104,"
",#20098,4,0,#10000)
#20105=@"loc,{#10000},5,33,6,4"
locations_default(#20105,#10000,5,33,6,4)
xmlElements(#20104,"body",#20098,1,#10000)
#20105=@"loc,{#10000},3,3,9,9"
locations_default(#20105,#10000,3,3,9,9)
xmllocations(#20104,#20105)
#20106=*
xmlChars(#20106,"
",#20098,6,0,#10000)
#20107=@"loc,{#10000},6,32,7,4"
locations_default(#20107,#10000,6,32,7,4)
",#20104,0,0,#10000)
#20107=@"loc,{#10000},3,9,4,4"
locations_default(#20107,#10000,3,9,4,4)
xmllocations(#20106,#20107)
#20108=*
xmlChars(#20108,"
",#20098,8,0,#10000)
#20109=@"loc,{#10000},7,36,8,4"
locations_default(#20109,#10000,7,36,8,4)
",#20104,2,0,#10000)
#20109=@"loc,{#10000},4,28,5,4"
locations_default(#20109,#10000,4,28,5,4)
xmllocations(#20108,#20109)
#20110=*
xmlChars(#20110,"
",#20098,10,0,#10000)
#20111=@"loc,{#10000},8,47,9,2"
locations_default(#20111,#10000,8,47,9,2)
",#20104,4,0,#10000)
#20111=@"loc,{#10000},5,33,6,4"
locations_default(#20111,#10000,5,33,6,4)
xmllocations(#20110,#20111)
xmlElements(#20058,"div",#20098,9,#10000)
#20112=@"loc,{#10000},8,5,8,46"
locations_default(#20112,#10000,8,5,8,46)
xmllocations(#20058,#20112)
#20113=*
xmlElements(#20113,"div",#20098,7,#10000)
#20114=@"loc,{#10000},7,5,7,35"
locations_default(#20114,#10000,7,5,7,35)
xmllocations(#20113,#20114)
#20115=*
xmlElements(#20115,"div",#20098,5,#10000)
#20116=@"loc,{#10000},6,5,6,31"
locations_default(#20116,#10000,6,5,6,31)
xmllocations(#20115,#20116)
xmlAttrs(#20042,#20115,"foo","{{#foo}}{{/foo}}/",0,#10000)
#20117=@"loc,{#10000},6,10,6,30"
locations_default(#20117,#10000,6,10,6,30)
xmllocations(#20042,#20117)
#20118=*
xmlElements(#20118,"div",#20098,3,#10000)
#20119=@"loc,{#10000},5,5,5,32"
locations_default(#20119,#10000,5,5,5,32)
xmllocations(#20118,#20119)
xmlAttrs(#20018,#20118,"foo","{{{foo}}}{{/foo}}/",0,#10000)
#20120=@"loc,{#10000},5,10,5,31"
locations_default(#20120,#10000,5,10,5,31)
xmllocations(#20018,#20120)
#20112=*
xmlChars(#20112,"
",#20104,6,0,#10000)
#20113=@"loc,{#10000},6,32,7,4"
locations_default(#20113,#10000,6,32,7,4)
xmllocations(#20112,#20113)
#20114=*
xmlChars(#20114,"
",#20104,8,0,#10000)
#20115=@"loc,{#10000},7,36,8,4"
locations_default(#20115,#10000,7,36,8,4)
xmllocations(#20114,#20115)
#20116=*
xmlChars(#20116,"
",#20104,10,0,#10000)
#20117=@"loc,{#10000},8,47,9,2"
locations_default(#20117,#10000,8,47,9,2)
xmllocations(#20116,#20117)
xmlElements(#20061,"div",#20104,9,#10000)
#20118=@"loc,{#10000},8,5,8,46"
locations_default(#20118,#10000,8,5,8,46)
xmllocations(#20061,#20118)
#20119=*
xmlElements(#20119,"div",#20104,7,#10000)
#20120=@"loc,{#10000},7,5,7,35"
locations_default(#20120,#10000,7,5,7,35)
xmllocations(#20119,#20120)
#20121=*
xmlElements(#20121,"div",#20098,1,#10000)
#20122=@"loc,{#10000},4,5,4,27"
locations_default(#20122,#10000,4,5,4,27)
xmlElements(#20121,"div",#20104,5,#10000)
#20122=@"loc,{#10000},6,5,6,31"
locations_default(#20122,#10000,6,5,6,31)
xmllocations(#20121,#20122)
xmlAttrs(#20002,#20121,"foo","{{foo}}",0,#10000)
#20123=@"loc,{#10000},4,10,4,20"
locations_default(#20123,#10000,4,10,4,20)
xmllocations(#20002,#20123)
xmlAttrs(#20042,#20121,"foo","{{#foo}}{{/foo}}/",0,#10000)
#20123=@"loc,{#10000},6,10,6,30"
locations_default(#20123,#10000,6,10,6,30)
xmllocations(#20042,#20123)
#20124=*
xmlElements(#20124,"div",#20104,3,#10000)
#20125=@"loc,{#10000},5,5,5,32"
locations_default(#20125,#10000,5,5,5,32)
xmllocations(#20124,#20125)
xmlAttrs(#20018,#20124,"foo","{{{foo}}}{{/foo}}/",0,#10000)
#20126=@"loc,{#10000},5,10,5,31"
locations_default(#20126,#10000,5,10,5,31)
xmllocations(#20018,#20126)
#20127=*
xmlElements(#20127,"div",#20104,1,#10000)
#20128=@"loc,{#10000},4,5,4,27"
locations_default(#20128,#10000,4,5,4,27)
xmllocations(#20127,#20128)
xmlAttrs(#20002,#20127,"foo","{{foo}}",0,#10000)
#20129=@"loc,{#10000},4,10,4,20"
locations_default(#20129,#10000,4,10,4,20)
xmllocations(#20002,#20129)
numlines(#10000,10,3,0)
filetype(#10000,"html")

View File

@@ -17,8 +17,8 @@ hasLocation(#20002,#20003)
#20004=*
js_parse_errors(#20004,#20002,"Error: Unexpected token","#!/usr/bin/node
")
#20005=@"loc,{#10000},4,1,4,1"
locations_default(#20005,#10000,4,1,4,1)
#20005=@"loc,{#10000},4,2,4,2"
locations_default(#20005,#10000,4,2,4,2)
hasLocation(#20004,#20005)
#20006=*
lines(#20006,#20002,"","

View File

@@ -42,7 +42,7 @@ private predicate defn(ControlFlowNode def, Expr lhs, AST::ValueNode rhs) {
lhs = i.getIdentifier() and rhs = i.getImportedEntity()
)
or
exists(ImportSpecifier i | def = i | lhs = i.getLocal() and rhs = i)
exists(ImportSpecifier i | def = i and not i.isTypeOnly() | lhs = i.getLocal() and rhs = i)
or
exists(EnumMember member | def = member.getIdentifier() |
lhs = def and rhs = member.getInitializer()

View File

@@ -172,6 +172,9 @@ class ImportSpecifier extends Expr, @import_specifier {
VarDecl getLocal() { result = getChildExpr(1) }
override string getAPrimaryQlClass() { result = "ImportSpecifier" }
/** Holds if this is declared with the `type` keyword, so only types are imported. */
predicate isTypeOnly() { has_type_keyword(this) }
}
/**

View File

@@ -881,6 +881,7 @@ module DataFlow {
ImportSpecifierAsPropRead() {
astNode = imprt.getASpecifier() and
not astNode.isTypeOnly() and
exists(astNode.getImportedName())
}

View File

@@ -15,7 +15,11 @@ private import AbstractPropertiesImpl
private class AnalyzedImportSpecifier extends AnalyzedVarDef, @import_specifier {
ImportDeclaration id;
AnalyzedImportSpecifier() { this = id.getASpecifier() and exists(id.resolveImportedPath()) }
AnalyzedImportSpecifier() {
this = id.getASpecifier() and
exists(id.resolveImportedPath()) and
not this.(ImportSpecifier).isTypeOnly()
}
override DataFlow::AnalyzedNode getRhs() { result.(AnalyzedImport).getImportSpecifier() = this }
@@ -135,10 +139,12 @@ private predicate incompleteExport(ES2015Module m, string y) {
*/
private class AnalyzedImport extends AnalyzedPropertyRead, DataFlow::ValueNode {
Module imported;
override ImportSpecifier astNode;
AnalyzedImport() {
exists(ImportDeclaration id |
astNode = id.getASpecifier() and
not astNode.isTypeOnly() and
imported = id.getImportedModule()
)
}

View File

@@ -392,7 +392,7 @@ case @expr.kind of
@exportspecifier = @named_export_specifier | @export_default_specifier | @export_namespace_specifier;
@import_or_export_declaration = @import_declaration | @export_declaration;
@type_keyword_operand = @import_declaration | @export_declaration | @import_specifier;
@type_assertion = @as_type_assertion | @prefix_type_assertion;
@@ -541,7 +541,7 @@ has_public_keyword (int id: @property ref);
has_private_keyword (int id: @property ref);
has_protected_keyword (int id: @property ref);
has_readonly_keyword (int id: @property ref);
has_type_keyword (int id: @import_or_export_declaration ref);
has_type_keyword (int id: @type_keyword_operand ref);
is_optional_member (int id: @property ref);
has_definite_assignment_assertion (int id: @field_or_vardeclarator ref);
is_optional_parameter_declaration (unique int parameter: @pattern ref);

View File

@@ -24,4 +24,16 @@ class Foo {
this.#privDecl();
new this.#privDecl();
}
}
class C {
#brand;
#method() {}
get #getter() {}
static isC(obj) {
return #brand in obj && #method in obj && #getter in obj;
}
}

View File

@@ -11,6 +11,7 @@ test_ComputedMethods
test_StaticMethods
| points.js:15:3:17:3 | static ... t";\\n } |
| points.js:30:3:32:3 | static ... t";\\n } |
| privateFields.js:36:3:38:3 | static ... bj;\\n } |
| staticConstructor.js:2:3:2:59 | static ... tor"; } |
| staticInitializer.js:12:3:14:3 | static ... 5;\\n } |
test_ClassDefinition_getSuperClass
@@ -19,6 +20,7 @@ test_ClassDefinition_getSuperClass
test_ClassNodeStaticMethod
| points.js:1:1:18:1 | class P ... ;\\n }\\n} | className | points.js:15:19:17:3 | () {\\n ... t";\\n } |
| points.js:20:1:33:1 | class C ... ;\\n }\\n} | className | points.js:30:19:32:3 | () {\\n ... t";\\n } |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | isC | privateFields.js:36:13:38:3 | (obj) { ... bj;\\n } |
| staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} | constructor | staticConstructor.js:2:21:2:59 | () { re ... tor"; } |
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} | bar | staticInitializer.js:12:13:14:3 | () {\\n ... 5;\\n } |
test_ClassDefinitions
@@ -27,6 +29,7 @@ test_ClassDefinitions
| points.js:1:1:18:1 | class P ... ;\\n }\\n} |
| points.js:20:1:33:1 | class C ... ;\\n }\\n} |
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} |
| staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} |
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} |
| tst.js:1:9:4:1 | class { ... */ }\\n} |
@@ -34,6 +37,7 @@ test_ClassDefinitions
| tst.js:11:1:14:1 | class C ... () {}\\n} |
test_AccessorMethods
| points.js:7:3:9:3 | get dis ... y);\\n } |
| privateFields.js:34:3:34:18 | get #getter() {} |
test_Fields
| dataflow.js:5:3:5:17 | #priv = source; | dataflow.js:5:3:5:7 | #priv |
| fields.js:2:3:2:4 | x; | fields.js:2:3:2:3 | x |
@@ -42,6 +46,7 @@ test_Fields
| privateFields.js:3:2:3:12 | #if = "if"; | privateFields.js:3:2:3:4 | #if |
| privateFields.js:19:2:19:13 | #privSecond; | privateFields.js:19:2:19:12 | #privSecond |
| privateFields.js:21:2:21:22 | ["#publ ... "] = 6; | privateFields.js:21:3:21:16 | "#publicField" |
| privateFields.js:30:3:30:9 | #brand; | privateFields.js:30:3:30:8 | #brand |
| staticInitializer.js:2:3:2:15 | static x = 1; | staticInitializer.js:2:10:2:10 | x |
test_ClassDefinition_getName
| dataflow.js:4:2:13:2 | class F ... \\n\\t\\t}\\n\\t} | Foo |
@@ -49,6 +54,7 @@ test_ClassDefinition_getName
| points.js:1:1:18:1 | class P ... ;\\n }\\n} | Point |
| points.js:20:1:33:1 | class C ... ;\\n }\\n} | ColouredPoint |
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | Foo |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | C |
| staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} | MyClass |
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} | MyClass |
| tst.js:1:9:4:1 | class { ... */ }\\n} | A |
@@ -71,6 +77,10 @@ test_MethodDefinitions
| privateFields.js:10:2:12:2 | equals( ... ecl;\\n\\t} | privateFields.js:10:2:10:7 | equals | privateFields.js:10:8:12:2 | (o) {\\n\\t ... ecl;\\n\\t} | privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} |
| privateFields.js:14:2:17:2 | writes( ... = 5;\\n\\t} | privateFields.js:14:2:14:7 | writes | privateFields.js:14:8:17:2 | () {\\n\\t\\t ... = 5;\\n\\t} | privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} |
| privateFields.js:23:2:26:2 | calls() ... l();\\n\\t} | privateFields.js:23:2:23:6 | calls | privateFields.js:23:7:26:2 | () {\\n\\t\\t ... l();\\n\\t} | privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} |
| privateFields.js:29:9:29:8 | constructor() {} | privateFields.js:29:9:29:8 | constructor | privateFields.js:29:9:29:8 | () {} | privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} |
| privateFields.js:32:3:32:14 | #method() {} | privateFields.js:32:3:32:9 | #method | privateFields.js:32:10:32:14 | () {} | privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} |
| privateFields.js:34:3:34:18 | get #getter() {} | privateFields.js:34:7:34:13 | #getter | privateFields.js:34:14:34:18 | () {} | privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} |
| privateFields.js:36:3:38:3 | static ... bj;\\n } | privateFields.js:36:10:36:12 | isC | privateFields.js:36:13:38:3 | (obj) { ... bj;\\n } | privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} |
| staticConstructor.js:1:15:1:14 | constructor() {} | staticConstructor.js:1:15:1:14 | constructor | staticConstructor.js:1:15:1:14 | () {} | staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} |
| staticConstructor.js:2:3:2:59 | static ... tor"; } | staticConstructor.js:2:10:2:20 | constructor | staticConstructor.js:2:21:2:59 | () { re ... tor"; } | staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} |
| staticInitializer.js:3:3:5:3 | constru ... 2;\\n } | staticInitializer.js:3:3:3:13 | constructor | staticInitializer.js:3:14:5:3 | () {\\n ... 2;\\n } | staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} |
@@ -106,6 +116,11 @@ test_getAMember
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | privateFields.js:19:2:19:13 | #privSecond; |
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | privateFields.js:21:2:21:22 | ["#publ ... "] = 6; |
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | privateFields.js:23:2:26:2 | calls() ... l();\\n\\t} |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | privateFields.js:29:9:29:8 | constructor() {} |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | privateFields.js:30:3:30:9 | #brand; |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | privateFields.js:32:3:32:14 | #method() {} |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | privateFields.js:34:3:34:18 | get #getter() {} |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | privateFields.js:36:3:38:3 | static ... bj;\\n } |
| staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} | staticConstructor.js:1:15:1:14 | constructor() {} |
| staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} | staticConstructor.js:2:3:2:59 | static ... tor"; } |
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} | staticInitializer.js:2:3:2:15 | static x = 1; |
@@ -137,6 +152,10 @@ test_MethodNames
| privateFields.js:10:2:12:2 | equals( ... ecl;\\n\\t} | equals |
| privateFields.js:14:2:17:2 | writes( ... = 5;\\n\\t} | writes |
| privateFields.js:23:2:26:2 | calls() ... l();\\n\\t} | calls |
| privateFields.js:29:9:29:8 | constructor() {} | constructor |
| privateFields.js:32:3:32:14 | #method() {} | #method |
| privateFields.js:34:3:34:18 | get #getter() {} | #getter |
| privateFields.js:36:3:38:3 | static ... bj;\\n } | isC |
| staticConstructor.js:1:15:1:14 | constructor() {} | constructor |
| staticConstructor.js:2:3:2:59 | static ... tor"; } | constructor |
| staticInitializer.js:3:3:5:3 | constru ... 2;\\n } | constructor |
@@ -157,6 +176,7 @@ test_SyntheticConstructors
| dataflow.js:4:12:4:11 | constructor() {} |
| fields.js:1:9:1:8 | constructor() {} |
| privateFields.js:1:11:1:10 | constructor() {} |
| privateFields.js:29:9:29:8 | constructor() {} |
| staticConstructor.js:1:15:1:14 | constructor() {} |
| tst.js:11:9:11:8 | constructor() {} |
test_ConstructorDefinitions
@@ -165,6 +185,7 @@ test_ConstructorDefinitions
| points.js:2:3:5:3 | constru ... y;\\n } |
| points.js:21:3:24:3 | constru ... c;\\n } |
| privateFields.js:1:11:1:10 | constructor() {} |
| privateFields.js:29:9:29:8 | constructor() {} |
| staticConstructor.js:1:15:1:14 | constructor() {} |
| staticInitializer.js:3:3:5:3 | constru ... 2;\\n } |
| tst.js:2:3:2:50 | "constr ... r. */ } |
@@ -176,6 +197,7 @@ test_ClassNodeConstructor
| points.js:1:1:18:1 | class P ... ;\\n }\\n} | points.js:2:14:5:3 | (x, y) ... y;\\n } |
| points.js:20:1:33:1 | class C ... ;\\n }\\n} | points.js:21:14:24:3 | (x, y, ... c;\\n } |
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | privateFields.js:1:11:1:10 | () {} |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | privateFields.js:29:9:29:8 | () {} |
| staticConstructor.js:1:1:3:1 | class M ... r"; }\\n} | staticConstructor.js:1:15:1:14 | () {} |
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} | staticInitializer.js:3:14:5:3 | () {\\n ... 2;\\n } |
| tst.js:1:9:4:1 | class { ... */ }\\n} | tst.js:2:16:2:50 | () { /* ... r. */ } |
@@ -190,6 +212,7 @@ test_ClassNodeInstanceMethod
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | equals | privateFields.js:10:8:12:2 | (o) {\\n\\t ... ecl;\\n\\t} |
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | reads | privateFields.js:4:7:8:2 | () {\\n\\t\\t ... #if;\\n\\t} |
| privateFields.js:1:1:27:1 | class F ... );\\n\\t}\\n} | writes | privateFields.js:14:8:17:2 | () {\\n\\t\\t ... = 5;\\n\\t} |
| privateFields.js:29:1:39:1 | class C ... ;\\n }\\n} | #method | privateFields.js:32:10:32:14 | () {} |
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} | foo | staticInitializer.js:9:6:11:3 | () {\\n ... 4;\\n } |
| tst.js:1:9:4:1 | class { ... */ }\\n} | constructor | tst.js:3:18:3:56 | () { /* ... r. */ } |
| tst.js:11:1:14:1 | class C ... () {}\\n} | m | tst.js:12:4:12:8 | () {} |
@@ -240,6 +263,10 @@ getAccessModifier
| privateFields.js:23:2:26:2 | calls() ... l();\\n\\t} | privateFields.js:23:2:23:6 | calls | Public |
| privateFields.js:24:3:24:16 | this.#privDecl | privateFields.js:24:8:24:16 | #privDecl | Private |
| privateFields.js:25:7:25:20 | this.#privDecl | privateFields.js:25:12:25:20 | #privDecl | Private |
| privateFields.js:29:9:29:8 | constructor() {} | privateFields.js:29:9:29:8 | constructor | Public |
| privateFields.js:32:3:32:14 | #method() {} | privateFields.js:32:3:32:9 | #method | Private |
| privateFields.js:34:3:34:18 | get #getter() {} | privateFields.js:34:7:34:13 | #getter | Private |
| privateFields.js:36:3:38:3 | static ... bj;\\n } | privateFields.js:36:10:36:12 | isC | Public |
| staticConstructor.js:1:15:1:14 | constructor() {} | staticConstructor.js:1:15:1:14 | constructor | Public |
| staticConstructor.js:2:3:2:59 | static ... tor"; } | staticConstructor.js:2:10:2:20 | constructor | Public |
| staticConstructor.js:4:1:4:11 | console.log | staticConstructor.js:4:9:4:11 | log | Public |
@@ -266,3 +293,22 @@ dataflow
staticInitializer
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} | staticInitializer.js:6:10:8:3 | {\\n M ... 3;\\n } |
| staticInitializer.js:1:1:18:1 | class M ... ;\\n }\\n} | staticInitializer.js:15:10:17:3 | {\\n t ... 6;\\n } |
privateIdentifier
| dataflow.js:5:3:5:7 | #priv |
| dataflow.js:7:16:7:20 | #priv |
| privateFields.js:2:2:2:10 | #privDecl |
| privateFields.js:3:2:3:4 | #if |
| privateFields.js:5:18:5:25 | #privUse |
| privateFields.js:7:18:7:20 | #if |
| privateFields.js:11:15:11:23 | #privDecl |
| privateFields.js:11:31:11:39 | #privDecl |
| privateFields.js:15:8:15:16 | #privDecl |
| privateFields.js:19:2:19:12 | #privSecond |
| privateFields.js:24:8:24:16 | #privDecl |
| privateFields.js:25:12:25:20 | #privDecl |
| privateFields.js:30:3:30:8 | #brand |
| privateFields.js:32:3:32:9 | #method |
| privateFields.js:34:7:34:13 | #getter |
| privateFields.js:37:12:37:17 | #brand |
| privateFields.js:37:29:37:35 | #method |
| privateFields.js:37:47:37:53 | #getter |

View File

@@ -74,3 +74,5 @@ query predicate dataflow(DataFlow::Node pred, DataFlow::Node succ) {
}
query BlockStmt staticInitializer(ClassDefinition cd) { result = cd.getAStaticInitializerBlock() }
query Identifier privateIdentifier() { result.getName().matches("#%") }

View File

@@ -2,5 +2,7 @@ underlyingTypeNode
| foo | Bar | foo.ts:3:1:5:1 | use (instance (member Bar (member exports (module foo)))) |
| foo | Bar | foo.ts:3:12:3:12 | use (instance (member Bar (member exports (module foo)))) |
#select
| foo.ts:3:12:3:12 | x | foo.Bar in unknown scope |
| foo.ts:4:10:4:10 | x | foo.Bar in unknown scope |
| tst.ts:8:14:8:16 | arg | Base in global scope |
| tst.ts:8:14:8:16 | arg | Sub in global scope |

View File

@@ -1,8 +1,22 @@
getTypeString
| bar/client.ts:9:23:9:27 | Inter | Inter |
| bar/client.ts:10:12:10:14 | Bar | Bar |
| foo/index.ts:2:10:2:12 | Bar | Bar |
| foo/index.ts:7:18:7:22 | Inter | Inter |
| foo/index.ts:8:10:8:12 | Bar | Bar |
importSpec
| false | bar/client.ts:1:10:1:12 | Foo |
| false | bar/client.ts:7:10:7:20 | Foo as Foo2 |
| true | bar/client.ts:7:23:7:32 | type Inter |
| true | bar/client.ts:7:35:7:42 | type Bar |
#select
| bar/client.ts:3:5:3:5 | f | my-awesome-package | Foo |
| bar/client.ts:3:9:3:17 | new Foo() | my-awesome-package | Foo |
| bar/client.ts:4:5:4:5 | b | my-awesome-package | Bar |
| bar/client.ts:4:9:4:9 | f | my-awesome-package | Foo |
| bar/client.ts:4:9:4:15 | f.bar() | my-awesome-package | Bar |
| bar/client.ts:11:16:11:24 | new Foo() | my-awesome-package | Foo |
| bar/client.ts:11:16:11:30 | new Foo().bar() | my-awesome-package | Bar |
| foo/index.ts:1:14:1:16 | Foo | my-awesome-package | Foo |
| foo/index.ts:2:23:2:31 | new Bar() | my-awesome-package | Bar |
| foo/index.ts:5:14:5:16 | Bar | my-awesome-package | Bar |

View File

@@ -1,5 +1,11 @@
import javascript
query string getTypeString(TypeExpr te) { result = te.getType().toString() }
query ImportSpecifier importSpec(boolean typeOnly) {
if result.isTypeOnly() then typeOnly = true else typeOnly = false
}
from Expr e, string mod, string name
where e.getType().(TypeReference).hasQualifiedName(mod, name)
select e, mod, name

View File

@@ -2,3 +2,12 @@ import { Foo } from "../foo";
let f = new Foo();
let b = f.bar();
import { Foo as Foo2, type Inter, type Bar } from "../foo";
class Impl implements Inter {
bar(): Bar {
return new Foo().bar();
}
}

View File

@@ -3,3 +3,7 @@ export class Foo {
}
export class Bar {}
export interface Inter {
bar(): Bar;
}

View File

@@ -16,8 +16,12 @@
| reexport-all-client.ts:4:9:4:14 | ns.G.C | G.C in library-tests/TypeScript/QualifiedNameResolution/namespaces.ts |
| reexport-all-client.ts:5:9:5:11 | G.C | G.C in library-tests/TypeScript/QualifiedNameResolution/namespaces.ts |
| reexport-all-client.ts:6:9:6:13 | G.J.C | G.J.C in library-tests/TypeScript/QualifiedNameResolution/namespaces.ts |
| reexport-all-client.ts:8:8:8:10 | D.F | D.F in unknown scope |
| reexport-all-client.ts:9:8:9:13 | ns.D.F | ns.D.F in unknown scope |
| reexport-all-client.ts:11:8:11:16 | ns.Banana | Banana in library-tests/TypeScript/QualifiedNameResolution/export-class.ts |
| reexport-named-client.ts:4:9:4:14 | ns.G.C | G.C in library-tests/TypeScript/QualifiedNameResolution/namespaces.ts |
| reexport-named-client.ts:5:9:5:11 | G.C | G.C in library-tests/TypeScript/QualifiedNameResolution/namespaces.ts |
| reexport-named-client.ts:6:9:6:13 | G.J.C | G.J.C in library-tests/TypeScript/QualifiedNameResolution/namespaces.ts |
| reexport-named-client.ts:8:8:8:10 | X.F | X.F in unknown scope |
| reexport-named-client.ts:9:8:9:13 | ns.X.F | ns.X.F in unknown scope |
| reexport-named-client.ts:11:9:11:9 | Y | Banana in library-tests/TypeScript/QualifiedNameResolution/export-class.ts |

View File

@@ -1,4 +1,4 @@
| bar.ts:1:10:1:10 | A | any |
| bar.ts:1:10:1:10 | A | any |
| bar.ts:1:19:1:29 | "@blah/foo" | any |
| bar.ts:3:5:3:5 | x | any |
| bar.ts:3:5:3:5 | x | A |

View File

@@ -105,6 +105,9 @@ 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 | (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) |
@@ -790,17 +793,142 @@ nodes
| tst.ts:189:19:189:21 | [VarRef] Foo | semmle.label | [VarRef] Foo |
| tst.ts:189:19:189:28 | [DotExpr] Foo.#count | semmle.label | [DotExpr] Foo.#count |
| tst.ts:189:23:189:28 | [Label] #count | semmle.label | [Label] #count |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | semmle.label | [NamespaceDeclaration] module ... } } } |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | semmle.order | 57 |
| tst.ts:195:8:195:11 | [VarDecl] TS45 | semmle.label | [VarDecl] TS45 |
| tst.ts:197:3:197:36 | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; |
| tst.ts:197:8:197:8 | [Identifier] A | semmle.label | [Identifier] A |
| tst.ts:197:12:197:18 | [LocalTypeAccess] Awaited | semmle.label | [LocalTypeAccess] Awaited |
| tst.ts:197:12:197:35 | [GenericTypeExpr] Awaited ... tring>> | semmle.label | [GenericTypeExpr] Awaited ... tring>> |
| tst.ts:197:20:197:26 | [LocalTypeAccess] Promise | semmle.label | [LocalTypeAccess] Promise |
| tst.ts:197:20:197:34 | [GenericTypeExpr] Promise<string> | semmle.label | [GenericTypeExpr] Promise<string> |
| tst.ts:197:28:197:33 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tst.ts:200:3:200:45 | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; |
| tst.ts:200:8:200:8 | [Identifier] B | semmle.label | [Identifier] B |
| tst.ts:200:12:200:18 | [LocalTypeAccess] Awaited | semmle.label | [LocalTypeAccess] Awaited |
| tst.ts:200:12:200:44 | [GenericTypeExpr] Awaited ... mber>>> | semmle.label | [GenericTypeExpr] Awaited ... mber>>> |
| tst.ts:200:20:200:26 | [LocalTypeAccess] Promise | semmle.label | [LocalTypeAccess] Promise |
| tst.ts:200:20:200:43 | [GenericTypeExpr] Promise ... umber>> | semmle.label | [GenericTypeExpr] Promise ... umber>> |
| tst.ts:200:28:200:34 | [LocalTypeAccess] Promise | semmle.label | [LocalTypeAccess] Promise |
| tst.ts:200:28:200:42 | [GenericTypeExpr] Promise<number> | semmle.label | [GenericTypeExpr] Promise<number> |
| tst.ts:200:36:200:41 | [KeywordTypeExpr] number | semmle.label | [KeywordTypeExpr] number |
| tst.ts:203:3:203:46 | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; | semmle.label | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; |
| tst.ts:203:8:203:8 | [Identifier] C | semmle.label | [Identifier] C |
| tst.ts:203:12:203:18 | [LocalTypeAccess] Awaited | semmle.label | [LocalTypeAccess] Awaited |
| tst.ts:203:12:203:45 | [GenericTypeExpr] Awaited ... umber>> | semmle.label | [GenericTypeExpr] Awaited ... umber>> |
| tst.ts:203:20:203:26 | [KeywordTypeExpr] boolean | semmle.label | [KeywordTypeExpr] boolean |
| tst.ts:203:20:203:44 | [UnionTypeExpr] boolean ... number> | semmle.label | [UnionTypeExpr] boolean ... number> |
| tst.ts:203:30:203:36 | [LocalTypeAccess] Promise | semmle.label | [LocalTypeAccess] Promise |
| tst.ts:203:30:203:44 | [GenericTypeExpr] Promise<number> | semmle.label | [GenericTypeExpr] Promise<number> |
| tst.ts:203:38:203:43 | [KeywordTypeExpr] number | semmle.label | [KeywordTypeExpr] number |
| tst.ts:205:3:208:3 | [ExportDeclaration] export ... ng; } | semmle.label | [ExportDeclaration] export ... ng; } |
| tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | semmle.label | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } |
| tst.ts:205:20:205:26 | [Identifier] Success | semmle.label | [Identifier] Success |
| tst.ts:206:5:206:8 | [Label] type | semmle.label | [Label] type |
| tst.ts:206:5:206:29 | [FieldDeclaration] type: ` ... ccess`; | semmle.label | [FieldDeclaration] type: ` ... ccess`; |
| tst.ts:206:11:206:28 | [TemplateLiteralTypeExpr] `${string}Success` | semmle.label | [TemplateLiteralTypeExpr] `${string}Success` |
| tst.ts:206:14:206:19 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tst.ts:206:21:206:27 | [LiteralTypeExpr] Success | semmle.label | [LiteralTypeExpr] Success |
| tst.ts:207:5:207:8 | [Label] body | semmle.label | [Label] body |
| tst.ts:207:5:207:17 | [FieldDeclaration] body: string; | semmle.label | [FieldDeclaration] body: string; |
| tst.ts:207:11:207:16 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tst.ts:210:3:213:3 | [ExportDeclaration] export ... ng; } | semmle.label | [ExportDeclaration] export ... ng; } |
| tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | semmle.label | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } |
| tst.ts:210:20:210:24 | [Identifier] Error | semmle.label | [Identifier] Error |
| tst.ts:211:7:211:10 | [Label] type | semmle.label | [Label] type |
| tst.ts:211:7:211:29 | [FieldDeclaration] type: ` ... Error`; | semmle.label | [FieldDeclaration] type: ` ... Error`; |
| tst.ts:211:13:211:28 | [TemplateLiteralTypeExpr] `${string}Error` | semmle.label | [TemplateLiteralTypeExpr] `${string}Error` |
| tst.ts:211:16:211:21 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tst.ts:211:23:211:27 | [LiteralTypeExpr] Error | semmle.label | [LiteralTypeExpr] Error |
| tst.ts:212:7:212:13 | [Label] message | semmle.label | [Label] message |
| tst.ts:212:7:212:22 | [FieldDeclaration] message: string; | semmle.label | [FieldDeclaration] message: string; |
| tst.ts:212:16:212:21 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tst.ts:215:3:220:3 | [ExportDeclaration] export ... } } | semmle.label | [ExportDeclaration] export ... } } |
| tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | semmle.label | [FunctionDeclStmt] functio ... } } |
| tst.ts:215:19:215:25 | [VarDecl] handler | semmle.label | [VarDecl] handler |
| tst.ts:215:27:215:27 | [SimpleParameter] r | semmle.label | [SimpleParameter] r |
| tst.ts:215:30:215:36 | [LocalTypeAccess] Success | semmle.label | [LocalTypeAccess] Success |
| tst.ts:215:30:215:44 | [UnionTypeExpr] Success \| Error | semmle.label | [UnionTypeExpr] Success \| Error |
| tst.ts:215:40:215:44 | [LocalTypeAccess] Error | semmle.label | [LocalTypeAccess] Error |
| tst.ts:215:47:220:3 | [BlockStmt] { ... } } | semmle.label | [BlockStmt] { ... } } |
| tst.ts:216:7:219:7 | [IfStmt] if (r.t ... } | semmle.label | [IfStmt] if (r.t ... } |
| tst.ts:216:11:216:11 | [VarRef] r | semmle.label | [VarRef] r |
| tst.ts:216:11:216:16 | [DotExpr] r.type | semmle.label | [DotExpr] r.type |
| tst.ts:216:11:216:34 | [BinaryExpr] r.type ... uccess" | semmle.label | [BinaryExpr] r.type ... uccess" |
| tst.ts:216:13:216:16 | [Label] type | semmle.label | [Label] type |
| tst.ts:216:22:216:34 | [Literal] "HttpSuccess" | semmle.label | [Literal] "HttpSuccess" |
| tst.ts:216:37:219:7 | [BlockStmt] { ... } | semmle.label | [BlockStmt] { ... } |
| tst.ts:218:11:218:29 | [DeclStmt] let token = ... | semmle.label | [DeclStmt] let token = ... |
| tst.ts:218:15:218:19 | [VarDecl] token | semmle.label | [VarDecl] token |
| tst.ts:218:15:218:28 | [VariableDeclarator] token = r.body | semmle.label | [VariableDeclarator] token = r.body |
| tst.ts:218:23:218:23 | [VarRef] r | semmle.label | [VarRef] r |
| tst.ts:218:23:218:28 | [DotExpr] r.body | semmle.label | [DotExpr] r.body |
| tst.ts:218:25:218:28 | [Label] body | semmle.label | [Label] body |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | semmle.label | [ClassDefinition,TypeDefinition] class P ... } } |
| tst.ts:222:9:222:14 | [VarDecl] Person | semmle.label | [VarDecl] Person |
| tst.ts:223:5:223:9 | [Label] #name | semmle.label | [Label] #name |
| tst.ts:223:5:223:18 | [FieldDeclaration] #name: string; | semmle.label | [FieldDeclaration] #name: string; |
| tst.ts:223:12:223:17 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tst.ts:224:5:226:5 | [ClassInitializedMember,ConstructorDefinition] constru ... ; } | semmle.label | [ClassInitializedMember,ConstructorDefinition] constru ... ; } |
| tst.ts:224:5:226:5 | [FunctionExpr] constru ... ; } | semmle.label | [FunctionExpr] constru ... ; } |
| tst.ts:224:5:226:5 | [Label] constructor | semmle.label | [Label] constructor |
| tst.ts:224:17:224:20 | [SimpleParameter] name | semmle.label | [SimpleParameter] name |
| tst.ts:224:23:224:28 | [KeywordTypeExpr] string | semmle.label | [KeywordTypeExpr] string |
| tst.ts:224:31:226:5 | [BlockStmt] { ... ; } | semmle.label | [BlockStmt] { ... ; } |
| tst.ts:225:9:225:12 | [ThisExpr] this | semmle.label | [ThisExpr] this |
| tst.ts:225:9:225:18 | [DotExpr] this.#name | semmle.label | [DotExpr] this.#name |
| tst.ts:225:9:225:25 | [AssignExpr] this.#name = name | semmle.label | [AssignExpr] this.#name = name |
| tst.ts:225:9:225:26 | [ExprStmt] this.#name = name; | semmle.label | [ExprStmt] this.#name = name; |
| tst.ts:225:14:225:18 | [Label] #name | semmle.label | [Label] #name |
| tst.ts:225:22:225:25 | [VarRef] name | semmle.label | [VarRef] name |
| tst.ts:228:5:228:10 | [Label] equals | semmle.label | [Label] equals |
| tst.ts:228:5:233:5 | [ClassInitializedMember,MethodDefinition] equals( ... . } | semmle.label | [ClassInitializedMember,MethodDefinition] equals( ... . } |
| tst.ts:228:5:233:5 | [FunctionExpr] equals( ... . } | semmle.label | [FunctionExpr] equals( ... . } |
| tst.ts:228:12:228:16 | [SimpleParameter] other | semmle.label | [SimpleParameter] other |
| tst.ts:228:19:228:25 | [KeywordTypeExpr] unknown | semmle.label | [KeywordTypeExpr] unknown |
| tst.ts:228:28:233:5 | [BlockStmt] { ... . } | semmle.label | [BlockStmt] { ... . } |
| tst.ts:229:9:232:39 | [ReturnStmt] return ... .#name; | semmle.label | [ReturnStmt] return ... .#name; |
| tst.ts:229:16:229:20 | [VarRef] other | semmle.label | [VarRef] other |
| tst.ts:229:16:230:37 | [BinaryExpr] other & ... object" | semmle.label | [BinaryExpr] other & ... object" |
| tst.ts:229:16:231:26 | [BinaryExpr] other & ... n other | semmle.label | [BinaryExpr] other & ... n other |
| tst.ts:229:16:232:38 | [BinaryExpr] other & ... r.#name | semmle.label | [BinaryExpr] other & ... r.#name |
| tst.ts:230:13:230:24 | [UnaryExpr] typeof other | semmle.label | [UnaryExpr] typeof other |
| tst.ts:230:13:230:37 | [BinaryExpr] typeof ... object" | semmle.label | [BinaryExpr] typeof ... object" |
| tst.ts:230:20:230:24 | [VarRef] other | semmle.label | [VarRef] other |
| tst.ts:230:30:230:37 | [Literal] "object" | semmle.label | [Literal] "object" |
| tst.ts:231:13:231:17 | [Label] #name | semmle.label | [Label] #name |
| tst.ts:231:13:231:26 | [BinaryExpr] #name in other | semmle.label | [BinaryExpr] #name in other |
| tst.ts:231:22:231:26 | [VarRef] other | semmle.label | [VarRef] other |
| tst.ts:232:13:232:16 | [ThisExpr] this | semmle.label | [ThisExpr] this |
| tst.ts:232:13:232:22 | [DotExpr] this.#name | semmle.label | [DotExpr] this.#name |
| tst.ts:232:13:232:38 | [BinaryExpr] this.#n ... r.#name | semmle.label | [BinaryExpr] this.#n ... r.#name |
| tst.ts:232:18:232:22 | [Label] #name | semmle.label | [Label] #name |
| tst.ts:232:28:232:32 | [VarRef] other | semmle.label | [VarRef] other |
| tst.ts:232:28:232:38 | [DotExpr] other.#name | semmle.label | [DotExpr] other.#name |
| tst.ts:232:34:232:38 | [Label] #name | semmle.label | [Label] #name |
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | semmle.label | [ImportDeclaration] import ... son" }; |
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | semmle.order | 58 |
| tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.label | [ImportSpecifier] * as Foo3 |
| tst.ts:237:13:237:16 | [VarDecl] Foo3 | semmle.label | [VarDecl] Foo3 |
| tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.label | [Literal] "./something.json" |
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | semmle.label | [DeclStmt] var foo = ... |
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | semmle.order | 59 |
| tst.ts:238:5:238:7 | [VarDecl] foo | semmle.label | [VarDecl] foo |
| tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | semmle.label | [VariableDeclarator] foo = Foo3.foo |
| tst.ts:238:11:238:14 | [VarRef] Foo3 | semmle.label | [VarRef] Foo3 |
| tst.ts:238:11:238:18 | [DotExpr] Foo3.foo | semmle.label | [DotExpr] Foo3.foo |
| tst.ts:238:16:238:18 | [Label] foo | semmle.label | [Label] foo |
| 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 | 57 |
| type_alias.ts:1:1:1:17 | [TypeAliasDeclaration,TypeDefinition] type B = boolean; | semmle.order | 60 |
| 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 | 58 |
| type_alias.ts:3:1:3:9 | [DeclStmt] var b = ... | semmle.order | 61 |
| 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 | 59 |
| type_alias.ts:5:1:5:50 | [TypeAliasDeclaration,TypeDefinition] type Va ... ay<T>>; | semmle.order | 62 |
| 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 |
@@ -812,14 +940,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 | 60 |
| type_alias.ts:7:1:7:28 | [DeclStmt] var c = ... | semmle.order | 63 |
| 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 | 61 |
| type_alias.ts:9:1:15:13 | [TypeAliasDeclaration,TypeDefinition] type Js ... Json[]; | semmle.order | 64 |
| 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 |
@@ -835,12 +963,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 | 62 |
| type_alias.ts:17:1:17:15 | [DeclStmt] var json = ... | semmle.order | 65 |
| 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 | 63 |
| type_alias.ts:19:1:21:57 | [TypeAliasDeclaration,TypeDefinition] type Vi ... ode[]]; | semmle.order | 66 |
| 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 |
@@ -856,7 +984,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 | 64 |
| type_alias.ts:23:1:27:6 | [DeclStmt] const myNode = ... | semmle.order | 67 |
| 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 |
@@ -881,12 +1009,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 | 65 |
| type_definition_objects.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.order | 68 |
| 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 | 66 |
| type_definition_objects.ts:3:1:3:17 | [ExportDeclaration] export class C {} | semmle.order | 69 |
| 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] {} |
@@ -894,36 +1022,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 | 67 |
| type_definition_objects.ts:4:1:4:17 | [DeclStmt] let classObj = ... | semmle.order | 70 |
| 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 | 68 |
| type_definition_objects.ts:6:1:6:16 | [ExportDeclaration] export enum E {} | semmle.order | 71 |
| 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 | 69 |
| type_definition_objects.ts:7:1:7:16 | [DeclStmt] let enumObj = ... | semmle.order | 72 |
| 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 | 70 |
| type_definition_objects.ts:9:1:9:22 | [ExportDeclaration] export ... e N {;} | semmle.order | 73 |
| 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 | 71 |
| type_definition_objects.ts:10:1:10:21 | [DeclStmt] let namespaceObj = ... | semmle.order | 74 |
| 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 | 72 |
| type_definitions.ts:1:1:1:33 | [ImportDeclaration] import ... dummy"; | semmle.order | 75 |
| 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 | 73 |
| type_definitions.ts:3:1:5:1 | [InterfaceDeclaration,TypeDefinition] interfa ... x: S; } | semmle.order | 76 |
| 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 |
@@ -931,14 +1059,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 | 74 |
| type_definitions.ts:6:1:6:16 | [DeclStmt] let i = ... | semmle.order | 77 |
| 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 | 75 |
| type_definitions.ts:8:1:10:1 | [ClassDefinition,TypeDefinition] class C ... x: T } | semmle.order | 78 |
| 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() {} |
@@ -950,14 +1078,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 | 76 |
| type_definitions.ts:11:1:11:17 | [DeclStmt] let c = ... | semmle.order | 79 |
| 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 | 77 |
| type_definitions.ts:13:1:15:1 | [EnumDeclaration,TypeDefinition] enum Co ... blue } | semmle.order | 80 |
| 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 |
@@ -966,29 +1094,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 | 78 |
| type_definitions.ts:16:1:16:17 | [DeclStmt] let color = ... | semmle.order | 81 |
| 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 | 79 |
| type_definitions.ts:18:1:18:33 | [EnumDeclaration,TypeDefinition] enum En ... ember } | semmle.order | 82 |
| 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 | 80 |
| type_definitions.ts:19:1:19:25 | [DeclStmt] let e = ... | semmle.order | 83 |
| 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 | 81 |
| type_definitions.ts:21:1:21:20 | [TypeAliasDeclaration,TypeDefinition] type Alias<T> = T[]; | semmle.order | 84 |
| 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 | 82 |
| type_definitions.ts:22:1:22:39 | [DeclStmt] let aliasForNumberArray = ... | semmle.order | 85 |
| 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 |
@@ -1159,6 +1287,12 @@ edges
| file://:0:0:0:0 | (Parameters) | tst.ts:166:8:166:10 | [SimpleParameter] key | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:172:8:172:14 | [SimpleParameter] optName | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:172:8:172:14 | [SimpleParameter] optName | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:215:27:215:27 | [SimpleParameter] r | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:215:27:215:27 | [SimpleParameter] r | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:224:17:224:20 | [SimpleParameter] name | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:224:17:224:20 | [SimpleParameter] name | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:228:12:228:16 | [SimpleParameter] other | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.ts:228:12:228:16 | [SimpleParameter] other | semmle.order | 0 |
| 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 |
@@ -2353,6 +2487,244 @@ edges
| tst.ts:189:19:189:28 | [DotExpr] Foo.#count | tst.ts:189:19:189:21 | [VarRef] Foo | semmle.order | 1 |
| tst.ts:189:19:189:28 | [DotExpr] Foo.#count | tst.ts:189:23:189:28 | [Label] #count | semmle.label | 2 |
| tst.ts:189:19:189:28 | [DotExpr] Foo.#count | tst.ts:189:23:189:28 | [Label] #count | semmle.order | 2 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:195:8:195:11 | [VarDecl] TS45 | semmle.label | 1 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:195:8:195:11 | [VarDecl] TS45 | semmle.order | 1 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:197:3:197:36 | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; | semmle.label | 2 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:197:3:197:36 | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; | semmle.order | 2 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:200:3:200:45 | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; | semmle.label | 3 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:200:3:200:45 | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; | semmle.order | 3 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:203:3:203:46 | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; | semmle.label | 4 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:203:3:203:46 | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; | semmle.order | 4 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:205:3:208:3 | [ExportDeclaration] export ... ng; } | semmle.label | 5 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:205:3:208:3 | [ExportDeclaration] export ... ng; } | semmle.order | 5 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:210:3:213:3 | [ExportDeclaration] export ... ng; } | semmle.label | 6 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:210:3:213:3 | [ExportDeclaration] export ... ng; } | semmle.order | 6 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:215:3:220:3 | [ExportDeclaration] export ... } } | semmle.label | 7 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:215:3:220:3 | [ExportDeclaration] export ... } } | semmle.order | 7 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | semmle.label | 8 |
| tst.ts:195:1:235:1 | [NamespaceDeclaration] module ... } } } | tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | semmle.order | 8 |
| tst.ts:197:3:197:36 | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; | tst.ts:197:8:197:8 | [Identifier] A | semmle.label | 1 |
| tst.ts:197:3:197:36 | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; | tst.ts:197:8:197:8 | [Identifier] A | semmle.order | 1 |
| tst.ts:197:3:197:36 | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; | tst.ts:197:12:197:35 | [GenericTypeExpr] Awaited ... tring>> | semmle.label | 2 |
| tst.ts:197:3:197:36 | [TypeAliasDeclaration,TypeDefinition] type A ... ring>>; | tst.ts:197:12:197:35 | [GenericTypeExpr] Awaited ... tring>> | semmle.order | 2 |
| tst.ts:197:12:197:35 | [GenericTypeExpr] Awaited ... tring>> | tst.ts:197:12:197:18 | [LocalTypeAccess] Awaited | semmle.label | 1 |
| tst.ts:197:12:197:35 | [GenericTypeExpr] Awaited ... tring>> | tst.ts:197:12:197:18 | [LocalTypeAccess] Awaited | semmle.order | 1 |
| tst.ts:197:12:197:35 | [GenericTypeExpr] Awaited ... tring>> | tst.ts:197:20:197:34 | [GenericTypeExpr] Promise<string> | semmle.label | 2 |
| tst.ts:197:12:197:35 | [GenericTypeExpr] Awaited ... tring>> | tst.ts:197:20:197:34 | [GenericTypeExpr] Promise<string> | semmle.order | 2 |
| tst.ts:197:20:197:34 | [GenericTypeExpr] Promise<string> | tst.ts:197:20:197:26 | [LocalTypeAccess] Promise | semmle.label | 1 |
| tst.ts:197:20:197:34 | [GenericTypeExpr] Promise<string> | tst.ts:197:20:197:26 | [LocalTypeAccess] Promise | semmle.order | 1 |
| tst.ts:197:20:197:34 | [GenericTypeExpr] Promise<string> | tst.ts:197:28:197:33 | [KeywordTypeExpr] string | semmle.label | 2 |
| tst.ts:197:20:197:34 | [GenericTypeExpr] Promise<string> | tst.ts:197:28:197:33 | [KeywordTypeExpr] string | semmle.order | 2 |
| tst.ts:200:3:200:45 | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; | tst.ts:200:8:200:8 | [Identifier] B | semmle.label | 1 |
| tst.ts:200:3:200:45 | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; | tst.ts:200:8:200:8 | [Identifier] B | semmle.order | 1 |
| tst.ts:200:3:200:45 | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; | tst.ts:200:12:200:44 | [GenericTypeExpr] Awaited ... mber>>> | semmle.label | 2 |
| tst.ts:200:3:200:45 | [TypeAliasDeclaration,TypeDefinition] type B ... ber>>>; | tst.ts:200:12:200:44 | [GenericTypeExpr] Awaited ... mber>>> | semmle.order | 2 |
| tst.ts:200:12:200:44 | [GenericTypeExpr] Awaited ... mber>>> | tst.ts:200:12:200:18 | [LocalTypeAccess] Awaited | semmle.label | 1 |
| tst.ts:200:12:200:44 | [GenericTypeExpr] Awaited ... mber>>> | tst.ts:200:12:200:18 | [LocalTypeAccess] Awaited | semmle.order | 1 |
| tst.ts:200:12:200:44 | [GenericTypeExpr] Awaited ... mber>>> | tst.ts:200:20:200:43 | [GenericTypeExpr] Promise ... umber>> | semmle.label | 2 |
| tst.ts:200:12:200:44 | [GenericTypeExpr] Awaited ... mber>>> | tst.ts:200:20:200:43 | [GenericTypeExpr] Promise ... umber>> | semmle.order | 2 |
| tst.ts:200:20:200:43 | [GenericTypeExpr] Promise ... umber>> | tst.ts:200:20:200:26 | [LocalTypeAccess] Promise | semmle.label | 1 |
| tst.ts:200:20:200:43 | [GenericTypeExpr] Promise ... umber>> | tst.ts:200:20:200:26 | [LocalTypeAccess] Promise | semmle.order | 1 |
| tst.ts:200:20:200:43 | [GenericTypeExpr] Promise ... umber>> | tst.ts:200:28:200:42 | [GenericTypeExpr] Promise<number> | semmle.label | 2 |
| tst.ts:200:20:200:43 | [GenericTypeExpr] Promise ... umber>> | tst.ts:200:28:200:42 | [GenericTypeExpr] Promise<number> | semmle.order | 2 |
| tst.ts:200:28:200:42 | [GenericTypeExpr] Promise<number> | tst.ts:200:28:200:34 | [LocalTypeAccess] Promise | semmle.label | 1 |
| tst.ts:200:28:200:42 | [GenericTypeExpr] Promise<number> | tst.ts:200:28:200:34 | [LocalTypeAccess] Promise | semmle.order | 1 |
| tst.ts:200:28:200:42 | [GenericTypeExpr] Promise<number> | tst.ts:200:36:200:41 | [KeywordTypeExpr] number | semmle.label | 2 |
| tst.ts:200:28:200:42 | [GenericTypeExpr] Promise<number> | tst.ts:200:36:200:41 | [KeywordTypeExpr] number | semmle.order | 2 |
| tst.ts:203:3:203:46 | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; | tst.ts:203:8:203:8 | [Identifier] C | semmle.label | 1 |
| tst.ts:203:3:203:46 | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; | tst.ts:203:8:203:8 | [Identifier] C | semmle.order | 1 |
| tst.ts:203:3:203:46 | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; | tst.ts:203:12:203:45 | [GenericTypeExpr] Awaited ... umber>> | semmle.label | 2 |
| tst.ts:203:3:203:46 | [TypeAliasDeclaration,TypeDefinition] type C ... mber>>; | tst.ts:203:12:203:45 | [GenericTypeExpr] Awaited ... umber>> | semmle.order | 2 |
| tst.ts:203:12:203:45 | [GenericTypeExpr] Awaited ... umber>> | tst.ts:203:12:203:18 | [LocalTypeAccess] Awaited | semmle.label | 1 |
| tst.ts:203:12:203:45 | [GenericTypeExpr] Awaited ... umber>> | tst.ts:203:12:203:18 | [LocalTypeAccess] Awaited | semmle.order | 1 |
| tst.ts:203:12:203:45 | [GenericTypeExpr] Awaited ... umber>> | tst.ts:203:20:203:44 | [UnionTypeExpr] boolean ... number> | semmle.label | 2 |
| tst.ts:203:12:203:45 | [GenericTypeExpr] Awaited ... umber>> | tst.ts:203:20:203:44 | [UnionTypeExpr] boolean ... number> | semmle.order | 2 |
| tst.ts:203:20:203:44 | [UnionTypeExpr] boolean ... number> | tst.ts:203:20:203:26 | [KeywordTypeExpr] boolean | semmle.label | 1 |
| tst.ts:203:20:203:44 | [UnionTypeExpr] boolean ... number> | tst.ts:203:20:203:26 | [KeywordTypeExpr] boolean | semmle.order | 1 |
| tst.ts:203:20:203:44 | [UnionTypeExpr] boolean ... number> | tst.ts:203:30:203:44 | [GenericTypeExpr] Promise<number> | semmle.label | 2 |
| tst.ts:203:20:203:44 | [UnionTypeExpr] boolean ... number> | tst.ts:203:30:203:44 | [GenericTypeExpr] Promise<number> | semmle.order | 2 |
| tst.ts:203:30:203:44 | [GenericTypeExpr] Promise<number> | tst.ts:203:30:203:36 | [LocalTypeAccess] Promise | semmle.label | 1 |
| tst.ts:203:30:203:44 | [GenericTypeExpr] Promise<number> | tst.ts:203:30:203:36 | [LocalTypeAccess] Promise | semmle.order | 1 |
| tst.ts:203:30:203:44 | [GenericTypeExpr] Promise<number> | tst.ts:203:38:203:43 | [KeywordTypeExpr] number | semmle.label | 2 |
| tst.ts:203:30:203:44 | [GenericTypeExpr] Promise<number> | tst.ts:203:38:203:43 | [KeywordTypeExpr] number | semmle.order | 2 |
| tst.ts:205:3:208:3 | [ExportDeclaration] export ... ng; } | tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | semmle.label | 1 |
| tst.ts:205:3:208:3 | [ExportDeclaration] export ... ng; } | tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | semmle.order | 1 |
| tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:205:20:205:26 | [Identifier] Success | semmle.label | 1 |
| tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:205:20:205:26 | [Identifier] Success | semmle.order | 1 |
| tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:206:5:206:29 | [FieldDeclaration] type: ` ... ccess`; | semmle.label | 2 |
| tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:206:5:206:29 | [FieldDeclaration] type: ` ... ccess`; | semmle.order | 2 |
| tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:207:5:207:17 | [FieldDeclaration] body: string; | semmle.label | 3 |
| tst.ts:205:10:208:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:207:5:207:17 | [FieldDeclaration] body: string; | semmle.order | 3 |
| tst.ts:206:5:206:29 | [FieldDeclaration] type: ` ... ccess`; | tst.ts:206:5:206:8 | [Label] type | semmle.label | 1 |
| tst.ts:206:5:206:29 | [FieldDeclaration] type: ` ... ccess`; | tst.ts:206:5:206:8 | [Label] type | semmle.order | 1 |
| tst.ts:206:5:206:29 | [FieldDeclaration] type: ` ... ccess`; | tst.ts:206:11:206:28 | [TemplateLiteralTypeExpr] `${string}Success` | semmle.label | 2 |
| tst.ts:206:5:206:29 | [FieldDeclaration] type: ` ... ccess`; | tst.ts:206:11:206:28 | [TemplateLiteralTypeExpr] `${string}Success` | semmle.order | 2 |
| tst.ts:206:11:206:28 | [TemplateLiteralTypeExpr] `${string}Success` | tst.ts:206:14:206:19 | [KeywordTypeExpr] string | semmle.label | 1 |
| tst.ts:206:11:206:28 | [TemplateLiteralTypeExpr] `${string}Success` | tst.ts:206:14:206:19 | [KeywordTypeExpr] string | semmle.order | 1 |
| tst.ts:206:11:206:28 | [TemplateLiteralTypeExpr] `${string}Success` | tst.ts:206:21:206:27 | [LiteralTypeExpr] Success | semmle.label | 2 |
| tst.ts:206:11:206:28 | [TemplateLiteralTypeExpr] `${string}Success` | tst.ts:206:21:206:27 | [LiteralTypeExpr] Success | semmle.order | 2 |
| tst.ts:207:5:207:17 | [FieldDeclaration] body: string; | tst.ts:207:5:207:8 | [Label] body | semmle.label | 1 |
| tst.ts:207:5:207:17 | [FieldDeclaration] body: string; | tst.ts:207:5:207:8 | [Label] body | semmle.order | 1 |
| tst.ts:207:5:207:17 | [FieldDeclaration] body: string; | tst.ts:207:11:207:16 | [KeywordTypeExpr] string | semmle.label | 2 |
| tst.ts:207:5:207:17 | [FieldDeclaration] body: string; | tst.ts:207:11:207:16 | [KeywordTypeExpr] string | semmle.order | 2 |
| tst.ts:210:3:213:3 | [ExportDeclaration] export ... ng; } | tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | semmle.label | 1 |
| tst.ts:210:3:213:3 | [ExportDeclaration] export ... ng; } | tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | semmle.order | 1 |
| tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:210:20:210:24 | [Identifier] Error | semmle.label | 1 |
| tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:210:20:210:24 | [Identifier] Error | semmle.order | 1 |
| tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:211:7:211:29 | [FieldDeclaration] type: ` ... Error`; | semmle.label | 2 |
| tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:211:7:211:29 | [FieldDeclaration] type: ` ... Error`; | semmle.order | 2 |
| tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:212:7:212:22 | [FieldDeclaration] message: string; | semmle.label | 3 |
| tst.ts:210:10:213:3 | [InterfaceDeclaration,TypeDefinition] interfa ... ng; } | tst.ts:212:7:212:22 | [FieldDeclaration] message: string; | semmle.order | 3 |
| tst.ts:211:7:211:29 | [FieldDeclaration] type: ` ... Error`; | tst.ts:211:7:211:10 | [Label] type | semmle.label | 1 |
| tst.ts:211:7:211:29 | [FieldDeclaration] type: ` ... Error`; | tst.ts:211:7:211:10 | [Label] type | semmle.order | 1 |
| tst.ts:211:7:211:29 | [FieldDeclaration] type: ` ... Error`; | tst.ts:211:13:211:28 | [TemplateLiteralTypeExpr] `${string}Error` | semmle.label | 2 |
| tst.ts:211:7:211:29 | [FieldDeclaration] type: ` ... Error`; | tst.ts:211:13:211:28 | [TemplateLiteralTypeExpr] `${string}Error` | semmle.order | 2 |
| tst.ts:211:13:211:28 | [TemplateLiteralTypeExpr] `${string}Error` | tst.ts:211:16:211:21 | [KeywordTypeExpr] string | semmle.label | 1 |
| tst.ts:211:13:211:28 | [TemplateLiteralTypeExpr] `${string}Error` | tst.ts:211:16:211:21 | [KeywordTypeExpr] string | semmle.order | 1 |
| tst.ts:211:13:211:28 | [TemplateLiteralTypeExpr] `${string}Error` | tst.ts:211:23:211:27 | [LiteralTypeExpr] Error | semmle.label | 2 |
| tst.ts:211:13:211:28 | [TemplateLiteralTypeExpr] `${string}Error` | tst.ts:211:23:211:27 | [LiteralTypeExpr] Error | semmle.order | 2 |
| tst.ts:212:7:212:22 | [FieldDeclaration] message: string; | tst.ts:212:7:212:13 | [Label] message | semmle.label | 1 |
| tst.ts:212:7:212:22 | [FieldDeclaration] message: string; | tst.ts:212:7:212:13 | [Label] message | semmle.order | 1 |
| tst.ts:212:7:212:22 | [FieldDeclaration] message: string; | tst.ts:212:16:212:21 | [KeywordTypeExpr] string | semmle.label | 2 |
| tst.ts:212:7:212:22 | [FieldDeclaration] message: string; | tst.ts:212:16:212:21 | [KeywordTypeExpr] string | semmle.order | 2 |
| tst.ts:215:3:220:3 | [ExportDeclaration] export ... } } | tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | semmle.label | 1 |
| tst.ts:215:3:220:3 | [ExportDeclaration] export ... } } | tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | semmle.order | 1 |
| tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | file://:0:0:0:0 | (Parameters) | semmle.label | 1 |
| tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | file://:0:0:0:0 | (Parameters) | semmle.order | 1 |
| tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | tst.ts:215:19:215:25 | [VarDecl] handler | semmle.label | 0 |
| tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | tst.ts:215:19:215:25 | [VarDecl] handler | semmle.order | 0 |
| tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | tst.ts:215:47:220:3 | [BlockStmt] { ... } } | semmle.label | 5 |
| tst.ts:215:10:220:3 | [FunctionDeclStmt] functio ... } } | tst.ts:215:47:220:3 | [BlockStmt] { ... } } | semmle.order | 5 |
| tst.ts:215:27:215:27 | [SimpleParameter] r | tst.ts:215:30:215:44 | [UnionTypeExpr] Success \| Error | semmle.label | 0 |
| tst.ts:215:27:215:27 | [SimpleParameter] r | tst.ts:215:30:215:44 | [UnionTypeExpr] Success \| Error | semmle.order | 0 |
| tst.ts:215:30:215:44 | [UnionTypeExpr] Success \| Error | tst.ts:215:30:215:36 | [LocalTypeAccess] Success | semmle.label | 1 |
| tst.ts:215:30:215:44 | [UnionTypeExpr] Success \| Error | tst.ts:215:30:215:36 | [LocalTypeAccess] Success | semmle.order | 1 |
| tst.ts:215:30:215:44 | [UnionTypeExpr] Success \| Error | tst.ts:215:40:215:44 | [LocalTypeAccess] Error | semmle.label | 2 |
| tst.ts:215:30:215:44 | [UnionTypeExpr] Success \| Error | tst.ts:215:40:215:44 | [LocalTypeAccess] Error | semmle.order | 2 |
| tst.ts:215:47:220:3 | [BlockStmt] { ... } } | tst.ts:216:7:219:7 | [IfStmt] if (r.t ... } | semmle.label | 1 |
| tst.ts:215:47:220:3 | [BlockStmt] { ... } } | tst.ts:216:7:219:7 | [IfStmt] if (r.t ... } | semmle.order | 1 |
| tst.ts:216:7:219:7 | [IfStmt] if (r.t ... } | tst.ts:216:11:216:34 | [BinaryExpr] r.type ... uccess" | semmle.label | 1 |
| tst.ts:216:7:219:7 | [IfStmt] if (r.t ... } | tst.ts:216:11:216:34 | [BinaryExpr] r.type ... uccess" | semmle.order | 1 |
| tst.ts:216:7:219:7 | [IfStmt] if (r.t ... } | tst.ts:216:37:219:7 | [BlockStmt] { ... } | semmle.label | 2 |
| tst.ts:216:7:219:7 | [IfStmt] if (r.t ... } | tst.ts:216:37:219:7 | [BlockStmt] { ... } | semmle.order | 2 |
| tst.ts:216:11:216:16 | [DotExpr] r.type | tst.ts:216:11:216:11 | [VarRef] r | semmle.label | 1 |
| tst.ts:216:11:216:16 | [DotExpr] r.type | tst.ts:216:11:216:11 | [VarRef] r | semmle.order | 1 |
| tst.ts:216:11:216:16 | [DotExpr] r.type | tst.ts:216:13:216:16 | [Label] type | semmle.label | 2 |
| tst.ts:216:11:216:16 | [DotExpr] r.type | tst.ts:216:13:216:16 | [Label] type | semmle.order | 2 |
| tst.ts:216:11:216:34 | [BinaryExpr] r.type ... uccess" | tst.ts:216:11:216:16 | [DotExpr] r.type | semmle.label | 1 |
| tst.ts:216:11:216:34 | [BinaryExpr] r.type ... uccess" | tst.ts:216:11:216:16 | [DotExpr] r.type | semmle.order | 1 |
| tst.ts:216:11:216:34 | [BinaryExpr] r.type ... uccess" | tst.ts:216:22:216:34 | [Literal] "HttpSuccess" | semmle.label | 2 |
| tst.ts:216:11:216:34 | [BinaryExpr] r.type ... uccess" | tst.ts:216:22:216:34 | [Literal] "HttpSuccess" | semmle.order | 2 |
| tst.ts:216:37:219:7 | [BlockStmt] { ... } | tst.ts:218:11:218:29 | [DeclStmt] let token = ... | semmle.label | 1 |
| tst.ts:216:37:219:7 | [BlockStmt] { ... } | tst.ts:218:11:218:29 | [DeclStmt] let token = ... | semmle.order | 1 |
| tst.ts:218:11:218:29 | [DeclStmt] let token = ... | tst.ts:218:15:218:28 | [VariableDeclarator] token = r.body | semmle.label | 1 |
| tst.ts:218:11:218:29 | [DeclStmt] let token = ... | tst.ts:218:15:218:28 | [VariableDeclarator] token = r.body | semmle.order | 1 |
| tst.ts:218:15:218:28 | [VariableDeclarator] token = r.body | tst.ts:218:15:218:19 | [VarDecl] token | semmle.label | 1 |
| tst.ts:218:15:218:28 | [VariableDeclarator] token = r.body | tst.ts:218:15:218:19 | [VarDecl] token | semmle.order | 1 |
| tst.ts:218:15:218:28 | [VariableDeclarator] token = r.body | tst.ts:218:23:218:28 | [DotExpr] r.body | semmle.label | 2 |
| tst.ts:218:15:218:28 | [VariableDeclarator] token = r.body | tst.ts:218:23:218:28 | [DotExpr] r.body | semmle.order | 2 |
| tst.ts:218:23:218:28 | [DotExpr] r.body | tst.ts:218:23:218:23 | [VarRef] r | semmle.label | 1 |
| tst.ts:218:23:218:28 | [DotExpr] r.body | tst.ts:218:23:218:23 | [VarRef] r | semmle.order | 1 |
| tst.ts:218:23:218:28 | [DotExpr] r.body | tst.ts:218:25:218:28 | [Label] body | semmle.label | 2 |
| tst.ts:218:23:218:28 | [DotExpr] r.body | tst.ts:218:25:218:28 | [Label] body | semmle.order | 2 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:222:9:222:14 | [VarDecl] Person | semmle.label | 1 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:222:9:222:14 | [VarDecl] Person | semmle.order | 1 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:223:5:223:18 | [FieldDeclaration] #name: string; | semmle.label | 2 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:223:5:223:18 | [FieldDeclaration] #name: string; | semmle.order | 2 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:224:5:226:5 | [ClassInitializedMember,ConstructorDefinition] constru ... ; } | semmle.label | 3 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:224:5:226:5 | [ClassInitializedMember,ConstructorDefinition] constru ... ; } | semmle.order | 3 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:228:5:233:5 | [ClassInitializedMember,MethodDefinition] equals( ... . } | semmle.label | 4 |
| tst.ts:222:3:234:3 | [ClassDefinition,TypeDefinition] class P ... } } | tst.ts:228:5:233:5 | [ClassInitializedMember,MethodDefinition] equals( ... . } | semmle.order | 4 |
| tst.ts:223:5:223:18 | [FieldDeclaration] #name: string; | tst.ts:223:5:223:9 | [Label] #name | semmle.label | 1 |
| tst.ts:223:5:223:18 | [FieldDeclaration] #name: string; | tst.ts:223:5:223:9 | [Label] #name | semmle.order | 1 |
| tst.ts:223:5:223:18 | [FieldDeclaration] #name: string; | tst.ts:223:12:223:17 | [KeywordTypeExpr] string | semmle.label | 2 |
| tst.ts:223:5:223:18 | [FieldDeclaration] #name: string; | tst.ts:223:12:223:17 | [KeywordTypeExpr] string | semmle.order | 2 |
| tst.ts:224:5:226:5 | [ClassInitializedMember,ConstructorDefinition] constru ... ; } | tst.ts:224:5:226:5 | [FunctionExpr] constru ... ; } | semmle.label | 2 |
| tst.ts:224:5:226:5 | [ClassInitializedMember,ConstructorDefinition] constru ... ; } | tst.ts:224:5:226:5 | [FunctionExpr] constru ... ; } | semmle.order | 2 |
| tst.ts:224:5:226:5 | [ClassInitializedMember,ConstructorDefinition] constru ... ; } | tst.ts:224:5:226:5 | [Label] constructor | semmle.label | 1 |
| tst.ts:224:5:226:5 | [ClassInitializedMember,ConstructorDefinition] constru ... ; } | tst.ts:224:5:226:5 | [Label] constructor | semmle.order | 1 |
| tst.ts:224:5:226:5 | [FunctionExpr] constru ... ; } | file://:0:0:0:0 | (Parameters) | semmle.label | 1 |
| tst.ts:224:5:226:5 | [FunctionExpr] constru ... ; } | file://:0:0:0:0 | (Parameters) | semmle.order | 1 |
| tst.ts:224:5:226:5 | [FunctionExpr] constru ... ; } | tst.ts:224:31:226:5 | [BlockStmt] { ... ; } | semmle.label | 5 |
| tst.ts:224:5:226:5 | [FunctionExpr] constru ... ; } | tst.ts:224:31:226:5 | [BlockStmt] { ... ; } | semmle.order | 5 |
| tst.ts:224:17:224:20 | [SimpleParameter] name | tst.ts:224:23:224:28 | [KeywordTypeExpr] string | semmle.label | 0 |
| tst.ts:224:17:224:20 | [SimpleParameter] name | tst.ts:224:23:224:28 | [KeywordTypeExpr] string | semmle.order | 0 |
| tst.ts:224:31:226:5 | [BlockStmt] { ... ; } | tst.ts:225:9:225:26 | [ExprStmt] this.#name = name; | semmle.label | 1 |
| tst.ts:224:31:226:5 | [BlockStmt] { ... ; } | tst.ts:225:9:225:26 | [ExprStmt] this.#name = name; | semmle.order | 1 |
| tst.ts:225:9:225:18 | [DotExpr] this.#name | tst.ts:225:9:225:12 | [ThisExpr] this | semmle.label | 1 |
| tst.ts:225:9:225:18 | [DotExpr] this.#name | tst.ts:225:9:225:12 | [ThisExpr] this | semmle.order | 1 |
| tst.ts:225:9:225:18 | [DotExpr] this.#name | tst.ts:225:14:225:18 | [Label] #name | semmle.label | 2 |
| tst.ts:225:9:225:18 | [DotExpr] this.#name | tst.ts:225:14:225:18 | [Label] #name | semmle.order | 2 |
| tst.ts:225:9:225:25 | [AssignExpr] this.#name = name | tst.ts:225:9:225:18 | [DotExpr] this.#name | semmle.label | 1 |
| tst.ts:225:9:225:25 | [AssignExpr] this.#name = name | tst.ts:225:9:225:18 | [DotExpr] this.#name | semmle.order | 1 |
| tst.ts:225:9:225:25 | [AssignExpr] this.#name = name | tst.ts:225:22:225:25 | [VarRef] name | semmle.label | 2 |
| tst.ts:225:9:225:25 | [AssignExpr] this.#name = name | tst.ts:225:22:225:25 | [VarRef] name | semmle.order | 2 |
| tst.ts:225:9:225:26 | [ExprStmt] this.#name = name; | tst.ts:225:9:225:25 | [AssignExpr] this.#name = name | semmle.label | 1 |
| tst.ts:225:9:225:26 | [ExprStmt] this.#name = name; | tst.ts:225:9:225:25 | [AssignExpr] this.#name = name | semmle.order | 1 |
| tst.ts:228:5:233:5 | [ClassInitializedMember,MethodDefinition] equals( ... . } | tst.ts:228:5:228:10 | [Label] equals | semmle.label | 1 |
| tst.ts:228:5:233:5 | [ClassInitializedMember,MethodDefinition] equals( ... . } | tst.ts:228:5:228:10 | [Label] equals | semmle.order | 1 |
| tst.ts:228:5:233:5 | [ClassInitializedMember,MethodDefinition] equals( ... . } | tst.ts:228:5:233:5 | [FunctionExpr] equals( ... . } | semmle.label | 2 |
| tst.ts:228:5:233:5 | [ClassInitializedMember,MethodDefinition] equals( ... . } | tst.ts:228:5:233:5 | [FunctionExpr] equals( ... . } | semmle.order | 2 |
| tst.ts:228:5:233:5 | [FunctionExpr] equals( ... . } | file://:0:0:0:0 | (Parameters) | semmle.label | 1 |
| tst.ts:228:5:233:5 | [FunctionExpr] equals( ... . } | file://:0:0:0:0 | (Parameters) | semmle.order | 1 |
| tst.ts:228:5:233:5 | [FunctionExpr] equals( ... . } | tst.ts:228:28:233:5 | [BlockStmt] { ... . } | semmle.label | 5 |
| tst.ts:228:5:233:5 | [FunctionExpr] equals( ... . } | tst.ts:228:28:233:5 | [BlockStmt] { ... . } | semmle.order | 5 |
| tst.ts:228:12:228:16 | [SimpleParameter] other | tst.ts:228:19:228:25 | [KeywordTypeExpr] unknown | semmle.label | 0 |
| tst.ts:228:12:228:16 | [SimpleParameter] other | tst.ts:228:19:228:25 | [KeywordTypeExpr] unknown | semmle.order | 0 |
| tst.ts:228:28:233:5 | [BlockStmt] { ... . } | tst.ts:229:9:232:39 | [ReturnStmt] return ... .#name; | semmle.label | 1 |
| tst.ts:228:28:233:5 | [BlockStmt] { ... . } | tst.ts:229:9:232:39 | [ReturnStmt] return ... .#name; | semmle.order | 1 |
| tst.ts:229:9:232:39 | [ReturnStmt] return ... .#name; | tst.ts:229:16:232:38 | [BinaryExpr] other & ... r.#name | semmle.label | 1 |
| tst.ts:229:9:232:39 | [ReturnStmt] return ... .#name; | tst.ts:229:16:232:38 | [BinaryExpr] other & ... r.#name | semmle.order | 1 |
| tst.ts:229:16:230:37 | [BinaryExpr] other & ... object" | tst.ts:229:16:229:20 | [VarRef] other | semmle.label | 1 |
| tst.ts:229:16:230:37 | [BinaryExpr] other & ... object" | tst.ts:229:16:229:20 | [VarRef] other | semmle.order | 1 |
| tst.ts:229:16:230:37 | [BinaryExpr] other & ... object" | tst.ts:230:13:230:37 | [BinaryExpr] typeof ... object" | semmle.label | 2 |
| tst.ts:229:16:230:37 | [BinaryExpr] other & ... object" | tst.ts:230:13:230:37 | [BinaryExpr] typeof ... object" | semmle.order | 2 |
| tst.ts:229:16:231:26 | [BinaryExpr] other & ... n other | tst.ts:229:16:230:37 | [BinaryExpr] other & ... object" | semmle.label | 1 |
| tst.ts:229:16:231:26 | [BinaryExpr] other & ... n other | tst.ts:229:16:230:37 | [BinaryExpr] other & ... object" | semmle.order | 1 |
| tst.ts:229:16:231:26 | [BinaryExpr] other & ... n other | tst.ts:231:13:231:26 | [BinaryExpr] #name in other | semmle.label | 2 |
| tst.ts:229:16:231:26 | [BinaryExpr] other & ... n other | tst.ts:231:13:231:26 | [BinaryExpr] #name in other | semmle.order | 2 |
| tst.ts:229:16:232:38 | [BinaryExpr] other & ... r.#name | tst.ts:229:16:231:26 | [BinaryExpr] other & ... n other | semmle.label | 1 |
| tst.ts:229:16:232:38 | [BinaryExpr] other & ... r.#name | tst.ts:229:16:231:26 | [BinaryExpr] other & ... n other | semmle.order | 1 |
| tst.ts:229:16:232:38 | [BinaryExpr] other & ... r.#name | tst.ts:232:13:232:38 | [BinaryExpr] this.#n ... r.#name | semmle.label | 2 |
| tst.ts:229:16:232:38 | [BinaryExpr] other & ... r.#name | tst.ts:232:13:232:38 | [BinaryExpr] this.#n ... r.#name | semmle.order | 2 |
| tst.ts:230:13:230:24 | [UnaryExpr] typeof other | tst.ts:230:20:230:24 | [VarRef] other | semmle.label | 1 |
| tst.ts:230:13:230:24 | [UnaryExpr] typeof other | tst.ts:230:20:230:24 | [VarRef] other | semmle.order | 1 |
| tst.ts:230:13:230:37 | [BinaryExpr] typeof ... object" | tst.ts:230:13:230:24 | [UnaryExpr] typeof other | semmle.label | 1 |
| tst.ts:230:13:230:37 | [BinaryExpr] typeof ... object" | tst.ts:230:13:230:24 | [UnaryExpr] typeof other | semmle.order | 1 |
| tst.ts:230:13:230:37 | [BinaryExpr] typeof ... object" | tst.ts:230:30:230:37 | [Literal] "object" | semmle.label | 2 |
| tst.ts:230:13:230:37 | [BinaryExpr] typeof ... object" | tst.ts:230:30:230:37 | [Literal] "object" | semmle.order | 2 |
| tst.ts:231:13:231:26 | [BinaryExpr] #name in other | tst.ts:231:13:231:17 | [Label] #name | semmle.label | 1 |
| tst.ts:231:13:231:26 | [BinaryExpr] #name in other | tst.ts:231:13:231:17 | [Label] #name | semmle.order | 1 |
| tst.ts:231:13:231:26 | [BinaryExpr] #name in other | tst.ts:231:22:231:26 | [VarRef] other | semmle.label | 2 |
| tst.ts:231:13:231:26 | [BinaryExpr] #name in other | tst.ts:231:22:231:26 | [VarRef] other | semmle.order | 2 |
| tst.ts:232:13:232:22 | [DotExpr] this.#name | tst.ts:232:13:232:16 | [ThisExpr] this | semmle.label | 1 |
| tst.ts:232:13:232:22 | [DotExpr] this.#name | tst.ts:232:13:232:16 | [ThisExpr] this | semmle.order | 1 |
| tst.ts:232:13:232:22 | [DotExpr] this.#name | tst.ts:232:18:232:22 | [Label] #name | semmle.label | 2 |
| tst.ts:232:13:232:22 | [DotExpr] this.#name | tst.ts:232:18:232:22 | [Label] #name | semmle.order | 2 |
| tst.ts:232:13:232:38 | [BinaryExpr] this.#n ... r.#name | tst.ts:232:13:232:22 | [DotExpr] this.#name | semmle.label | 1 |
| tst.ts:232:13:232:38 | [BinaryExpr] this.#n ... r.#name | tst.ts:232:13:232:22 | [DotExpr] this.#name | semmle.order | 1 |
| tst.ts:232:13:232:38 | [BinaryExpr] this.#n ... r.#name | tst.ts:232:28:232:38 | [DotExpr] other.#name | semmle.label | 2 |
| tst.ts:232:13:232:38 | [BinaryExpr] this.#n ... r.#name | tst.ts:232:28:232:38 | [DotExpr] other.#name | semmle.order | 2 |
| tst.ts:232:28:232:38 | [DotExpr] other.#name | tst.ts:232:28:232:32 | [VarRef] other | semmle.label | 1 |
| tst.ts:232:28:232:38 | [DotExpr] other.#name | tst.ts:232:28:232:32 | [VarRef] other | semmle.order | 1 |
| tst.ts:232:28:232:38 | [DotExpr] other.#name | tst.ts:232:34:232:38 | [Label] #name | semmle.label | 2 |
| tst.ts:232:28:232:38 | [DotExpr] other.#name | tst.ts:232:34:232:38 | [Label] #name | semmle.order | 2 |
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.label | 1 |
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | semmle.order | 1 |
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.label | 2 |
| tst.ts:237:1:237:65 | [ImportDeclaration] import ... son" }; | tst.ts:237:23:237:40 | [Literal] "./something.json" | semmle.order | 2 |
| tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | tst.ts:237:13:237:16 | [VarDecl] Foo3 | semmle.label | 1 |
| tst.ts:237:8:237:16 | [ImportSpecifier] * as Foo3 | tst.ts:237:13:237:16 | [VarDecl] Foo3 | semmle.order | 1 |
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | semmle.label | 1 |
| tst.ts:238:1:238:19 | [DeclStmt] var foo = ... | tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | semmle.order | 1 |
| tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | tst.ts:238:5:238:7 | [VarDecl] foo | semmle.label | 1 |
| tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | tst.ts:238:5:238:7 | [VarDecl] foo | semmle.order | 1 |
| tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | tst.ts:238:11:238:18 | [DotExpr] Foo3.foo | semmle.label | 2 |
| tst.ts:238:5:238:18 | [VariableDeclarator] foo = Foo3.foo | tst.ts:238:11:238:18 | [DotExpr] Foo3.foo | semmle.order | 2 |
| tst.ts:238:11:238:18 | [DotExpr] Foo3.foo | tst.ts:238:11:238:14 | [VarRef] Foo3 | semmle.label | 1 |
| tst.ts:238:11:238:18 | [DotExpr] Foo3.foo | tst.ts:238:11:238:14 | [VarRef] Foo3 | semmle.order | 1 |
| tst.ts:238:11:238:18 | [DotExpr] Foo3.foo | tst.ts:238:16:238:18 | [Label] foo | semmle.label | 2 |
| tst.ts:238:11:238:18 | [DotExpr] Foo3.foo | tst.ts:238:16:238:18 | [Label] foo | semmle.order | 2 |
| type_alias.ts:1:1:1:17 | [TypeAliasDeclaration,TypeDefinition] type B = boolean; | type_alias.ts:1:6:1:6 | [Identifier] B | semmle.label | 1 |
| type_alias.ts:1:1:1:17 | [TypeAliasDeclaration,TypeDefinition] type B = boolean; | type_alias.ts:1:6:1:6 | [Identifier] B | semmle.order | 1 |
| type_alias.ts:1:1:1:17 | [TypeAliasDeclaration,TypeDefinition] type B = boolean; | type_alias.ts:1:10:1:16 | [KeywordTypeExpr] boolean | semmle.label | 2 |

View File

@@ -0,0 +1,3 @@
{
"foo": "bar"
}

View File

@@ -260,6 +260,47 @@ getExprType
| tst.ts:189:11:189:15 | count | number |
| tst.ts:189:19:189:21 | Foo | typeof Foo in tst.ts:132 |
| tst.ts:189:19:189:28 | Foo.#count | number |
| tst.ts:195:8:195:11 | TS45 | typeof TS45 in library-tests/TypeScript/Types/tst.ts |
| tst.ts:207:5:207:8 | body | string |
| tst.ts:212:7:212:13 | message | string |
| tst.ts:215:19:215:25 | handler | (r: Success \| Error) => void |
| tst.ts:215:27:215:27 | r | Success \| Error |
| tst.ts:216:11:216:11 | r | Success \| Error |
| tst.ts:216:11:216:34 | r.type ... uccess" | boolean |
| tst.ts:216:22:216:34 | "HttpSuccess" | "HttpSuccess" |
| tst.ts:218:15:218:19 | token | string |
| tst.ts:218:23:218:23 | r | Success |
| tst.ts:218:23:218:28 | r.body | string |
| tst.ts:218:25:218:28 | body | string |
| tst.ts:222:9:222:14 | Person | Person |
| tst.ts:224:5:226:5 | constru ... ;\\n } | any |
| tst.ts:224:17:224:20 | name | string |
| tst.ts:225:9:225:18 | this.#name | string |
| tst.ts:225:9:225:25 | this.#name = name | string |
| tst.ts:225:22:225:25 | name | string |
| tst.ts:228:5:228:10 | equals | (other: unknown) => boolean |
| tst.ts:228:5:233:5 | equals( ... .\\n } | (other: unknown) => boolean |
| tst.ts:228:12:228:16 | other | unknown |
| tst.ts:229:16:229:20 | other | unknown |
| tst.ts:229:16:230:37 | other & ... object" | boolean |
| tst.ts:229:16:231:26 | other & ... n other | boolean |
| tst.ts:229:16:232:38 | other & ... r.#name | boolean |
| tst.ts:230:13:230:24 | typeof other | "string" \| "number" \| "bigint" \| "boolean" \| "s... |
| tst.ts:230:13:230:37 | typeof ... object" | boolean |
| tst.ts:230:20:230:24 | other | unknown |
| tst.ts:230:30:230:37 | "object" | "object" |
| tst.ts:231:13:231:26 | #name in other | boolean |
| tst.ts:231:22:231:26 | other | object |
| tst.ts:232:13:232:22 | this.#name | string |
| tst.ts:232:13:232:38 | this.#n ... r.#name | boolean |
| tst.ts:232:28:232:32 | other | Person |
| tst.ts:232:28:232:38 | other.#name | string |
| tst.ts:237:13:237:16 | Foo3 | { foo: string; } |
| tst.ts:237:23:237:40 | "./something.json" | any |
| tst.ts:238:5:238:7 | foo | string |
| tst.ts:238:11:238:14 | Foo3 | { foo: string; } |
| tst.ts:238:11:238:18 | Foo3.foo | string |
| tst.ts:238:16:238:18 | foo | string |
| type_alias.ts:3:5:3:5 | b | boolean |
| type_alias.ts:7:5:7:5 | c | ValueOrArray<number> |
| type_alias.ts:14:9:14:32 | [proper ... ]: Json | any |
@@ -323,6 +364,12 @@ getTypeDefinitionType
| tst.ts:165:5:167:5 | interfa ... ;\\n } | Foo |
| tst.ts:171:5:173:5 | interfa ... ;\\n } | Data |
| tst.ts:179:3:192:3 | class F ... \\n } | Foo |
| tst.ts:197:3:197:36 | type A ... ring>>; | string |
| tst.ts:200:3:200:45 | type B ... ber>>>; | number |
| tst.ts:203:3:203:46 | type C ... mber>>; | C |
| tst.ts:205:10:208:3 | interfa ... ng;\\n } | Success |
| tst.ts:210:10:213:3 | interfa ... ng;\\n } | Error |
| tst.ts:222:3:234:3 | class P ... }\\n } | Person |
| 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 |
@@ -489,6 +536,42 @@ getTypeExprType
| tst.ts:172:26:172:31 | symbol | symbol |
| tst.ts:172:35:172:41 | boolean | boolean |
| tst.ts:175:17:175:20 | Data | Data |
| tst.ts:197:8:197:8 | A | string |
| tst.ts:197:12:197:18 | Awaited | Awaited<T> |
| tst.ts:197:12:197:35 | Awaited ... tring>> | string |
| tst.ts:197:20:197:26 | Promise | Promise<T> |
| tst.ts:197:20:197:34 | Promise<string> | Promise<string> |
| tst.ts:197:28:197:33 | string | string |
| tst.ts:200:8:200:8 | B | number |
| tst.ts:200:12:200:18 | Awaited | Awaited<T> |
| tst.ts:200:12:200:44 | Awaited ... mber>>> | number |
| tst.ts:200:20:200:26 | Promise | Promise<T> |
| tst.ts:200:20:200:43 | Promise ... umber>> | Promise<Promise<number>> |
| tst.ts:200:28:200:34 | Promise | Promise<T> |
| tst.ts:200:28:200:42 | Promise<number> | Promise<number> |
| tst.ts:200:36:200:41 | number | number |
| tst.ts:203:8:203:8 | C | C |
| tst.ts:203:12:203:18 | Awaited | Awaited<T> |
| tst.ts:203:12:203:45 | Awaited ... umber>> | number \| boolean |
| tst.ts:203:20:203:26 | boolean | boolean |
| tst.ts:203:20:203:44 | boolean ... number> | boolean \| Promise<number> |
| tst.ts:203:30:203:36 | Promise | Promise<T> |
| tst.ts:203:30:203:44 | Promise<number> | Promise<number> |
| tst.ts:203:38:203:43 | number | number |
| tst.ts:205:20:205:26 | Success | Success |
| tst.ts:206:14:206:19 | string | string |
| tst.ts:206:21:206:27 | Success | any |
| tst.ts:207:11:207:16 | string | string |
| tst.ts:210:20:210:24 | Error | Error |
| tst.ts:211:16:211:21 | string | string |
| tst.ts:211:23:211:27 | Error | any |
| tst.ts:212:16:212:21 | string | string |
| tst.ts:215:30:215:36 | Success | Success |
| tst.ts:215:30:215:44 | Success \| Error | Success \| Error |
| tst.ts:215:40:215:44 | Error | Error |
| tst.ts:223:12:223:17 | string | string |
| tst.ts:224:23:224:28 | string | string |
| tst.ts:228:19:228:25 | unknown | unknown |
| type_alias.ts:1:6:1:6 | B | boolean |
| type_alias.ts:1:10:1:16 | boolean | boolean |
| type_alias.ts:3:8:3:8 | B | boolean |
@@ -552,6 +635,7 @@ missingToString
referenceDefinition
| Alias<T> | type_definitions.ts:21:1:21:20 | type Alias<T> = T[]; |
| Alias<number> | type_definitions.ts:21:1:21:20 | type Alias<T> = T[]; |
| C | tst.ts:203:3:203:46 | type C ... mber>>; |
| C | type_definition_objects.ts:3:8:3:17 | class C {} |
| C<T> | type_definitions.ts:8:1:10:1 | class C ... x: T\\n} |
| C<number> | type_definitions.ts:8:1:10:1 | class C ... x: T\\n} |
@@ -563,6 +647,7 @@ referenceDefinition
| Data | tst.ts:171:5:173:5 | interfa ... ;\\n } |
| E | type_definition_objects.ts:6:8:6:16 | enum E {} |
| EnumWithOneMember | type_definitions.ts:18:26:18:31 | member |
| Error | tst.ts:210:10:213:3 | interfa ... ng;\\n } |
| Foo | tst.ts:116:3:129:3 | class F ... }\\n } |
| Foo | tst.ts:165:5:167:5 | interfa ... ;\\n } |
| Foo | tst.ts:179:3:192:3 | class F ... \\n } |
@@ -573,8 +658,10 @@ 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} |
| Person | tst.ts:222:3:234:3 | class P ... }\\n } |
| Shape | tst.ts:140:3:142:47 | type Sh ... mber }; |
| Sub | tst.ts:97:3:101:3 | class S ... }\\n } |
| Success | tst.ts:205:10:208:3 | interfa ... ng;\\n } |
| Super | tst.ts:91:3:95:3 | class S ... }\\n } |
| Super | tst.ts:91:3:95:3 | class S ... }\\n } |
| Thing | tst.ts:78:10:88:3 | class T ... }\\n } |
@@ -617,6 +704,9 @@ unknownType
| tst.ts:48:14:48:14 | e | unknown |
| tst.ts:133:16:133:18 | arg | unknown |
| tst.ts:134:32:134:34 | arg | unknown |
| tst.ts:228:12:228:16 | other | unknown |
| tst.ts:229:16:229:20 | other | unknown |
| tst.ts:230:20:230:24 | other | unknown |
abstractSignature
| (): HasArea |
| new (): HasArea |
@@ -633,16 +723,28 @@ unionIndex
| "string" | 0 | "string" \| "number" \| "bigint" \| "boolean" \| "s... |
| "symbol" | 4 | "string" \| "number" \| "bigint" \| "boolean" \| "s... |
| "undefined" | 5 | "string" \| "number" \| "bigint" \| "boolean" \| "s... |
| Error | 1 | Success \| Error |
| Json[] | 5 | string \| number \| boolean \| { [property: string... |
| Promise<number> | 2 | boolean \| Promise<number> |
| PromiseLike<TResult1> | 1 | TResult1 \| PromiseLike<TResult1> |
| PromiseLike<TResult2> | 1 | TResult2 \| PromiseLike<TResult2> |
| Success | 0 | Success \| Error |
| T | 0 | T \| ValueOrArray<T>[] |
| TResult1 | 0 | TResult1 \| PromiseLike<TResult1> |
| TResult1 | 0 | TResult1 \| TResult2 |
| TResult2 | 0 | TResult2 \| PromiseLike<TResult2> |
| TResult2 | 1 | TResult1 \| TResult2 |
| ValueOrArray<T>[] | 1 | T \| ValueOrArray<T>[] |
| ValueOrArray<number>[] | 1 | number \| ValueOrArray<number>[] |
| [string, { [key: string]: any; }, ...VirtualNod... | 1 | VirtualNode \| { [key: string]: any; } |
| [string, { [key: string]: any; }, ...VirtualNod... | 1 | string \| [string, { [key: string]: any; }, ...V... |
| false | 0 | boolean |
| false | 0 | boolean \| Promise<number> |
| false | 1 | number \| boolean |
| false | 2 | string \| number \| boolean |
| false | 2 | string \| number \| boolean \| { [property: string... |
| number | 0 | number \| ValueOrArray<number>[] |
| number | 0 | number \| boolean |
| number | 1 | string \| number |
| number | 1 | string \| number \| boolean |
| number | 1 | string \| number \| boolean \| { [property: string... |
@@ -657,6 +759,8 @@ unionIndex
| string | 0 | string \| { [key: string]: any; } |
| symbol | 1 | string \| symbol |
| true | 1 | boolean |
| true | 1 | boolean \| Promise<number> |
| true | 2 | number \| boolean |
| true | 2 | string \| number \| true |
| true | 3 | string \| number \| boolean |
| true | 3 | string \| number \| boolean \| { [property: string... |

View File

@@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["es2015"]
"lib": ["es2015"],
"resolveJsonModule": true
}
}

View File

@@ -190,4 +190,49 @@ module TS44 {
}
}
}
}
module TS45 {
// A = string
type A = Awaited<Promise<string>>;
// B = number
type B = Awaited<Promise<Promise<number>>>;
// C = boolean | number
type C = Awaited<boolean | Promise<number>>;
export interface Success {
type: `${string}Success`;
body: string;
}
export interface Error {
type: `${string}Error`;
message: string;
}
export function handler(r: Success | Error) {
if (r.type === "HttpSuccess") {
// 'r' has type 'Success'
let token = r.body;
}
}
class Person {
#name: string;
constructor(name: string) {
this.#name = name;
}
equals(other: unknown) {
return other &&
typeof other === "object" &&
#name in other && // <- this is new!
this.#name === other.#name; // <- other has type Person here.
}
}
}
import * as Foo3 from "./something.json" assert { type: "json" };
var foo = Foo3.foo;

View File

@@ -1,4 +1,3 @@
| arrows.js:1:5:1:5 | Error: Argument name clash | Error: Argument name clash |
| destructingPrivate.js:4:6:4:6 | Error: Unexpected token | Error: Unexpected token |
| privateMethod.js:2:3:2:3 | Error: Only fields, not methods, can be declared private. | Error: Only fields, not methods, can be declared private. |
| tst.js:2:12:2:12 | Error: Unterminated string constant | Error: Unterminated string constant |

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: 'add @import_specifier to @import_or_export_declaration, and rename @import_or_export_declaration to @type_keyword_operand'
compatibility: backwards