Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Commit

Permalink
fix(analytics): ts logEvent params arg should be optional (invertase#…
Browse files Browse the repository at this point in the history
…2822)

* Fix analytics log event params not optional when it should be

* Update Flow analytics log event type not in sync
  • Loading branch information
TomBerriot authored and Salakar committed Nov 25, 2019
1 parent a4070eb commit 2e0547c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ export namespace FirebaseAnalyticsTypes {
* @param name Event name must not conflict with any Reserved Events.
* @param params Parameters to be sent and displayed with the event.
*/
logEvent(name: string, params: { [key: string]: string | number | boolean }): Promise<void>;
logEvent(name: string, params?: { [key: string]: string | number | boolean } | {} ): Promise<void>;

/**
* If true, allows the device to collect analytical data and send it to
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ export interface Module extends ReactNativeFirebaseModule {
* @param name Event name must not conflict with any Reserved Events. 100 characters is the maximum length for param key names.
* @param params Parameters to be sent and displayed with the event.
*/
logEvent(name: string, params: { [key: string]: string }): Promise<void>;
logEvent(name: string, params?: { [key: string]: string | number | boolean } | {}): Promise<void>;

/**
* If true, allows the device to collect analytical data and send it to Firebase.
Expand Down

0 comments on commit 2e0547c

Please sign in to comment.