title: Typescript types from .d.ts file are not visible in the application
body: <p>I was trying to type useContext hook and found this blog post <a href="https://blog.logrocket.com/how-to-use-react-context-with-typescript/" rel="nofollow noreferrer">https://blog.logrocket.com/how-to-use-react-context-with-typescript/</a>
  as author wrote</p>
  <ul>
  <li>The type.d.ts file that contains the TypeScript Types. The extension .d.ts allows using the types in other files without importing them</li>
  </ul>
  <p>and the example shows usage like so:</p>
  <pre><code>const { saveTodo } = React.useContext(TodoContext) as ContextType
  </code></pre>
  <p>so I have created contexts.d.ts and inside I declared a type like so</p>
  <pre><code>import type { UserMetrics } from &quot;../components&quot;;
  type UserMetricsContextType = {
    userMetrics: UserMetrics;
    setUserMetrics: React.Dispatch&lt;React.SetStateAction&lt;UserMetrics&gt;&gt;;
  };
  </code></pre>
  <p>and when I try to use it in the application, I get:</p>
  <pre><code>type UserMetricsContextType = /*unresolved*/ any
  </code></pre>
  <p>Could you please explain what am I doing wrong?</p>
  <p>My tsconfig.json</p>
  <pre><code>{
    &quot;extends&quot;: &quot;expo/tsconfig.base&quot;,
    &quot;include&quot;: [&quot;assets/*&quot;, &quot;components/*&quot;, &quot;types/*&quot;],
    &quot;compilerOptions&quot;: {
      &quot;strict&quot;: true
    }
  }
  </code></pre>
  <p>Thanks</p>