<p dir="auto">Open a TS file and paste this code:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export type {
  CreateHandle,
  EffectCallback,
  Inputs,
  PropRef,
  Reducer,
  Ref,
  StateUpdater,
} from &quot;https://esm.sh/preact@10.5.14/hooks&quot;;
export {
  useCallback,
  useContext,
  useDebugValue,
  useEffect,
  useErrorBoundary,
  useImperativeHandle,
  useLayoutEffect,
  useMemo,
  useReducer,
  useRef,
  useState,
} from &quot;https://esm.sh/preact@10.5.14/hooks&quot;;"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">type</span> <span class="pl-kos">{</span>
  <span class="pl-smi">CreateHandle</span><span class="pl-kos">,</span>
  <span class="pl-smi">EffectCallback</span><span class="pl-kos">,</span>
  <span class="pl-smi">Inputs</span><span class="pl-kos">,</span>
  <span class="pl-smi">PropRef</span><span class="pl-kos">,</span>
  <span class="pl-smi">Reducer</span><span class="pl-kos">,</span>
  <span class="pl-smi">Ref</span><span class="pl-kos">,</span>
  <span class="pl-smi">StateUpdater</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"https://esm.sh/preact@10.5.14/hooks"</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-kos">{</span>
  <span class="pl-s1">useCallback</span><span class="pl-kos">,</span>
  <span class="pl-s1">useContext</span><span class="pl-kos">,</span>
  <span class="pl-s1">useDebugValue</span><span class="pl-kos">,</span>
  <span class="pl-s1">useEffect</span><span class="pl-kos">,</span>
  <span class="pl-s1">useErrorBoundary</span><span class="pl-kos">,</span>
  <span class="pl-s1">useImperativeHandle</span><span class="pl-kos">,</span>
  <span class="pl-s1">useLayoutEffect</span><span class="pl-kos">,</span>
  <span class="pl-s1">useMemo</span><span class="pl-kos">,</span>
  <span class="pl-s1">useReducer</span><span class="pl-kos">,</span>
  <span class="pl-s1">useRef</span><span class="pl-kos">,</span>
  <span class="pl-s1">useState</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"https://esm.sh/preact@10.5.14/hooks"</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">You will see that type completions and hover are not working. Now remove the <code class="notranslate">export type</code> statement. Type completions and hover work again.</p>
<p dir="auto">If you try to <code class="notranslate">import type</code> a type from a module which has a <code class="notranslate">X-TypeScript-Types</code> header, the language server does not properly handle this and reports that the import does not have the named export.</p>