This commit is contained in:
Salakar 2018-02-24 05:53:07 +00:00
parent 6f5eda4215
commit e73812a1e0
2 changed files with 16 additions and 3 deletions

View File

@ -116,10 +116,12 @@ export default class App {
* @param props * @param props
*/ */
extendApp(props: Object) { extendApp(props: Object) {
if (!isObject(props)) if (!isObject(props)) {
throw new Error( throw new Error(
INTERNALS.STRINGS.ERROR_MISSING_ARG('Object', 'extendApp') INTERNALS.STRINGS.ERROR_MISSING_ARG('Object', 'extendApp')
); );
}
const keys = Object.keys(props); const keys = Object.keys(props);
for (let i = 0, len = keys.length; i < len; i++) { for (let i = 0, len = keys.length; i < len; i++) {
@ -167,4 +169,13 @@ export default class App {
}); });
}); });
} }
/**
* toString returns the name of the app.
*
* @return {string}
*/
toString() {
return this._name;
}
} }

View File

@ -38,7 +38,8 @@ export default {
/** /**
* *
* @param statics * @param app
* @param namespace
* @param InstanceClass * @param InstanceClass
* @return {function()} * @return {function()}
* @private * @private
@ -152,8 +153,9 @@ export default {
/** /**
* *
* @param namespace
* @param statics * @param statics
* @param InstanceClass * @param moduleName
* @return {function(App=)} * @return {function(App=)}
*/ */
moduleAndStatics<M: FirebaseModule, S: FirebaseStatics>( moduleAndStatics<M: FirebaseModule, S: FirebaseStatics>(