From 99cf0cbc4213cd1fea58de24ad4714300829859a Mon Sep 17 00:00:00 2001 From: Alexis <11615615+AlexisAnzieu@users.noreply.github.com> Date: Tue, 22 Nov 2022 11:53:21 -0500 Subject: [PATCH] make fields as optionnal as documention define --- src/CustomerioTracking.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/CustomerioTracking.tsx b/src/CustomerioTracking.tsx index e9ea73b5..3ca9d6f9 100644 --- a/src/CustomerioTracking.tsx +++ b/src/CustomerioTracking.tsx @@ -19,13 +19,13 @@ const LINKING_ERROR = const CustomerioReactnative = NativeModules.CustomerioReactnative ? NativeModules.CustomerioReactnative : new Proxy( - {}, - { - get() { - throw new Error(LINKING_ERROR); - }, - } - ); + {}, + { + get() { + throw new Error(LINKING_ERROR); + }, + } + ); class CustomerIO { /** @@ -63,7 +63,7 @@ class CustomerIO { * @param identifier unique identifier for a profile * @param body (Optional) data to identify a profile */ - static identify(identifier: string, body: Object) { + static identify(identifier: string, body?: Object) { CustomerioReactnative.identify(identifier, body); } @@ -84,7 +84,7 @@ class CustomerIO { * @param name event name to be tracked * @param data (Optional) data to be sent with event */ - static track(name: string, data: Object) { + static track(name: string, data?: Object) { CustomerioReactnative.track(name, data); } @@ -114,7 +114,7 @@ class CustomerIO { * @param name name of the screen user visited * @param data (Optional) any additional data to be sent */ - static screen(name: string, data: Object) { + static screen(name: string, data?: Object) { CustomerioReactnative.screen(name, data); } }