title: React Navigation Typescript namespace not found
body: <p>When I'm trying to create any navigator( tab/ stack/ drawer) I get this typescript error: <code>Cannot find namespace 'Tab'</code> even when it's defined in the file itself.
  What's the problem and what's the solution?
  I've used the expo typescript template to begin.</p>
  <p><strong>Code:</strong></p>
  <pre><code>import { createBottomTabNavigator } from &quot;@react-navigation/bottom-tabs&quot;;
  import React from &quot;react&quot;;
  
  type bottomTabParams = {};
  
  const Tab = createBottomTabNavigator&lt;bottomTabParams&gt;();
  
  const MyTabs = () =&gt; {
    return (
      &lt;Tab.Navigator&gt;
        &lt;Tab.Screen name=&quot;Home&quot; /&gt;
        &lt;Tab.Screen name=&quot;Settings&quot; /&gt;
      &lt;/Tab.Navigator&gt;
    );
  };
  
  export default MyTabs;
  </code></pre>
  <p><strong>Code with error:</strong>
  <a href="https://i.stack.imgur.com/Ml3VH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ml3VH.png" alt="Problem" /></a></p>
  <p><strong>Dependencies</strong></p>
  <pre><code>&quot;dependencies&quot;: {
      &quot;@react-native-community/masked-view&quot;: &quot;0.1.10&quot;,
      &quot;@react-navigation/bottom-tabs&quot;: &quot;^5.9.1&quot;,
      &quot;@react-navigation/drawer&quot;: &quot;^5.9.2&quot;,
      &quot;@react-navigation/native&quot;: &quot;^5.7.5&quot;,
      &quot;@react-navigation/stack&quot;: &quot;^5.9.2&quot;,
      &quot;expo&quot;: &quot;~39.0.2&quot;,
      &quot;expo-status-bar&quot;: &quot;~1.0.2&quot;,
      &quot;react&quot;: &quot;16.13.1&quot;,
      &quot;react-dom&quot;: &quot;16.13.1&quot;,
      &quot;react-native&quot;: &quot;https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz&quot;,
      &quot;react-native-elements&quot;: &quot;^2.3.2&quot;,
      &quot;react-native-gesture-handler&quot;: &quot;~1.7.0&quot;,
      &quot;react-native-reanimated&quot;: &quot;~1.13.0&quot;,
      &quot;react-native-safe-area-context&quot;: &quot;3.1.4&quot;,
      &quot;react-native-screens&quot;: &quot;~2.10.1&quot;,
      &quot;react-native-web&quot;: &quot;~0.13.12&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@types/react&quot;: &quot;~16.9.35&quot;,
      &quot;@types/react-dom&quot;: &quot;~16.9.8&quot;,
      &quot;@types/react-native&quot;: &quot;~0.63.2&quot;,
      &quot;react-native-web&quot;: &quot;~0.13.7&quot;,
      &quot;typescript&quot;: &quot;~3.9.5&quot;
    },
    &quot;private&quot;: true
  </code></pre>