The React Native module gives Typescript errors when attempting to use strictNullChecks (which is part of the strict profile). By default typescript projects are initialized with stritNullChecks: true.
It would be great if this module would be buildable with strict mode.
These are the errors
Maybe: using Object | null = null ?
node_modules/@rudderstack/rudder-sdk-react-native/src/RudderClient.ts:82:3 - error TS2322: Type 'null' is not assignable to type 'Object'.
82 properties: Object = null,
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@rudderstack/rudder-sdk-react-native/src/RudderClient.ts:83:3 - error TS2322: Type 'null' is not assignable to type 'Object'.
83 options: Object = null
~~~~~~~~~~~~~~~~~~~~~~
node_modules/@rudderstack/rudder-sdk-react-native/src/RudderClient.ts:99:3 - error TS2322: Type 'null' is not assignable to type 'Object'.
99 properties: Object = null,
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@rudderstack/rudder-sdk-react-native/src/RudderClient.ts:100:3 - error TS2322: Type 'null' is not assignable to type 'Object'.
100 options: Object = null
~~~~~~~~~~~~~~~~~~~~~~
node_modules/@rudderstack/rudder-sdk-react-native/src/RudderClient.ts:118:3 - error TS2322: Type 'null' is not assignable to type 'Object'.
118 traitsOrOptions: Object = null,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@rudderstack/rudder-sdk-react-native/src/RudderClient.ts:119:3 - error TS2322: Type 'null' is not assignable to type 'Object'.
119 options: Object = null
~~~~~~~~~~~~~~~~~~~~~~
node_modules/@rudderstack/rudder-sdk-react-native/src/RudderClient.ts:147:39 - error TS2322: Type 'null' is not assignable to type 'Object'.
147 async function group(groupId: string, traits: Object = null) {
~~~~~~~~~~~~~~~~~~~~~
The React Native module gives Typescript errors when attempting to use strictNullChecks (which is part of the strict profile). By default typescript projects are initialized with stritNullChecks: true. It would be great if this module would be buildable with strict mode.
These are the errors
Maybe: using
Object | null = null
?