mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge pull request #766 from asger-semmle/ts-compiler-3.2
TS: Support TypeScript 3.2
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
| tst.ts:1:25:1:28 | 100n | 100.0 |
|
||||
| tst.ts:2:25:2:56 | 1000000 ... 000000n | 1.0E30 |
|
||||
| tst.ts:3:25:3:56 | 1000000 ... 000000n | 1.0E30 |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteral literal
|
||||
select literal, literal.getFloatValue()
|
||||
@@ -0,0 +1 @@
|
||||
| tst.ts:1:25:1:28 | 100n | 100 |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteral literal
|
||||
select literal, literal.getIntValue()
|
||||
@@ -0,0 +1,4 @@
|
||||
| tst.ts:1:5:1:11 | hundred |
|
||||
| tst.ts:2:5:2:12 | bigValue |
|
||||
| tst.ts:3:5:3:20 | bigNegativeValue |
|
||||
| tst.ts:5:5:5:14 | bigintType |
|
||||
@@ -0,0 +1,5 @@
|
||||
import javascript
|
||||
|
||||
from Expr e
|
||||
where e.getType() instanceof BigIntType
|
||||
select e
|
||||
@@ -0,0 +1 @@
|
||||
| tst.ts:6:24:6:28 | 1000n | 1000 |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteralTypeExpr type
|
||||
select type, type.getIntValue()
|
||||
@@ -0,0 +1 @@
|
||||
| tst.ts:5:24:5:29 | bigint |
|
||||
@@ -0,0 +1,5 @@
|
||||
import javascript
|
||||
|
||||
from TypeExpr type
|
||||
where type.isBigInt()
|
||||
select type
|
||||
@@ -0,0 +1 @@
|
||||
| 1000n | 1000 |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteralType type
|
||||
select type, type.getIntValue()
|
||||
@@ -0,0 +1 @@
|
||||
{"include": ["."]}
|
||||
@@ -0,0 +1,6 @@
|
||||
let hundred = 100n;
|
||||
let bigValue = 1000000000000000000000000000000n;
|
||||
let bigNegativeValue = -1000000000000000000000000000000n;
|
||||
|
||||
let bigintType: bigint;
|
||||
let bigintLiteralType: 1000n;
|
||||
@@ -41,7 +41,7 @@
|
||||
| tst.ts:29:22:29:26 | never | never |
|
||||
| tst.ts:30:17:30:22 | symbol | symbol |
|
||||
| tst.ts:31:25:31:37 | unique symbol | unique symbol |
|
||||
| tst.ts:32:17:32:22 | object | any |
|
||||
| tst.ts:32:17:32:22 | object | object |
|
||||
| tst.ts:33:19:33:24 | string | string |
|
||||
| tst.ts:33:19:33:38 | string & {x: string} | string & { x: string; } |
|
||||
| tst.ts:33:28:33:38 | {x: string} | { x: string; } |
|
||||
|
||||
Reference in New Issue
Block a user