xxxxxxxxxx
// create file : module.d.ts
declare module 'react-native-vector-icons/*';
xxxxxxxxxx
// When a module is not yours - try to install types from @types:
npm install -D @types/module-name
// If the above install errors - try changing import statements to require:
// import * as yourModuleName from 'module-name';
const yourModuleName = require('module-name');
const { abc } = yourModuleName;
// works like a charm
xxxxxxxxxx
yarn add @types/react-router-dom -D
Instead of using **<BrowserRouter>** use
<Router>
<Switch>
<Route path="/" component={componentName}/>
</Switch>
</Router>
xxxxxxxxxx
npm install -D @types/module-name