File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import type { View as RNView } from 'react-native' ;
2
2
3
3
jest . mock ( 'react-native-webview' , ( ) => {
4
- const { View} = require ( 'react-native' ) ;
4
+ const { View} = require < { View : RNView } > ( 'react-native' ) ;
5
5
return {
6
- WebView : ( ) => View as RNView ,
6
+ WebView : ( ) => View ,
7
7
} ;
8
8
} ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ type PreloadWebpackPluginClass = {
24
24
} ;
25
25
26
26
// require is necessary, there are no types for this package and the declaration file can't be seen by the build process which causes an error.
27
- const PreloadWebpackPlugin : PreloadWebpackPluginClass = require ( '@vue/preload-webpack-plugin' ) ;
27
+ const PreloadWebpackPlugin = require < PreloadWebpackPluginClass > ( '@vue/preload-webpack-plugin' ) ;
28
28
29
29
const includeModules = [
30
30
'react-native-animatable' ,
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ const Performance: PerformanceModule = {
92
92
} ;
93
93
94
94
if ( Metrics . canCapturePerformanceMetrics ( ) ) {
95
- const perfModule : ReactNativePerformance = require ( 'react-native-performance' ) ;
95
+ const perfModule = require < ReactNativePerformance > ( 'react-native-performance' ) ;
96
96
perfModule . setResourceLoggingEnabled ( true ) ;
97
97
rnPerformance = perfModule . default ;
98
98
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import Config from 'react-native-config';
6
6
const useWDYR = Config ?. USE_WDYR === 'true' ;
7
7
8
8
if ( useWDYR ) {
9
- const whyDidYouRender : typeof WhyDidYouRender = require ( '@welldone-software/why-did-you-render' ) ;
9
+ const whyDidYouRender = require < typeof WhyDidYouRender > ( '@welldone-software/why-did-you-render' ) ;
10
10
whyDidYouRender ( React , {
11
11
// Enable tracking in all pure components by default
12
12
trackAllPureComponents : true ,
You can’t perform that action at this time.
0 commit comments