Merge remote-tracking branch 'upstream/master' into deferredModel

This commit is contained in:
Erik Krogh Kristensen
2019-11-05 15:08:47 +01:00
911 changed files with 38307 additions and 11309 deletions

View File

@@ -0,0 +1,12 @@
const lib = require("./lib"),
{ f } = require("./lib");
/** calls:lib.f */
lib.f();
/** calls:lib.f */
f();
(function() {
/** calls:lib.f */
f();
})();

View File

@@ -0,0 +1,3 @@
module.exports.f =
/** name:lib.f */
function() {};

View File

@@ -60,7 +60,6 @@ test_getAFunctionValue
| classes.js:12:3:16:3 | class B ... }\\n } | classes.js:12:21:12:20 | (...arg ... rgs); } |
| classes.js:12:19:12:19 | A | classes.js:2:11:2:10 | () {} |
| classes.js:12:21:12:20 | (...arg ... rgs); } | classes.js:12:21:12:20 | (...arg ... rgs); } |
| classes.js:12:21:12:20 | super | classes.js:2:11:2:10 | () {} |
| classes.js:13:10:15:5 | () {\\n ... ;\\n } | classes.js:13:10:15:5 | () {\\n ... ;\\n } |
| classes.js:18:3:18:15 | new B().hello | classes.js:13:10:15:5 | () {\\n ... ;\\n } |
| classes.js:18:7:18:7 | B | classes.js:12:21:12:20 | (...arg ... rgs); } |
@@ -76,12 +75,10 @@ test_getAFunctionValue
| es2015.js:14:20:14:46 | "Wait f ... leClass | es2015.js:2:14:4:3 | () {\\n ... ");\\n } |
| es2015.js:14:35:14:46 | ExampleClass | es2015.js:2:14:4:3 | () {\\n ... ");\\n } |
| es2015.js:15:14:17:3 | () {\\n ... ();\\n } | es2015.js:15:14:17:3 | () {\\n ... ();\\n } |
| es2015.js:16:5:16:9 | super | es2015.js:2:14:4:3 | () {\\n ... ");\\n } |
| es2015.js:20:1:22:1 | functio ... = 42;\\n} | es2015.js:20:1:22:1 | functio ... = 42;\\n} |
| es2015.js:24:1:29:1 | class O ... ;\\n }\\n} | es2015.js:25:14:28:3 | () {\\n ... x);\\n } |
| es2015.js:24:24:24:34 | PseudoClass | es2015.js:20:1:22:1 | functio ... = 42;\\n} |
| es2015.js:25:14:28:3 | () {\\n ... x);\\n } | es2015.js:25:14:28:3 | () {\\n ... x);\\n } |
| es2015.js:26:5:26:9 | super | es2015.js:20:1:22:1 | functio ... = 42;\\n} |
| es2015.js:31:1:33:1 | functio ... +y+z;\\n} | es2015.js:31:1:33:1 | functio ... +y+z;\\n} |
| es2015.js:34:1:34:3 | sum | es2015.js:31:1:33:1 | functio ... +y+z;\\n} |
| es2015.js:35:1:35:3 | sum | es2015.js:31:1:33:1 | functio ... +y+z;\\n} |
@@ -184,8 +181,8 @@ test_getAFunctionValue
| tst.js:64:17:64:17 | B | tst.js:50:1:50:15 | function B() {} |
| tst.js:65:5:65:23 | b.f = function() {} | tst.js:65:11:65:23 | function() {} |
| tst.js:65:11:65:23 | function() {} | tst.js:65:11:65:23 | function() {} |
| tst.js:66:5:66:7 | b.f | tst.js:52:5:54:2 | functio ... g();\\n\\t} |
| tst.js:66:5:66:7 | b.f | tst.js:65:11:65:23 | function() {} |
| tst.js:69:1:69:8 | globalfn | tst3.js:1:1:1:22 | functio ... fn() {} |
| tst.js:70:1:70:9 | globalfn2 | tst3.js:2:1:2:23 | functio ... n2() {} |
test_getArgument
| classes.js:4:7:4:26 | console.log("Hello") | 0 | classes.js:4:19:4:25 | "Hello" |
@@ -404,7 +401,6 @@ test_getACallee
| es2015.js:6:1:6:18 | new ExampleClass() | es2015.js:2:14:4:3 | () {\\n ... ");\\n } |
| es2015.js:10:5:10:22 | arguments.callee() | es2015.js:8:2:12:1 | functio ... \\n };\\n} |
| es2015.js:16:5:16:11 | super() | es2015.js:2:14:4:3 | () {\\n ... ");\\n } |
| es2015.js:26:5:26:11 | super() | es2015.js:20:1:22:1 | functio ... = 42;\\n} |
| es2015.js:34:1:34:17 | sum(...[1, 2, 3]) | es2015.js:31:1:33:1 | functio ... +y+z;\\n} |
| es2015.js:35:1:35:17 | sum(1, ...[2, 3]) | es2015.js:31:1:33:1 | functio ... +y+z;\\n} |
| es2015.js:36:1:36:17 | sum(1, ...[2], 3) | es2015.js:31:1:33:1 | functio ... +y+z;\\n} |
@@ -441,8 +437,8 @@ test_getACallee
| tst.js:53:3:53:10 | this.g() | tst.js:57:39:57:51 | function() {} |
| tst.js:60:15:60:21 | new A() | tst.js:44:1:44:15 | function A() {} |
| tst.js:64:13:64:19 | new B() | tst.js:50:1:50:15 | function B() {} |
| tst.js:66:5:66:9 | b.f() | tst.js:52:5:54:2 | functio ... g();\\n\\t} |
| tst.js:66:5:66:9 | b.f() | tst.js:65:11:65:23 | function() {} |
| tst.js:69:1:69:10 | globalfn() | tst3.js:1:1:1:22 | functio ... fn() {} |
| tst.js:70:1:70:11 | globalfn2() | tst3.js:2:1:2:23 | functio ... n2() {} |
test_getCalleeName
| a.js:2:1:2:5 | foo() | foo |

View File

@@ -0,0 +1,11 @@
const key1 = "key1";
class NoConstructor {
[key1] = 4;
}
const key2 = "key2";
class WithConstructor {
[key2] = 4;
constructor() {}
}

View File

@@ -104,6 +104,22 @@ test_getParent
| comparison.js:8:1:8:1 | 2 | comparison.js:8:1:8:6 | 2 >= 1 |
| comparison.js:8:1:8:6 | 2 >= 1 | comparison.js:8:1:8:7 | 2 >= 1; |
| comparison.js:8:6:8:6 | 1 | comparison.js:8:1:8:6 | 2 >= 1 |
| computedFieldNames.ts:1:7:1:10 | key1 | computedFieldNames.ts:1:7:1:19 | key1 = "key1" |
| computedFieldNames.ts:1:7:1:19 | key1 = "key1" | computedFieldNames.ts:1:1:1:20 | const key1 = "key1"; |
| computedFieldNames.ts:1:14:1:19 | "key1" | computedFieldNames.ts:1:7:1:19 | key1 = "key1" |
| computedFieldNames.ts:2:7:2:19 | NoConstructor | computedFieldNames.ts:2:1:4:1 | class N ... = 4;\\n} |
| computedFieldNames.ts:2:21:2:20 | () {} | computedFieldNames.ts:2:21:2:20 | constructor() {} |
| computedFieldNames.ts:2:21:2:20 | constructor | computedFieldNames.ts:2:21:2:20 | constructor() {} |
| computedFieldNames.ts:3:4:3:7 | key1 | computedFieldNames.ts:3:3:3:13 | [key1] = 4; |
| computedFieldNames.ts:3:12:3:12 | 4 | computedFieldNames.ts:3:3:3:13 | [key1] = 4; |
| computedFieldNames.ts:6:7:6:10 | key2 | computedFieldNames.ts:6:7:6:19 | key2 = "key2" |
| computedFieldNames.ts:6:7:6:19 | key2 = "key2" | computedFieldNames.ts:6:1:6:20 | const key2 = "key2"; |
| computedFieldNames.ts:6:14:6:19 | "key2" | computedFieldNames.ts:6:7:6:19 | key2 = "key2" |
| computedFieldNames.ts:7:7:7:21 | WithConstructor | computedFieldNames.ts:7:1:11:1 | class W ... () {}\\n} |
| computedFieldNames.ts:8:4:8:7 | key2 | computedFieldNames.ts:8:3:8:13 | [key2] = 4; |
| computedFieldNames.ts:8:12:8:12 | 4 | computedFieldNames.ts:8:3:8:13 | [key2] = 4; |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:10:3:10:18 | constructor() {} |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:10:3:10:18 | constructor() {} |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] | es2015.js:1:1:1:22 | ["a", " ... c"].map |
| es2015.js:1:1:1:22 | ["a", " ... c"].map | es2015.js:1:1:1:37 | ["a", " ... length) |
| es2015.js:1:1:1:37 | ["a", " ... length) | es2015.js:1:1:1:38 | ["a", " ... ength); |
@@ -557,6 +573,22 @@ test_getTopLevel
| comparison.js:8:1:8:1 | 2 | comparison.js:1:1:9:0 | <toplevel> |
| comparison.js:8:1:8:6 | 2 >= 1 | comparison.js:1:1:9:0 | <toplevel> |
| comparison.js:8:6:8:6 | 1 | comparison.js:1:1:9:0 | <toplevel> |
| computedFieldNames.ts:1:7:1:10 | key1 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:1:7:1:19 | key1 = "key1" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:1:14:1:19 | "key1" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:2:7:2:19 | NoConstructor | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:2:21:2:20 | () {} | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:2:21:2:20 | constructor | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:3:4:3:7 | key1 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:3:12:3:12 | 4 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:6:7:6:10 | key2 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:6:7:6:19 | key2 = "key2" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:6:14:6:19 | "key2" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:7:7:7:21 | WithConstructor | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:8:4:8:7 | key2 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:8:12:8:12 | 4 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] | es2015.js:1:1:29:0 | <toplevel> |
| es2015.js:1:1:1:22 | ["a", " ... c"].map | es2015.js:1:1:29:0 | <toplevel> |
| es2015.js:1:1:1:37 | ["a", " ... length) | es2015.js:1:1:29:0 | <toplevel> |
@@ -975,6 +1007,10 @@ test_getChild
| comparison.js:7:1:7:5 | 2 > 1 | 1 | comparison.js:7:5:7:5 | 1 |
| comparison.js:8:1:8:6 | 2 >= 1 | 0 | comparison.js:8:1:8:1 | 2 |
| comparison.js:8:1:8:6 | 2 >= 1 | 1 | comparison.js:8:6:8:6 | 1 |
| computedFieldNames.ts:1:7:1:19 | key1 = "key1" | 0 | computedFieldNames.ts:1:7:1:10 | key1 |
| computedFieldNames.ts:1:7:1:19 | key1 = "key1" | 1 | computedFieldNames.ts:1:14:1:19 | "key1" |
| computedFieldNames.ts:6:7:6:19 | key2 = "key2" | 0 | computedFieldNames.ts:6:7:6:10 | key2 |
| computedFieldNames.ts:6:7:6:19 | key2 = "key2" | 1 | computedFieldNames.ts:6:14:6:19 | "key2" |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] | 0 | es2015.js:1:2:1:4 | "a" |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] | 1 | es2015.js:1:7:1:10 | "ab" |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] | 2 | es2015.js:1:13:1:17 | "abc" |
@@ -1270,6 +1306,20 @@ test_isPure
| comparison.js:8:1:8:1 | 2 |
| comparison.js:8:1:8:6 | 2 >= 1 |
| comparison.js:8:6:8:6 | 1 |
| computedFieldNames.ts:1:7:1:10 | key1 |
| computedFieldNames.ts:1:14:1:19 | "key1" |
| computedFieldNames.ts:2:7:2:19 | NoConstructor |
| computedFieldNames.ts:2:21:2:20 | () {} |
| computedFieldNames.ts:2:21:2:20 | constructor |
| computedFieldNames.ts:3:4:3:7 | key1 |
| computedFieldNames.ts:3:12:3:12 | 4 |
| computedFieldNames.ts:6:7:6:10 | key2 |
| computedFieldNames.ts:6:14:6:19 | "key2" |
| computedFieldNames.ts:7:7:7:21 | WithConstructor |
| computedFieldNames.ts:8:4:8:7 | key2 |
| computedFieldNames.ts:8:12:8:12 | 4 |
| computedFieldNames.ts:10:3:10:18 | constructor() {} |
| computedFieldNames.ts:10:3:10:18 | constructor() {} |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] |
| es2015.js:1:1:1:22 | ["a", " ... c"].map |
| es2015.js:1:2:1:4 | "a" |
@@ -1570,6 +1620,10 @@ test_RelationalComparisons
| comparison.js:8:1:8:6 | 2 >= 1 | comparison.js:8:6:8:6 | 1 | comparison.js:8:1:8:1 | 2 |
| es2015.js:23:8:23:12 | n-->0 | es2015.js:23:12:23:12 | 0 | es2015.js:23:8:23:10 | n-- |
test_getEnclosingFunction
| computedFieldNames.ts:3:4:3:7 | key1 | computedFieldNames.ts:2:21:2:20 | () {} |
| computedFieldNames.ts:3:12:3:12 | 4 | computedFieldNames.ts:2:21:2:20 | () {} |
| computedFieldNames.ts:8:4:8:7 | key2 | computedFieldNames.ts:10:3:10:18 | constructor() {} |
| computedFieldNames.ts:8:12:8:12 | 4 | computedFieldNames.ts:10:3:10:18 | constructor() {} |
| es2015.js:1:24:1:24 | s | es2015.js:1:24:1:36 | s => s.length |
| es2015.js:1:29:1:29 | s | es2015.js:1:24:1:36 | s => s.length |
| es2015.js:1:29:1:36 | s.length | es2015.js:1:24:1:36 | s => s.length |
@@ -1759,6 +1813,22 @@ test_getContainer
| comparison.js:8:1:8:1 | 2 | comparison.js:1:1:9:0 | <toplevel> |
| comparison.js:8:1:8:6 | 2 >= 1 | comparison.js:1:1:9:0 | <toplevel> |
| comparison.js:8:6:8:6 | 1 | comparison.js:1:1:9:0 | <toplevel> |
| computedFieldNames.ts:1:7:1:10 | key1 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:1:7:1:19 | key1 = "key1" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:1:14:1:19 | "key1" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:2:7:2:19 | NoConstructor | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:2:21:2:20 | () {} | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:2:21:2:20 | constructor | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:3:4:3:7 | key1 | computedFieldNames.ts:2:21:2:20 | () {} |
| computedFieldNames.ts:3:12:3:12 | 4 | computedFieldNames.ts:2:21:2:20 | () {} |
| computedFieldNames.ts:6:7:6:10 | key2 | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:6:7:6:19 | key2 = "key2" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:6:14:6:19 | "key2" | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:7:7:7:21 | WithConstructor | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:8:4:8:7 | key2 | computedFieldNames.ts:10:3:10:18 | constructor() {} |
| computedFieldNames.ts:8:12:8:12 | 4 | computedFieldNames.ts:10:3:10:18 | constructor() {} |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:1:1:12:0 | <toplevel> |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] | es2015.js:1:1:29:0 | <toplevel> |
| es2015.js:1:1:1:22 | ["a", " ... c"].map | es2015.js:1:1:29:0 | <toplevel> |
| es2015.js:1:1:1:37 | ["a", " ... length) | es2015.js:1:1:29:0 | <toplevel> |
@@ -2212,6 +2282,18 @@ test_getEnclosingStmt
| comparison.js:8:1:8:1 | 2 | comparison.js:8:1:8:7 | 2 >= 1; |
| comparison.js:8:1:8:6 | 2 >= 1 | comparison.js:8:1:8:7 | 2 >= 1; |
| comparison.js:8:6:8:6 | 1 | comparison.js:8:1:8:7 | 2 >= 1; |
| computedFieldNames.ts:1:7:1:10 | key1 | computedFieldNames.ts:1:1:1:20 | const key1 = "key1"; |
| computedFieldNames.ts:1:7:1:19 | key1 = "key1" | computedFieldNames.ts:1:1:1:20 | const key1 = "key1"; |
| computedFieldNames.ts:1:14:1:19 | "key1" | computedFieldNames.ts:1:1:1:20 | const key1 = "key1"; |
| computedFieldNames.ts:2:7:2:19 | NoConstructor | computedFieldNames.ts:2:1:4:1 | class N ... = 4;\\n} |
| computedFieldNames.ts:2:21:2:20 | () {} | computedFieldNames.ts:2:1:4:1 | class N ... = 4;\\n} |
| computedFieldNames.ts:2:21:2:20 | constructor | computedFieldNames.ts:2:1:4:1 | class N ... = 4;\\n} |
| computedFieldNames.ts:6:7:6:10 | key2 | computedFieldNames.ts:6:1:6:20 | const key2 = "key2"; |
| computedFieldNames.ts:6:7:6:19 | key2 = "key2" | computedFieldNames.ts:6:1:6:20 | const key2 = "key2"; |
| computedFieldNames.ts:6:14:6:19 | "key2" | computedFieldNames.ts:6:1:6:20 | const key2 = "key2"; |
| computedFieldNames.ts:7:7:7:21 | WithConstructor | computedFieldNames.ts:7:1:11:1 | class W ... () {}\\n} |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:7:1:11:1 | class W ... () {}\\n} |
| computedFieldNames.ts:10:3:10:18 | constructor() {} | computedFieldNames.ts:7:1:11:1 | class W ... () {}\\n} |
| es2015.js:1:1:1:18 | ["a", "ab", "abc"] | es2015.js:1:1:1:38 | ["a", " ... ength); |
| es2015.js:1:1:1:22 | ["a", " ... c"].map | es2015.js:1:1:1:38 | ["a", " ... ength); |
| es2015.js:1:1:1:37 | ["a", " ... length) | es2015.js:1:1:1:38 | ["a", " ... ength); |
@@ -2693,4 +2775,4 @@ test_inNullSensitiveContext
| update.js:1:3:1:3 | a |
| update.js:2:1:2:1 | a |
| update.js:3:3:3:3 | b |
| update.js:4:1:4:1 | b |
| update.js:4:1:4:1 | b |

View File

@@ -208,6 +208,8 @@
| nodeJsLib.js:1:18:1:43 | instance of function nodeJsModule |
| nodeJsLib.js:3:15:3:37 | function nodeJsFoo |
| nodeJsLib.js:3:15:3:37 | instance of function nodeJsFoo |
| nullish-coalescing-op.ts:1:1:3:1 | function test |
| nullish-coalescing-op.ts:1:1:3:1 | instance of function test |
| o.js:1:1:2:0 | exports object of module o |
| o.js:1:1:2:0 | module object of module o |
| objlit.js:1:14:1:15 | object literal |

View File

@@ -80,6 +80,7 @@
| classAccessors.js:12:9:12:11 | myZ | classAccessors.js:12:15:12:20 | this.z | file://:0:0:0:0 | indefinite value (call) |
| classAccessors.js:12:9:12:11 | myZ | classAccessors.js:12:15:12:20 | this.z | file://:0:0:0:0 | indefinite value (heap) |
| destructuring.js:2:7:2:24 | { x, y = (z = x) } | destructuring.js:2:28:2:28 | o | file://:0:0:0:0 | indefinite value (call) |
| destructuring.js:3:7:3:8 | z1 | destructuring.js:3:12:3:12 | z | file://:0:0:0:0 | indefinite value (call) |
| destructuring.js:3:7:3:8 | z1 | destructuring.js:3:12:3:12 | z | file://:0:0:0:0 | indefinite value (heap) |
| es2015.js:1:5:1:7 | Sup | es2015.js:1:11:6:1 | class { ... ;\\n }\\n} | es2015.js:1:11:6:1 | class Sup |
| es2015.js:4:9:4:12 | ctor | es2015.js:4:16:4:25 | new.target | file://:0:0:0:0 | indefinite value (call) |
@@ -203,6 +204,8 @@
| nodeJsClient.js:5:5:5:6 | x2 | nodeJsClient.js:5:10:5:15 | es.foo | esLib.js:3:8:3:24 | function foo |
| nodeJsClient.js:5:5:5:6 | x2 | nodeJsClient.js:5:10:5:15 | es.foo | file://:0:0:0:0 | indefinite value (call) |
| nodeJsClient.js:5:5:5:6 | x2 | nodeJsClient.js:5:10:5:15 | es.foo | file://:0:0:0:0 | indefinite value (heap) |
| nullish-coalescing-op.ts:2:7:2:7 | y | nullish-coalescing-op.ts:2:11:2:18 | x ?? 0.5 | file://:0:0:0:0 | indefinite value (call) |
| nullish-coalescing-op.ts:2:7:2:7 | y | nullish-coalescing-op.ts:2:11:2:18 | x ?? 0.5 | file://:0:0:0:0 | non-zero value |
| objlit.js:1:5:1:5 | A | objlit.js:1:9:1:15 | A \|\| {} | file://:0:0:0:0 | indefinite value (global) |
| objlit.js:1:5:1:5 | A | objlit.js:1:9:1:15 | A \|\| {} | objlit.js:1:14:1:15 | object literal |
| objlit.js:7:5:7:5 | B | objlit.js:7:9:7:10 | {} | objlit.js:7:9:7:10 | object literal |

View File

@@ -40,6 +40,7 @@
| nestedImport.js:9:1:12:1 | instance of function tst | nestedImport.js:9:1:12:1 | instance of function tst |
| nodeJsLib.js:1:18:1:43 | instance of function nodeJsModule | nodeJsLib.js:1:18:1:43 | instance of function nodeJsModule |
| nodeJsLib.js:3:15:3:37 | instance of function nodeJsFoo | nodeJsLib.js:3:15:3:37 | instance of function nodeJsFoo |
| nullish-coalescing-op.ts:1:1:3:1 | instance of function test | nullish-coalescing-op.ts:1:1:3:1 | instance of function test |
| objlit.js:2:9:2:21 | instance of anonymous function | objlit.js:2:9:2:21 | instance of anonymous function |
| objlit.js:4:8:4:20 | instance of method baz | objlit.js:4:8:4:20 | instance of method baz |
| objlit.js:10:2:12:1 | instance of anonymous function | objlit.js:10:2:12:1 | instance of anonymous function |

View File

@@ -0,0 +1,3 @@
function test(x) {
let y = x ?? 0.5;
}

View File

@@ -113,6 +113,7 @@
| nodeJsClient.js:2:5:2:6 | es | nodeJsClient.js:2:10:2:27 | require('./esLib') | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| nodeJsClient.js:4:5:4:6 | x1 | nodeJsClient.js:4:10:4:15 | nj.foo | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| nodeJsClient.js:5:5:5:6 | x2 | nodeJsClient.js:5:10:5:15 | es.foo | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| nullish-coalescing-op.ts:2:7:2:7 | y | nullish-coalescing-op.ts:2:11:2:18 | x ?? 0.5 | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| objlit.js:1:5:1:5 | A | objlit.js:1:9:1:15 | A \|\| {} | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| objlit.js:7:5:7:5 | B | objlit.js:7:9:7:10 | {} | object |
| objlit.js:14:5:14:6 | x1 | objlit.js:14:10:14:10 | A | boolean, class, date, function, null, number, object, regular expression,string or undefined |

View File

@@ -11,3 +11,4 @@
| tst.js:4:1:4:6 | window |
| tst.js:4:1:4:13 | window.window |
| tst.js:5:1:5:4 | self |
| tst.js:6:1:6:10 | globalThis |

View File

@@ -4,9 +4,11 @@
| document | tst.js:3:1:3:15 | window.document |
| document | tst.js:4:1:4:22 | window. ... ocument |
| document | tst.js:5:1:5:13 | self.document |
| document | tst.js:6:1:6:19 | globalThis.document |
| foo | tst3.js:4:1:4:5 | w.foo |
| global | tst2.js:7:1:7:6 | global |
| global | tst2.js:8:1:8:6 | global |
| globalThis | tst.js:6:1:6:10 | globalThis |
| goog | tst3.js:1:1:1:4 | goog |
| goog | tst3.js:3:9:3:12 | goog |
| self | tst.js:5:1:5:4 | self |

View File

@@ -3,3 +3,4 @@ this;
window.document;
window.window.document;
self.document;
globalThis.document;

View File

@@ -1,7 +1,25 @@
| short-circuiting-typescript.ts:3:5:3:18 | x?.(o1 = null) | short-circuiting-typescript.ts:3:5:3:18 | x?.(o1 = null) |
| short-circuiting-typescript.ts:7:5:7:18 | x?.[o2 = null] | short-circuiting-typescript.ts:7:5:7:18 | x?.[o2 = null] |
| short-circuiting-typescript.ts:12:5:12:31 | x?.[o3 ... = null) | short-circuiting-typescript.ts:12:5:12:18 | x?.[o3 = null] |
| short-circuiting-typescript.ts:12:5:12:31 | x?.[o3 ... = null) | short-circuiting-typescript.ts:12:5:12:31 | x?.[o3 ... = null) |
| short-circuiting.js:3:5:3:18 | x?.(o1 = null) | short-circuiting.js:3:5:3:18 | x?.(o1 = null) |
| short-circuiting.js:7:5:7:18 | x?.[o2 = null] | short-circuiting.js:7:5:7:18 | x?.[o2 = null] |
| short-circuiting.js:12:5:12:31 | x?.[o3 ... = null) | short-circuiting.js:12:5:12:18 | x?.[o3 = null] |
| short-circuiting.js:12:5:12:31 | x?.[o3 ... = null) | short-circuiting.js:12:5:12:31 | x?.[o3 ... = null) |
| tst-typescript.ts:2:1:2:6 | a?.b.c | tst-typescript.ts:2:1:2:4 | a?.b |
| tst-typescript.ts:3:1:3:6 | a.b?.c | tst-typescript.ts:3:1:3:6 | a.b?.c |
| tst-typescript.ts:4:1:4:7 | a?.b?.c | tst-typescript.ts:4:1:4:4 | a?.b |
| tst-typescript.ts:4:1:4:7 | a?.b?.c | tst-typescript.ts:4:1:4:7 | a?.b?.c |
| tst-typescript.ts:7:1:7:7 | f?.()() | tst-typescript.ts:7:1:7:5 | f?.() |
| tst-typescript.ts:8:1:8:7 | f()?.() | tst-typescript.ts:8:1:8:7 | f()?.() |
| tst-typescript.ts:9:1:9:9 | f?.()?.() | tst-typescript.ts:9:1:9:5 | f?.() |
| tst-typescript.ts:9:1:9:9 | f?.()?.() | tst-typescript.ts:9:1:9:9 | f?.()?.() |
| tst-typescript.ts:12:1:12:8 | a?.m().b | tst-typescript.ts:12:1:12:4 | a?.m |
| tst-typescript.ts:13:1:13:9 | a.m?.().b | tst-typescript.ts:13:1:13:7 | a.m?.() |
| tst-typescript.ts:14:1:14:8 | a.m()?.b | tst-typescript.ts:14:1:14:8 | a.m()?.b |
| tst-typescript.ts:15:1:15:11 | a?.m?.()?.b | tst-typescript.ts:15:1:15:4 | a?.m |
| tst-typescript.ts:15:1:15:11 | a?.m?.()?.b | tst-typescript.ts:15:1:15:8 | a?.m?.() |
| tst-typescript.ts:15:1:15:11 | a?.m?.()?.b | tst-typescript.ts:15:1:15:11 | a?.m?.()?.b |
| tst.js:2:1:2:6 | a?.b.c | tst.js:2:1:2:4 | a?.b |
| tst.js:3:1:3:6 | a.b?.c | tst.js:3:1:3:6 | a.b?.c |
| tst.js:4:1:4:7 | a?.b?.c | tst.js:4:1:4:4 | a?.b |

View File

@@ -1,7 +1,25 @@
| short-circuiting-typescript.ts:3:5:3:18 | x?.(o1 = null) |
| short-circuiting-typescript.ts:7:5:7:18 | x?.[o2 = null] |
| short-circuiting-typescript.ts:12:5:12:18 | x?.[o3 = null] |
| short-circuiting-typescript.ts:12:5:12:31 | x?.[o3 ... = null) |
| short-circuiting.js:3:5:3:18 | x?.(o1 = null) |
| short-circuiting.js:7:5:7:18 | x?.[o2 = null] |
| short-circuiting.js:12:5:12:18 | x?.[o3 = null] |
| short-circuiting.js:12:5:12:31 | x?.[o3 ... = null) |
| tst-typescript.ts:2:1:2:4 | a?.b |
| tst-typescript.ts:3:1:3:6 | a.b?.c |
| tst-typescript.ts:4:1:4:4 | a?.b |
| tst-typescript.ts:4:1:4:7 | a?.b?.c |
| tst-typescript.ts:7:1:7:5 | f?.() |
| tst-typescript.ts:8:1:8:7 | f()?.() |
| tst-typescript.ts:9:1:9:5 | f?.() |
| tst-typescript.ts:9:1:9:9 | f?.()?.() |
| tst-typescript.ts:12:1:12:4 | a?.m |
| tst-typescript.ts:13:1:13:7 | a.m?.() |
| tst-typescript.ts:14:1:14:8 | a.m()?.b |
| tst-typescript.ts:15:1:15:4 | a?.m |
| tst-typescript.ts:15:1:15:8 | a?.m?.() |
| tst-typescript.ts:15:1:15:11 | a?.m?.()?.b |
| tst.js:2:1:2:4 | a?.b |
| tst.js:3:1:3:6 | a.b?.c |
| tst.js:4:1:4:4 | a?.b |

View File

@@ -1,3 +1,11 @@
| short-circuiting-typescript.ts:4:10:4:11 | o1 | file://:0:0:0:0 | null |
| short-circuiting-typescript.ts:4:10:4:11 | o1 | short-circuiting-typescript.ts:2:14:2:15 | object literal |
| short-circuiting-typescript.ts:8:10:8:11 | o2 | file://:0:0:0:0 | null |
| short-circuiting-typescript.ts:8:10:8:11 | o2 | short-circuiting-typescript.ts:6:14:6:15 | object literal |
| short-circuiting-typescript.ts:13:10:13:11 | o3 | file://:0:0:0:0 | null |
| short-circuiting-typescript.ts:13:10:13:11 | o3 | short-circuiting-typescript.ts:10:14:10:15 | object literal |
| short-circuiting-typescript.ts:14:10:14:11 | o4 | file://:0:0:0:0 | null |
| short-circuiting-typescript.ts:14:10:14:11 | o4 | short-circuiting-typescript.ts:11:14:11:15 | object literal |
| short-circuiting.js:4:10:4:11 | o1 | file://:0:0:0:0 | null |
| short-circuiting.js:4:10:4:11 | o1 | short-circuiting.js:2:14:2:15 | object literal |
| short-circuiting.js:8:10:8:11 | o2 | file://:0:0:0:0 | null |

View File

@@ -1,8 +0,0 @@
| short-circuiting.js:4:10:4:11 | o1 | file://:0:0:0:0 | null |
| short-circuiting.js:4:10:4:11 | o1 | short-circuiting.js:2:14:2:15 | object literal |
| short-circuiting.js:8:10:8:11 | o2 | file://:0:0:0:0 | null |
| short-circuiting.js:8:10:8:11 | o2 | short-circuiting.js:6:14:6:15 | object literal |
| short-circuiting.js:13:10:13:11 | o3 | file://:0:0:0:0 | null |
| short-circuiting.js:13:10:13:11 | o3 | short-circuiting.js:10:14:10:15 | object literal |
| short-circuiting.js:14:10:14:11 | o4 | file://:0:0:0:0 | null |
| short-circuiting.js:14:10:14:11 | o4 | short-circuiting.js:11:14:11:15 | object literal |

View File

@@ -1,7 +0,0 @@
import javascript
from CallExpr c, Expr arg
where
c.getCalleeName() = "DUMP" and
arg = c.getArgument(0)
select arg, arg.analyze().getAValue()

View File

@@ -0,0 +1,15 @@
(function() {
var o1 = {};
x?.(o1 = null);
DUMP(o1);
var o2 = {};
x?.[o2 = null];
DUMP(o2);
var o3 = {},
o4 = {};
x?.[o3 = null]?.(o4 = null);
DUMP(o3);
DUMP(o4);
});

View File

@@ -0,0 +1,15 @@
a.b.c;
a?.b.c;
a.b?.c;
a?.b?.c;
f()();
f?.()();
f()?.();
f?.()?.();
a.m().b;
a?.m().b;
a.m?.().b;
a.m()?.b;
a?.m?.()?.b;

View File

@@ -0,0 +1,5 @@
goog.module('test');
function test(x) {
addEventListener("click", goog.bind(function(x, event) {}, this, x));
}

View File

@@ -0,0 +1,26 @@
getBoundFunction
| closure.js:4:29:4:69 | goog.bi ... his, x) | closure.js:4:39:4:59 | functio ... ent) {} | 1 | closure.js:4:29:4:69 | goog.bi ... his, x) |
| tst.js:5:29:5:63 | functio ... his, x) | tst.js:5:29:5:49 | functio ... ent) {} | 1 | tst.js:5:29:5:63 | functio ... his, x) |
| tst.js:6:29:6:68 | lodash. ... {}, x) | tst.js:6:44:6:64 | functio ... ent) {} | 1 | tst.js:6:29:6:68 | lodash. ... {}, x) |
| tst.js:7:29:7:65 | R.parti ... }, [x]) | tst.js:7:39:7:59 | functio ... ent) {} | 1 | tst.js:7:29:7:65 | R.parti ... }, [x]) |
| tst.js:8:29:8:72 | angular ... {}, x) | tst.js:8:48:8:68 | functio ... ent) {} | 1 | tst.js:8:29:8:72 | angular ... {}, x) |
| tst.js:11:29:11:43 | f.bind(this, x) | tst.js:11:29:11:29 | f | 1 | tst.js:11:29:11:43 | f.bind(this, x) |
isPartialArgument
| closure.js:4:29:4:69 | goog.bi ... his, x) | closure.js:4:39:4:59 | functio ... ent) {} | closure.js:4:68:4:68 | x | 0 |
| tst.js:5:29:5:63 | functio ... his, x) | tst.js:5:29:5:49 | functio ... ent) {} | tst.js:5:62:5:62 | x | 0 |
| tst.js:6:29:6:68 | lodash. ... {}, x) | tst.js:6:44:6:64 | functio ... ent) {} | tst.js:6:67:6:67 | x | 0 |
| tst.js:7:29:7:65 | R.parti ... }, [x]) | tst.js:7:39:7:59 | functio ... ent) {} | tst.js:7:63:7:63 | x | 0 |
| tst.js:8:29:8:72 | angular ... {}, x) | tst.js:8:48:8:68 | functio ... ent) {} | tst.js:8:71:8:71 | x | 0 |
| tst.js:11:29:11:43 | f.bind(this, x) | tst.js:11:29:11:29 | f | tst.js:11:42:11:42 | x | 0 |
getBoundReceiver
| closure.js:4:29:4:69 | goog.bi ... his, x) | closure.js:4:62:4:65 | this |
| tst.js:5:29:5:63 | functio ... his, x) | tst.js:5:56:5:59 | this |
| tst.js:8:29:8:72 | angular ... {}, x) | tst.js:8:42:8:45 | this |
| tst.js:11:29:11:43 | f.bind(this, x) | tst.js:11:36:11:39 | this |
clickEvent
| closure.js:4:51:4:55 | event |
| tst.js:5:41:5:45 | event |
| tst.js:6:56:6:60 | event |
| tst.js:7:51:7:55 | event |
| tst.js:8:60:8:64 | event |
| tst.js:10:17:10:21 | event |

View File

@@ -0,0 +1,21 @@
import javascript
query
DataFlow::Node getBoundFunction(DataFlow::PartialInvokeNode invoke, DataFlow::Node callback, int boundArgs) {
result = invoke.getBoundFunction(callback, boundArgs)
}
query
predicate isPartialArgument(DataFlow::PartialInvokeNode invoke, DataFlow::Node callback, DataFlow::Node argument, int index) {
invoke.isPartialArgument(callback, argument, index)
}
query
DataFlow::Node getBoundReceiver(DataFlow::PartialInvokeNode invoke) {
result = invoke.getBoundReceiver()
}
query
DataFlow::Node clickEvent() {
result = DataFlow::globalVarRef("addEventListener").getACall().getABoundCallbackParameter(1, 0)
}

View File

@@ -0,0 +1,12 @@
let lodash = require('lodash');
let R = require('ramda');
function test(x) {
addEventListener("click", function(x, event) {}.bind(this, x));
addEventListener("click", lodash.partial(function(x, event) {}, x));
addEventListener("click", R.partial(function(x, event) {}, [x]));
addEventListener("click", angular.bind(this, function(x, event) {}, x));
function f(x, event) {}
addEventListener("click", f.bind(this, x));
}

View File

@@ -1,4 +1,5 @@
| tst.ts:4:5:4:21 | x.method("Hello") | tst.ts:15:3:17:3 | public ... x);\\n } |
| tst.ts:9:17:9:33 | new AngryLogger() | tst.ts:20:34:20:33 | (...arg ... rgs); } |
| tst.ts:10:5:10:49 | (newLog ... hello") | tst.ts:15:3:17:3 | public ... x);\\n } |
| tst.ts:10:5:10:49 | (newLog ... hello") | tst.ts:21:3:23:3 | public ... ");\\n } |
| tst.ts:20:34:20:33 | super(...args) | tst.ts:14:14:14:13 | () {} |

View File

@@ -4,7 +4,7 @@ class MyClass {
x.method("Hello");
// Resolve based on local dataflow.
// Type information should not degrade call graph precision.
// Type information may degrade call graph precision.
var newLogger: Logger;
newLogger = new AngryLogger();
(newLogger as Logger).method("I said, hello");

View File

@@ -0,0 +1 @@
| tst.ts:2:5:2:22 | declare x: number; | true |

View File

@@ -0,0 +1,5 @@
import javascript
from FieldDeclaration f, boolean ambient
where if f.isAmbient() then ambient = true else ambient = false
select f, ambient

View File

@@ -0,0 +1,3 @@
class C {
declare x: number;
}

View File

@@ -0,0 +1 @@
| tst.ts:7:9:7:19 | import.meta |

View File

@@ -0,0 +1,5 @@
import javascript
from Expr prop
where prop instanceof ImportMetaExpr
select prop

View File

@@ -0,0 +1,3 @@
{
}

View File

@@ -0,0 +1,7 @@
interface ImportMeta {
wellKnownProperty: { a: number, b: string, c: boolean };
}
var a = import.meta.wellKnownProperty.a;

View File

@@ -1,10 +1,8 @@
| p1 | MyPromise<string> | string |
| p2 | MyPromise<any> | any |
| p3 | Promise<string> | string |
| p4 | PromiseLike<string> | string |
| p5 | PromiseLike<string> | string |
| p6 | Thenable<string> | string |
| p7 | Thenable<string> | string |
| p8 | ThenPromise<string> | string |
| p9 | JQueryPromise<string> | string |
| p10 | JQueryGenericPromise<string> | string |

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_IsTypeExpr(IsTypeExpr type, VarTypeAccess res0, TypeExpr res1) {
res0 = type.getParameterName() and res1 = type.getPredicateType()
}

View File

@@ -0,0 +1,13 @@
import javascript
query predicate test_IsTypeExpr(IsTypeExpr type, VarTypeAccess res0, TypeExpr res1) {
res0 = type.getParameterName() and res1 = type.getPredicateType()
}
query predicate test_PredicateTypeExpr(PredicateTypeExpr type, VarTypeAccess res0) {
res0 = type.getParameterName()
}
query predicate test_hasAssertsKeyword(PredicateTypeExpr type) {
type.hasAssertsKeyword()
}

View File

@@ -105,6 +105,9 @@ test_VariableTypes
| tst.ts:135:5:135:24 | tupleWithRestElement | tupleWithRestElement | tst.ts:135:27:135:47 | [number ... ring[]] |
| tst.ts:136:5:136:36 | tupleWi ... lements | tupleWithOptionalAndRestElements | tst.ts:136:39:136:68 | [number ... mber[]] |
| tst.ts:137:5:137:15 | unknownType | unknownType | tst.ts:137:18:137:24 | unknown |
| tst.ts:142:17:142:25 | condition | condition | tst.ts:142:28:142:30 | any |
| tst.ts:142:33:142:35 | msg | msg | tst.ts:142:39:142:44 | string |
| tst.ts:148:25:148:27 | val | val | tst.ts:148:30:148:32 | any |
test_QualifiedTypeAccess
| tst.ts:63:19:63:21 | N.I | tst.ts:63:19:63:19 | N | tst.ts:63:21:63:21 | I |
| tst.ts:64:20:64:24 | N.M.I | tst.ts:64:20:64:22 | N.M | tst.ts:64:24:64:24 | I |
@@ -148,6 +151,17 @@ test_IsTypeExpr
| tst.ts:76:21:76:32 | that is Leaf | tst.ts:76:21:76:24 | that | tst.ts:76:29:76:32 | Leaf |
| tst.ts:80:36:80:55 | x is Generic<Leaf[]> | tst.ts:80:36:80:36 | x | tst.ts:80:41:80:55 | Generic<Leaf[]> |
| tst.ts:81:38:81:50 | x is typeof x | tst.ts:81:38:81:38 | x | tst.ts:81:43:81:50 | typeof x |
| tst.ts:148:36:148:56 | asserts ... string | tst.ts:148:44:148:46 | val | tst.ts:148:51:148:56 | string |
test_PredicateTypeExpr
| tst.ts:75:17:75:28 | this is Leaf | tst.ts:75:17:75:20 | this |
| tst.ts:76:21:76:32 | that is Leaf | tst.ts:76:21:76:24 | that |
| tst.ts:80:36:80:55 | x is Generic<Leaf[]> | tst.ts:80:36:80:36 | x |
| tst.ts:81:38:81:50 | x is typeof x | tst.ts:81:38:81:38 | x |
| tst.ts:142:48:142:64 | asserts condition | tst.ts:142:56:142:64 | condition |
| tst.ts:148:36:148:56 | asserts ... string | tst.ts:148:44:148:46 | val |
test_hasAssertsKeyword
| tst.ts:142:48:142:64 | asserts condition |
| tst.ts:148:36:148:56 | asserts ... string |
test_ThisParameterTypes
| function hasThisParam | tst.ts:116:29:116:32 | void |
| method hasThisParam of interface InterfaceWithThisParam | tst.ts:119:22:119:43 | Interfa ... isParam |
@@ -254,6 +268,8 @@ test_ReturnTypes
| tst.ts:94:1:94:37 | functio ... rn x; } | function f1 | tst.ts:94:23:94:23 | S |
| tst.ts:95:1:95:53 | functio ... x,y]; } | function f2 | tst.ts:95:31:95:35 | [S,T] |
| tst.ts:96:1:96:52 | functio ... rn x; } | function f3 | tst.ts:96:38:96:38 | S |
| tst.ts:142:1:146:1 | functio ... )\\n }\\n} | function assert | tst.ts:142:48:142:64 | asserts condition |
| tst.ts:148:1:152:1 | functio ... ;\\n }\\n} | function assertIsString | tst.ts:148:36:148:56 | asserts ... string |
test_KeyofTypeExpr
| tst.ts:49:16:49:30 | keyof Interface | tst.ts:49:22:49:30 | Interface |
| tst.ts:113:26:113:35 | keyof Node | tst.ts:113:32:113:35 | Node |

View File

@@ -11,7 +11,7 @@ import GenericTypeExpr
import IntersectionTypeExpr
import FunctionTypeReturns
import InterfaceTypeExpr
import IsTypeExpr
import PredicateTypeExpr
import ThisParameterTypes
import ChildIndex
import TypeArguments

View File

@@ -138,3 +138,15 @@ let unknownType: unknown;
let taggedTemplateLiteralTypeArg1 = someTag<number>`Hello`;
let taggedTemplateLiteralTypeArg2 = someTag<number, string>`Hello`;
function assert(condition: any, msg?: string): asserts condition {
if (!condition) {
throw new AssertionError(msg)
}
}
function assertIsString(val: any): asserts val is string {
if (typeof val !== "string") {
throw new AssertionError("Not a string!");
}
}

View File

@@ -93,6 +93,30 @@
| tst.ts:43:28:43:30 | foo | "foo" |
| tst.ts:43:33:43:37 | "foo" | "foo" |
| 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 |
| type_alias.ts:14:10:14:17 | property | string |
| type_alias.ts:17:5:17:8 | json | Json |
| type_alias.ts:21:18:21:35 | [key: string]: any | any |
| type_alias.ts:21:19:21:21 | key | string |
| type_alias.ts:23:7:23:12 | myNode | VirtualNode |
| type_alias.ts:24:5:27:5 | ["div", ... ]\\n ] | VirtualNode |
| type_alias.ts:24:6:24:10 | "div" | "div" |
| type_alias.ts:24:13:24:28 | { id: "parent" } | string \| { [key: string]: any; } |
| type_alias.ts:24:15:24:16 | id | string |
| type_alias.ts:24:19:24:26 | "parent" | "parent" |
| type_alias.ts:25:9:25:61 | ["div", ... child"] | VirtualNode |
| type_alias.ts:25:10:25:14 | "div" | "div" |
| type_alias.ts:25:17:25:37 | { id: " ... hild" } | string \| { [key: string]: any; } |
| type_alias.ts:25:19:25:20 | id | string |
| type_alias.ts:25:23:25:35 | "first-child" | "first-child" |
| type_alias.ts:25:40:25:60 | "I'm th ... child" | "I'm the first child" |
| type_alias.ts:26:9:26:63 | ["div", ... child"] | VirtualNode |
| type_alias.ts:26:10:26:14 | "div" | "div" |
| type_alias.ts:26:17:26:38 | { id: " ... hild" } | string \| { [key: string]: any; } |
| type_alias.ts:26:19:26:20 | id | string |
| type_alias.ts:26:23:26:36 | "second-child" | "second-child" |
| type_alias.ts:26:41:26:62 | "I'm th ... child" | "I'm the second child" |
| type_definition_objects.ts:1:13:1:17 | dummy | typeof dummy.ts |
| type_definition_objects.ts:1:24:1:32 | "./dummy" | any |
| type_definition_objects.ts:3:14:3:14 | C | C |
@@ -115,4 +139,4 @@
| type_definitions.ts:16:5:16:9 | color | Color |
| type_definitions.ts:18:6:18:22 | EnumWithOneMember | EnumWithOneMember |
| type_definitions.ts:19:5:19:5 | e | EnumWithOneMember |
| type_definitions.ts:22:5:22:23 | aliasForNumberArray | number[] |
| type_definitions.ts:22:5:22:23 | aliasForNumberArray | Alias<number> |

View File

@@ -1,8 +1,11 @@
| 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 |
| type_alias.ts:19:1:21:57 | type Vi ... ode[]]; | VirtualNode |
| type_definition_objects.ts:3:8:3:17 | class C {} | C |
| type_definition_objects.ts:6:8:6:16 | enum E {} | E |
| type_definitions.ts:3:1:5:1 | interfa ... x: S;\\n} | I<S> |
| type_definitions.ts:8:1:10:1 | class C ... x: T\\n} | C<T> |
| type_definitions.ts:13:1:15:1 | enum Co ... blue\\n} | Color |
| type_definitions.ts:18:1:18:33 | enum En ... ember } | EnumWithOneMember |
| type_definitions.ts:21:1:21:20 | type Alias<T> = T[]; | T[] |
| type_definitions.ts:21:1:21:20 | type Alias<T> = T[]; | Alias<T> |

View File

@@ -57,20 +57,56 @@
| tst.ts:37:17:37:18 | [] | [] |
| tst.ts:38:27:38:47 | [number ... ring[]] | [number, ...string[]] |
| tst.ts:38:28:38:33 | number | number |
| tst.ts:38:36:38:46 | ...string[] | string[] |
| tst.ts:38:36:38:46 | ...string[] | string |
| tst.ts:38:39:38:44 | string | string |
| tst.ts:38:39:38:46 | string[] | string[] |
| tst.ts:39:39:39:68 | [number ... mber[]] | [number, string?, ...number[]] |
| tst.ts:39:40:39:45 | number | number |
| tst.ts:39:48:39:53 | string | string |
| tst.ts:39:48:39:54 | string? | string |
| tst.ts:39:57:39:67 | ...number[] | number[] |
| tst.ts:39:57:39:67 | ...number[] | number |
| tst.ts:39:60:39:65 | number | number |
| tst.ts:39:60:39:67 | number[] | number[] |
| tst.ts:40:18:40:24 | 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 |
| type_alias.ts:5:6:5:17 | ValueOrArray | ValueOrArray<T> |
| type_alias.ts:5:19:5:19 | T | T |
| type_alias.ts:5:24:5:24 | T | T |
| type_alias.ts:5:24:5:49 | T \| Arr ... ray<T>> | ValueOrArray<T> |
| type_alias.ts:5:28:5:32 | Array | T[] |
| type_alias.ts:5:28:5:49 | Array<V ... ray<T>> | ValueOrArray<T>[] |
| type_alias.ts:5:34:5:45 | ValueOrArray | ValueOrArray<T> |
| type_alias.ts:5:34:5:48 | ValueOrArray<T> | ValueOrArray<T> |
| type_alias.ts:5:47:5:47 | T | T |
| type_alias.ts:7:8:7:19 | ValueOrArray | ValueOrArray<T> |
| type_alias.ts:7:8:7:27 | ValueOrArray<number> | ValueOrArray<number> |
| type_alias.ts:7:21:7:26 | number | number |
| type_alias.ts:9:6:9:9 | Json | Json |
| type_alias.ts:10:5:15:12 | \| strin ... Json[] | Json |
| type_alias.ts:10:7:10:12 | string | string |
| type_alias.ts:11:7:11:12 | number | number |
| type_alias.ts:12:7:12:13 | boolean | boolean |
| type_alias.ts:13:7:13:10 | null | null |
| type_alias.ts:14:7:14:34 | { [prop ... Json } | { [property: string]: Json; } |
| type_alias.ts:14:20:14:25 | string | string |
| type_alias.ts:14:29:14:32 | Json | Json |
| type_alias.ts:15:7:15:10 | Json | Json |
| type_alias.ts:15:7:15:12 | Json[] | Json[] |
| type_alias.ts:17:11:17:14 | Json | Json |
| type_alias.ts:19:6:19:16 | VirtualNode | VirtualNode |
| type_alias.ts:20:5:21:56 | \| strin ... Node[]] | VirtualNode |
| type_alias.ts:20:7:20:12 | string | string |
| type_alias.ts:21:7:21:56 | [string ... Node[]] | [string, { [key: string]: any; }, ...VirtualNod... |
| type_alias.ts:21:8:21:13 | string | string |
| type_alias.ts:21:16:21:37 | { [key: ... : any } | { [key: string]: any; } |
| type_alias.ts:21:24:21:29 | string | string |
| type_alias.ts:21:33:21:35 | any | any |
| type_alias.ts:21:40:21:55 | ...VirtualNode[] | VirtualNode |
| type_alias.ts:21:43:21:53 | VirtualNode | VirtualNode |
| type_alias.ts:21:43:21:55 | VirtualNode[] | VirtualNode[] |
| type_alias.ts:23:15:23:25 | VirtualNode | VirtualNode |
| type_definitions.ts:3:11:3:11 | I | I<S> |
| type_definitions.ts:3:13:3:13 | S | S |
| type_definitions.ts:4:6:4:6 | S | S |
@@ -84,10 +120,10 @@
| type_definitions.ts:11:10:11:15 | number | number |
| type_definitions.ts:16:12:16:16 | Color | Color |
| type_definitions.ts:19:8:19:24 | EnumWithOneMember | EnumWithOneMember |
| type_definitions.ts:21:6:21:10 | Alias | T[] |
| type_definitions.ts:21:6:21:10 | Alias | Alias<T> |
| type_definitions.ts:21:12:21:12 | T | T |
| type_definitions.ts:21:17:21:17 | T | T |
| type_definitions.ts:21:17:21:19 | T[] | T[] |
| type_definitions.ts:22:26:22:30 | Alias | T[] |
| type_definitions.ts:22:26:22:38 | Alias<number> | number[] |
| type_definitions.ts:21:17:21:19 | T[] | Alias<T> |
| type_definitions.ts:22:26:22:30 | Alias | Alias<T> |
| type_definitions.ts:22:26:22:38 | Alias<number> | Alias<number> |
| type_definitions.ts:22:32:22:37 | number | number |

View File

@@ -1,3 +1,5 @@
| 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 | 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} |
@@ -9,3 +11,7 @@
| EnumWithOneMember | type_definitions.ts:18:26:18:31 | member |
| I<S> | type_definitions.ts:3:1:5:1 | interfa ... x: S;\\n} |
| I<number> | type_definitions.ts:3:1:5:1 | interfa ... x: S;\\n} |
| Json | type_alias.ts:9:1:15:13 | type Js ... Json[]; |
| ValueOrArray<T> | type_alias.ts:5:1:5:50 | type Va ... ay<T>>; |
| ValueOrArray<number> | type_alias.ts:5:1:5:50 | type Va ... ay<T>>; |
| VirtualNode | type_alias.ts:19:1:21:57 | type Vi ... ode[]]; |

View File

@@ -1,3 +1,27 @@
type B = boolean;
var b: B;
type ValueOrArray<T> = T | Array<ValueOrArray<T>>;
var c: ValueOrArray<number>;
type Json =
| string
| number
| boolean
| null
| { [property: string]: Json }
| Json[];
var json: Json;
type VirtualNode =
| string
| [string, { [key: string]: any }, ...VirtualNode[]];
const myNode: VirtualNode =
["div", { id: "parent" },
["div", { id: "first-child" }, "I'm the first child"],
["div", { id: "second-child" }, "I'm the second child"]
];