File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* eslint-disable @typescript-eslint/no-wrapper-object-types */
12import type { TurboModule } from 'react-native' ;
23import { TurboModuleRegistry } from 'react-native' ;
34
45// NOTE: No types can be imported because of the way new arch works, so we have
56// to re-define the types here.
67// Codegen (RN 0.84+) rejects unions that include array types (e.g. `T[] | U`,
7- // `string | string[]`). Use `Object` / `unknown` where the bridge carries
8- // richer JSON than the parser allows .
8+ // `string | string[]`). Use capital `Object` (not TS `object`) for loose maps;
9+ // lowercase `object` is TSObjectKeyword and fails iOS/Android codegen .
910export interface Spec extends TurboModule {
1011 // Initialization
1112 initializeWithApiKey (
1213 apiKey : string ,
13- config : object ,
14+ config : Object ,
1415 version : string
1516 ) : Promise < boolean > ;
1617
1718 initialize2WithApiKey (
1819 apiKey : string ,
19- config : object ,
20+ config : Object ,
2021 version : string ,
2122 apiEndPointOverride : string
2223 ) : Promise < boolean > ;
@@ -130,9 +131,9 @@ export interface Spec extends TurboModule {
130131 endEmbeddedSession ( ) : void ;
131132 startEmbeddedImpression ( messageId : string , placementId : number ) : void ;
132133 pauseEmbeddedImpression ( messageId : string ) : void ;
133- getEmbeddedMessages ( placementIds : number [ ] ) : Promise < object [ ] > ;
134+ getEmbeddedMessages ( placementIds : number [ ] ) : Promise < Object [ ] > ;
134135 trackEmbeddedClick (
135- message : object ,
136+ message : Object ,
136137 buttonId : string | null ,
137138 clickedUrl : string | null
138139 ) : void ;
Original file line number Diff line number Diff line change @@ -425,8 +425,8 @@ export class IterableConfig {
425425 *
426426 * TODO: Figure out if this is purposeful
427427 */
428- // eslint-disable-next-line eqeqeq
429428 onEmbeddedMessagingDisabledPresent :
429+ // eslint-disable-next-line eqeqeq
430430 this . onEmbeddedMessagingDisabled != undefined ,
431431 /** The log level for the SDK. */
432432 logLevel : this . logLevel ,
You can’t perform that action at this time.
0 commit comments