title: String constructor has not been recognized in switch/case
body: <p>In below code sample, the value of <code>targetValueSpecification.type</code> is <code>String</code> as <code>sampleType</code>:</p>
  <pre class="lang-js prettyprint-override"><code>const sampleType = String;
  
  console.log(&quot;Sample type:&quot;);
  console.log(sampleType);
  switch (sampleType) {
  
    case String: {
      console.log(&quot;String&quot;);
      break;
    }
    default : {
      console.log(&quot;Not string?&quot;)
    }
  }
  
  console.log();
  console.log(&quot;Some external data:&quot;);
  console.log(targetValueSpecification.type);
  switch (targetValueSpecification.type) {
    case String: {
      console.log(&quot;String&quot;);
      break;
    }
    default : {
      console.log(&quot;Not string?&quot;)
    }
  }
  </code></pre>
  <p>The output was unexpected for me:</p>
  <p><a href="https://i.stack.imgur.com/0igAo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0igAo.png" alt="enter image description here" /></a></p>
  <p>This code in being executed on the server side of NuxtJS application (it means NodeJS), but locally.</p>
  <p>The value of <code>targetValueSpecification.type</code> refers to:</p>
  <pre><code>namespace User {
  
    export namespace ID {
      export const type: StringConstructor = String; // Here
    }
    // ...
  }
  </code></pre>
  <p>Unfortunately, I can't reproduce this in TypeScript Playground (<a href="https://www.staging-typescript.org/play?#code/HYQwtgpgzgDiDGEAEBVKEBOSDeBYAUAUkhAB4wD2GALkqJLAsgJIAiORxJ5Vt8FwKLWoBPGBABcSAMrUMAS2ABzAMIChGAK7xqVJAF4ZcxUoDcSAPQWkACUwROAX05WkAOg8FnhfP0G0ocBgAGwgAFTFJIwVlNX8tHT1DWRizAgIoAHd5angACyQACkCwEPDIgEoOfC4keBB0aJMpPBrarj8oClC3YIolQoAiFJNBitNOdqQAIwwIEABrCbbib1qAEwgAMxBNYNoWyfbO7ohe-qGAOQoA42UAfjGj728M7NyCwrRMNzY3UXEVVatXqjRGykOK2O6lO5wGwzuSjGyymxFm8yWzyOmx2ewO1VRdRhPT68Out1SjwqWPwr3wQA" rel="nofollow noreferrer">attempt</a>). So, the variables in this equation are including:</p>
  <ol>
  <li>TypeScript - the source code</li>
  <li>NodeJS</li>
  <li>NuxtJS</li>
  </ol>
  <p>I am very interesting what this phenomenon is.</p>