mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
TS: Fix a crash when allowJs: true was set
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
import f = require("./tst");
|
||||
f("world");
|
||||
@@ -0,0 +1,5 @@
|
||||
| main.ts:1:8:1:8 | f | (x: string) => string |
|
||||
| main.ts:1:20:1:26 | "./tst" | any |
|
||||
| main.ts:2:1:2:1 | f | (x: string) => string |
|
||||
| main.ts:2:1:2:10 | f("world") | string |
|
||||
| main.ts:2:3:2:9 | "world" | "world" |
|
||||
@@ -0,0 +1,4 @@
|
||||
import javascript
|
||||
|
||||
from Expr e
|
||||
select e, e.getType()
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowJs": true
|
||||
},
|
||||
"include": ["."]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* @param {String} x
|
||||
*/
|
||||
module.exports = function(x) {
|
||||
return 'Hello ' + x;
|
||||
}
|
||||
Reference in New Issue
Block a user