Skip to content

Instantly share code, notes, and snippets.

@ghsyeung
Last active August 29, 2015 14:19
Show Gist options
  • Save ghsyeung/1f06de537c98a661152c to your computer and use it in GitHub Desktop.
Save ghsyeung/1f06de537c98a661152c to your computer and use it in GitHub Desktop.
interface FirebaseQuery {
/**
* Listens for data changes at a particular location.
*/
on(eventType: string, callback: (dataSnapshot: FirebaseDataSnapshot, prevChildName?: string) => void, cancelCallback?: (error: any) => void, context?: Object): (dataSnapshot: FirebaseDataSnapshot, prevChildName?: string) => void;
}
interface Firebase extends FirebaseQuery {
/**
* Generates a new child location using a unique name and returns a Firebase reference to it.
* @returns {Firebase} A Firebase reference for the generated location.
*/
push(value?: any, onComplete?: (error: any) => void): Firebase;
}
interface FirebaseStatic {
/**
* Constructs a new Firebase reference from a full Firebase URL.
*/
new (firebaseURL: string): Firebase;
}
declare var Firebase: FirebaseStatic;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment