mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: Add Firebase test with types
This commit is contained in:
@@ -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
generated
vendored
Normal file
10
javascript/ql/test/library-tests/frameworks/Firebase/node_modules/firebase/index.d.ts
generated
vendored
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"]
|
||||
}
|
||||
Reference in New Issue
Block a user