зеркало из https://github.com/github/codeql.git
JS: Add Firebase test with types
This commit is contained in:
Родитель
ec81e368da
Коммит
d8cda5e268
|
@ -1,3 +1,6 @@
|
|||
| src/import_assign.ts:4:3:4:17 | db.ref("hello") |
|
||||
| src/import_named.ts:4:3:4:17 | db.ref("hello") |
|
||||
| src/import_star.ts:4:3:4:17 | db.ref("hello") |
|
||||
| tst.js:5:1:5:22 | fb.data ... ef('x') |
|
||||
| tst.js:7:3:7:7 | x.ref |
|
||||
| tst.js:7:3:7:14 | x.ref.parent |
|
||||
|
|
10
javascript/ql/test/library-tests/frameworks/Firebase/node_modules/firebase/index.d.ts
сгенерированный
поставляемый
Normal file
10
javascript/ql/test/library-tests/frameworks/Firebase/node_modules/firebase/index.d.ts
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Greatly simplified version of the Firebase d.ts file.
|
||||
|
||||
declare namespace firebase.database {
|
||||
interface Database {
|
||||
ref(name: string): any;
|
||||
}
|
||||
}
|
||||
|
||||
export = firebase;
|
||||
export as namespace firebase;
|
|
@ -0,0 +1,5 @@
|
|||
import firebase = require("firebase");
|
||||
|
||||
function test(db: firebase.database.Database) {
|
||||
db.ref("hello");
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import { database } from "firebase";
|
||||
|
||||
function test(db: database.Database) {
|
||||
db.ref("hello");
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import * as firebase from "firebase";
|
||||
|
||||
function test(db: firebase.database.Database) {
|
||||
db.ref("hello");
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"include": ["src"]
|
||||
}
|
Загрузка…
Ссылка в новой задаче