Merge remote-tracking branch 'origin/master'

This commit is contained in:
Salakar 2017-11-28 14:47:42 +00:00
commit f60fe530d6
2 changed files with 13 additions and 8 deletions

View File

@ -76,6 +76,9 @@
# Ignore dist folder
.*/dist/.*
# Ignore tests project
.*/tests/.*
[include]
node_modules/fbjs/lib

View File

@ -4,6 +4,8 @@
*/
import ModuleBase from './../../utils/ModuleBase';
import type FirebaseApp from '../core/firebase-app';
const AlphaNumericUnderscore = /^[a-zA-Z0-9_]+$/;
const ReservedEventNames = [
@ -26,7 +28,7 @@ export default class Analytics extends ModuleBase {
static _NAMESPACE = 'analytics';
static _NATIVE_MODULE = 'RNFirebaseAnalytics';
constructor(firebaseApp: Object, options: Object = {}) {
constructor(firebaseApp: FirebaseApp, options: Object = {}) {
super(firebaseApp, options);
}
@ -55,7 +57,7 @@ export default class Analytics extends ModuleBase {
// types are supported. String parameter values can be up to 36 characters long. The "firebase_"
// prefix is reserved and should not be used for parameter names.
return this._native.logEvent(name, params);
this._native.logEvent(name, params);
}
/**
@ -63,7 +65,7 @@ export default class Analytics extends ModuleBase {
* @param enabled
*/
setAnalyticsCollectionEnabled(enabled: boolean): void {
return this._native.setAnalyticsCollectionEnabled(enabled);
this._native.setAnalyticsCollectionEnabled(enabled);
}
/**
@ -72,7 +74,7 @@ export default class Analytics extends ModuleBase {
* @param screenClassOverride
*/
setCurrentScreen(screenName: string, screenClassOverride: string): void {
return this._native.setCurrentScreen(screenName, screenClassOverride);
this._native.setCurrentScreen(screenName, screenClassOverride);
}
/**
@ -80,7 +82,7 @@ export default class Analytics extends ModuleBase {
* @param milliseconds
*/
setMinimumSessionDuration(milliseconds: number = 10000): void {
return this._native.setMinimumSessionDuration(milliseconds);
this._native.setMinimumSessionDuration(milliseconds);
}
/**
@ -88,7 +90,7 @@ export default class Analytics extends ModuleBase {
* @param milliseconds
*/
setSessionTimeoutDuration(milliseconds: number = 1800000): void {
return this._native.setSessionTimeoutDuration(milliseconds);
this._native.setSessionTimeoutDuration(milliseconds);
}
/**
@ -96,7 +98,7 @@ export default class Analytics extends ModuleBase {
* @param id
*/
setUserId(id: string): void {
return this._native.setUserId(id);
this._native.setUserId(id);
}
/**
@ -105,7 +107,7 @@ export default class Analytics extends ModuleBase {
* @param value
*/
setUserProperty(name: string, value: string): void {
return this._native.setUserProperty(name, value);
this._native.setUserProperty(name, value);
}
/**