UNPKG

@withjoy/sdk-js

Version:
18 lines (17 loc) 896 B
/** * This class acts as a thin wrapper over the database schema, so that the rest of the application can just * deal with business objects instead of database paths. Hence most of the functions in this class are of the form * "observeX", where X is a Business object. Internally we divert this call to the right path in firebase and start * the listeners. * * Another feature of this class is to manage listener lifetimes. In many cases it is hard to know the right set of * listeners which should be turned off when a particular UI stops showing. The way to deal with this is to give * each UI compoenent a new FirebaseDataSource, which maintains its own list of listners and they can be turned off * with a single call. * * * @param eventFirebase * @constructor */ declare var FirebaseDataSource: (eventFirebase: any) => void; export default FirebaseDataSource;