title: Check if an object implements an interface at runtime with TypeScript
body: <p>I load a JSON configuration file at runtime, and use an interface to define its expected structure:</p>
  
  <pre><code>interface EngineConfig {
      pathplanner?: PathPlannerConfig;
      debug?: DebugConfig;
      ...
  }
  
  interface PathPlannerConfig {
      nbMaxIter?: number;
      nbIterPerChunk?: number;
      heuristic?: string;
  }
  
  interface DebugConfig {
      logLevel?: number;
  }
  
  ...
  </code></pre>
  
  <p>This makes it convenient to access the various properties since I can use autocompletions etc.</p>
  
  <p>Question: <strong>is there a way to use this declaration to check the correctness of the file I load? ie that I do not have unexpected properties?</strong> </p>