title: Importing JSON file in TypeScript
body: <p>I have a <code>JSON</code> file that looks like following: </p>
  
  <pre><code>{
  
    "primaryBright":    "#2DC6FB",
    "primaryMain":      "#05B4F0",
    "primaryDarker":    "#04A1D7",
    "primaryDarkest":   "#048FBE",
  
    "secondaryBright":  "#4CD2C0",
    "secondaryMain":    "#00BFA5",
    "secondaryDarker":  "#009884",
    "secondaryDarkest": "#007F6E",
  
    "tertiaryMain":     "#FA555A",
    "tertiaryDarker":   "#F93C42",
    "tertiaryDarkest":  "#F9232A",
  
    "darkGrey":         "#333333",
    "lightGrey":        "#777777"
  }
  </code></pre>
  
  <p>I'm trying to import it into a <code>.tsx</code> file. For this I added this to the type definition:</p>
  
  <pre><code>declare module "*.json" {
    const value: any;
    export default value;
  }
  </code></pre>
  
  <p>And I'm importing it like this. </p>
  
  <p><code>import colors = require('../colors.json')</code> </p>
  
  <p>And in the file, I use the color <code>primaryMain</code> as <code>colors.primaryMain</code>. However I get an error:</p>
  
  <blockquote>
    <p>Property 'primaryMain' does not exist on type 'typeof "*.json"</p>
  </blockquote>