File tree Expand file tree Collapse file tree
react-native-network-logger-native Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ module.exports = {
22 dependency : {
33 platforms : {
44 android : {
5- packageImportPath : 'import com.rnnetworkloggernative.RNNetworkLoggerNativePackage;' ,
5+ packageImportPath :
6+ 'import com.rnnetworkloggernative.RNNetworkLoggerNativePackage;' ,
67 packageInstance : 'new RNNetworkLoggerNativePackage()' ,
78 } ,
89 } ,
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ type NativeNetworkModule = {
5252} ;
5353
5454const moduleName = 'RNNetworkLoggerNativeTransport' ;
55- const nativeModule = NativeModules [ moduleName ] as NativeNetworkModule | undefined ;
55+ const nativeModule = NativeModules [ moduleName ] as
56+ | NativeNetworkModule
57+ | undefined ;
5658
5759let openCallback : OpenCallback = ( ) => { } ;
5860let requestHeaderCallback : RequestHeaderCallback = ( ) => { } ;
@@ -99,10 +101,13 @@ const addSubscriptions = () => {
99101 requestHeaderCallback ( header , value , xhr ) ;
100102 }
101103 ) ,
102- emitter . addListener ( 'networkLoggerRequestSend' , ( { id, body } : NativeRequestSendEvent ) => {
103- const xhr = getXHR ( id ) ;
104- sendCallback ( body || '' , xhr ) ;
105- } ) ,
104+ emitter . addListener (
105+ 'networkLoggerRequestSend' ,
106+ ( { id, body } : NativeRequestSendEvent ) => {
107+ const xhr = getXHR ( id ) ;
108+ sendCallback ( body || '' , xhr ) ;
109+ }
110+ ) ,
106111 emitter . addListener (
107112 'networkLoggerResponseHeaders' ,
108113 ( {
You can’t perform that action at this time.
0 commit comments