title: Typescript error TS2420 : Class incorrectly implements interface
body: <p>Upon building my app , I get the following error, which seems strange to me as the property appName is stated :</p>
  <blockquote>
  <p>ERROR in ../src/app/app.service.ts (30,14): Class 'AppService'
  incorrectly implements interface 'InternalStateType'.   Property
  'appName' is missing in type 'AppService'.)</p>
  </blockquote>
  <p>app.service.ts</p>
  <pre><code>import {Injectable} from '@angular/core';
  
  interface InternalStateType {
    [key: string]: any;
    appName: string;
    darkMode: boolean;
    defaultLang: string;
    topnavTitle: string;
    messagePanelOpen: boolean;
    sidenavOpen: boolean;
    sidenavMode: string;
    sidenavCollapse: boolean;
    pageFullscreen: boolean;
    pageFooter: boolean;
    initial: boolean
  };
  
  
  /**
   * App service
   */
  @Injectable()
  export class AppService implements InternalStateType {
  
    // Set your states default value.
    private state: InternalStateType = {
      appName: 'MyApp',
      darkMode: false,
      defaultLang: 'en',
      topnavTitle: 'MyApp',
      messagePanelOpen: false,
      sidenavOpen: false,
      sidenavMode: 'over',
      sidenavCollapse: true,
      pageFullscreen: false,
      pageFooter: false,
      initial: false
    };
  
    public cloneState(): InternalStateType {
      return JSON.parse(JSON.stringify(this.state));
    }
  
    public reloadState(state: InternalStateType) {
      this.state = state;
    }
  
    public getState(prop?: any): InternalStateType {
      const state = this.state;
      return state.hasOwnProperty(prop) ? state[prop] : state;
    }
  
    public setState(prop: string, value: any) {
      return this.state[prop] = value;
    }
  }
  </code></pre>
  <p>Where am I wrong ? thanks for your feedback</p>