File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
trackers/react-native-tracker/src Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 7979 working-directory : ./trackers/react-native-tracker
8080 run : |
8181 api-extractor run
82- api-documenter markdown --input-folder temp --output-folder ../../api-docs/docs/node -tracker/markdown
82+ api-documenter markdown --input-folder temp --output-folder ../../api-docs/docs/react-native -tracker/markdown
8383
8484 - name : Apply API documentation updates
8585 run : |
Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ export interface SessionConfiguration {
6161 sessionContext ?: boolean ;
6262}
6363
64+ /**
65+ * A callback to be used for the `onMessage` prop of a `WebView` component.
66+ */
67+ export type WebViewMessageHandler = ( message : { nativeEvent : { data : string } } ) => void ;
68+
6469/**
6570 * Configuration for app lifecycle tracking
6671 */
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import type {
1010 TrackerCore ,
1111 PayloadBuilder ,
1212 Payload ,
13+ WebViewMessageHandler ,
1314} from './types' ;
1415
1516/**
@@ -115,8 +116,8 @@ function webViewPayloadBuilder(pb: PayloadBuilder): PayloadBuilder {
115116 *
116117 * @returns Callback to subscribe for events from Web views tracked using the Snowplow WebView tracker.
117118 */
118- export function getWebViewCallback ( ) {
119- return ( message : { nativeEvent : { data : string } } ) : void => {
119+ export function getWebViewCallback ( ) : WebViewMessageHandler {
120+ return ( message ) => {
120121 const data = JSON . parse ( message . nativeEvent . data ) as WebViewMessage ;
121122 switch ( data . command ) {
122123 case 'trackSelfDescribingEvent' :
You can’t perform that action at this time.
0 commit comments