diff --git a/__mocks__/react-native-webview.ts b/__mocks__/react-native-webview.ts index 8266c7b1eda0..41713f05bf48 100644 --- a/__mocks__/react-native-webview.ts +++ b/__mocks__/react-native-webview.ts @@ -1,8 +1,8 @@ import type {View as RNView} from 'react-native'; jest.mock('react-native-webview', () => { - const {View} = require('react-native'); + const {View} = require<{View: RNView}>('react-native'); return { - WebView: () => View as RNView, + WebView: () => View, }; }); diff --git a/config/webpack/webpack.common.ts b/config/webpack/webpack.common.ts index bedd7e50ef94..da9e5f8d3291 100644 --- a/config/webpack/webpack.common.ts +++ b/config/webpack/webpack.common.ts @@ -24,7 +24,7 @@ type PreloadWebpackPluginClass = { }; // 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. -const PreloadWebpackPlugin: PreloadWebpackPluginClass = require('@vue/preload-webpack-plugin'); +const PreloadWebpackPlugin = require('@vue/preload-webpack-plugin'); const includeModules = [ 'react-native-animatable', diff --git a/src/libs/Performance.tsx b/src/libs/Performance.tsx index 5155722786cf..213e62f916e3 100644 --- a/src/libs/Performance.tsx +++ b/src/libs/Performance.tsx @@ -92,7 +92,7 @@ const Performance: PerformanceModule = { }; if (Metrics.canCapturePerformanceMetrics()) { - const perfModule: ReactNativePerformance = require('react-native-performance'); + const perfModule = require('react-native-performance'); perfModule.setResourceLoggingEnabled(true); rnPerformance = perfModule.default; diff --git a/wdyr.ts b/wdyr.ts index 3f49eb4035a0..e5b40bc3b4c7 100644 --- a/wdyr.ts +++ b/wdyr.ts @@ -6,7 +6,7 @@ import Config from 'react-native-config'; const useWDYR = Config?.USE_WDYR === 'true'; if (useWDYR) { - const whyDidYouRender: typeof WhyDidYouRender = require('@welldone-software/why-did-you-render'); + const whyDidYouRender = require('@welldone-software/why-did-you-render'); whyDidYouRender(React, { // Enable tracking in all pure components by default trackAllPureComponents: true,