mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-22 19:57:51 +08:00
[internals][types] Fix a couple of minor issues
This commit is contained in:
@@ -101,10 +101,6 @@ export default class AdMob extends ModuleBase {
|
||||
rewarded(adUnit: string): RewardedVideo {
|
||||
return new RewardedVideo(this, adUnit);
|
||||
}
|
||||
|
||||
get namespace(): string {
|
||||
return 'firebase:admob';
|
||||
}
|
||||
}
|
||||
|
||||
export const statics = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getNativeModule(this._auth)/**
|
||||
/**
|
||||
* @flow
|
||||
* User representation wrapper
|
||||
*/
|
||||
|
||||
@@ -342,10 +342,6 @@ export default class Auth extends ModuleBase {
|
||||
return this._user;
|
||||
}
|
||||
|
||||
get namespace(): string {
|
||||
return 'firebase:auth';
|
||||
}
|
||||
|
||||
/**
|
||||
* KNOWN UNSUPPORTED METHODS
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,7 @@ import type {
|
||||
|
||||
const FirebaseCoreModule = NativeModules.RNFirebase;
|
||||
|
||||
class FirebaseCore {
|
||||
class Firebase {
|
||||
admob: AdMobModule;
|
||||
analytics: AnalyticsModule;
|
||||
auth: AuthModule;
|
||||
@@ -114,4 +114,4 @@ class FirebaseCore {
|
||||
}
|
||||
}
|
||||
|
||||
export default new FirebaseCore();
|
||||
export default new Firebase();
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
* @flow
|
||||
* Disconnect representation wrapper
|
||||
*/
|
||||
import { typeOf } from './../../utils';
|
||||
import { typeOf } from '../../utils';
|
||||
import { getNativeModule } from '../../utils/native';
|
||||
import type Database from './';
|
||||
import type Reference from './reference';
|
||||
|
||||
@@ -32,7 +33,7 @@ export default class Disconnect {
|
||||
* @returns {*}
|
||||
*/
|
||||
set(value: string | Object): Promise<void> {
|
||||
return this._database._native.onDisconnectSet(this.path, { type: typeOf(value), value });
|
||||
return getNativeModule(this._database).onDisconnectSet(this.path, { type: typeOf(value), value });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,7 +42,7 @@ export default class Disconnect {
|
||||
* @returns {*}
|
||||
*/
|
||||
update(values: Object): Promise<void> {
|
||||
return this._database._native.onDisconnectUpdate(this.path, values);
|
||||
return getNativeModule(this._database).onDisconnectUpdate(this.path, values);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,7 +50,7 @@ export default class Disconnect {
|
||||
* @returns {*}
|
||||
*/
|
||||
remove(): Promise<void> {
|
||||
return this._database._native.onDisconnectRemove(this.path);
|
||||
return getNativeModule(this._database).onDisconnectRemove(this.path);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,6 +58,6 @@ export default class Disconnect {
|
||||
* @returns {*}
|
||||
*/
|
||||
cancel(): Promise<void> {
|
||||
return this._database._native.onDisconnectCancel(this.path);
|
||||
return getNativeModule(this._database).onDisconnectCancel(this.path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
getNativeModule(this)/**
|
||||
/**
|
||||
* @flow
|
||||
* Database representation wrapper
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user