title: TypeScript's import() typeof json
body: <p>I have a json file and I don't want to include it in runtime code, I only want to extract keyof that file and check type for input of function</p>
  
  <p>I found out typescript hast import type in here <a href="https://davidea.st/articles/typescript-2-9-import-types" rel="nofollow noreferrer">https://davidea.st/articles/typescript-2-9-import-types</a></p>
  
  <p>I try it and it's work for type checking</p>
  
  <p>But I'm confused now, Is this solution work as well for json? <strong>I don't want to load json at all in runtime code.</strong></p>
  
  <p>I use <strong>react-native</strong>.</p>
  
  <p>My example code</p>
  
  <pre><code>function(key: keyof typeof import('jsonfile.json'))
  {
  
  }
  </code></pre>