Skip to content

Commit 6553e76

Browse files
author
Overall, Matthew
committed
added basic typings for adapter
1 parent b9172f9 commit 6553e76

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ coverage/
1010
npm-debug.log
1111
junit/
1212
dist/karma.start.js
13-
doc/
13+
doc/
14+
typings/

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"files.exclude": {
33
"**/.git": true,
44
"**/.DS_Store": true,
5-
"**/dist": true
5+
"dist/*.js":true,
6+
"dist/*.map":true
67
}
78
}

dist/js-data-firebase.d.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
/// <reference path="../typings/browser/ambient/firebase/index.d.ts"/>
3+
//todo more tpyings for return types...
4+
5+
import {Adapter} from 'js-data-adapter'
6+
7+
interface IDict {
8+
[key: string]: any;
9+
}
10+
11+
interface IBaseAdapter extends IDict {
12+
debug?: boolean,
13+
raw?: boolean
14+
}
15+
interface IBaseFirebaseAdapter extends IBaseAdapter {
16+
basePath?: string
17+
baseRef?: Firebase
18+
}
19+
export class FirebaseAdapter extends Adapter {
20+
static extend(instanceProps?: IDict, classProps?: IDict): typeof FirebaseAdapter
21+
constructor(opts?: IBaseFirebaseAdapter)
22+
}
23+
export interface version {
24+
full: string
25+
minor: string
26+
major: string
27+
patch: string
28+
alpha: string | boolean
29+
beta: string | boolean
30+
}

typings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "js-data-firebase",
3+
"version": false,
4+
"main": "./dist/js-data-firebase.d.ts",
5+
"ambientDependencies": {
6+
"es6-shim": "registry:dt/es6-shim",
7+
"firebase": "registry:dt/firebase#2.4.1+20160412125105"
8+
}
9+
}

0 commit comments

Comments
 (0)