title: Angular type error: Type 'string' is not assignable to type 'string[]'
body: <p>I'm very new to angular and am trying to build an electron app leveraging angular 6. </p>
  
  <p>What I'm trying to do is:
  1. SupportInformationClass has a few definitions 
  2. On init of the componenet, populate the definitions from the electron-settings </p>
  
  <p><strong>supportInformation.ts:</strong> </p>
  
  <pre><code>export class SupportInformation  {
  
      appsSet1: string[];
      //appsSet2: string[];
      //appsSet3: string[];
      //appsSet4: string[];
  }
  </code></pre>
  
  <p><strong>configuration.componenet.ts:</strong></p>
  
  <pre><code>import { SupportInformation } from './supportInformation';
  ...
  ...
  export class ConfigurationComponent implements OnInit {
  
      supportInformation: SupportInformation;
  
  
      constructor(private childProcessService: ChildProcessService, private electronService: ElectronService) {
          console.log("inside constructor...")
      }
  
      ngOnInit() {
          console.log("on ngInit...");
          this.getSupportedApps();
      }
  
      getSupportedApps() {
          if(this.childProcessService.isElectronApp){
  
              // this.supportInformation.appsSet1 = ["wow"] // this works
  
              console.log(this.electronService.settings.get('APPS_1')) // this also works
              this.supportInformation.appsSet1 = this.electronService.settings.get('APPS_1'); // this gives an error
          }
      }
  }
  </code></pre>
  
  <p>I end up with an error on this particular line even though this.electronService.settings.get('APPS_1') returns an array of string elements. </p>
  
  <pre><code>this.supportInformation.appsSet1 = this.electronService.settings.get('APPS_1');
  </code></pre>
  
  <p>Error: </p>
  
  <pre><code>Type 'JsonValue' is not assignable to type 'string[]'.
    Type 'string' is not assignable to type 'string[]'.
  </code></pre>
  
  <p>My settings file is like below: </p>
  
  <pre><code>{
  ...
      "APPS_1": ["abc", "def", "ghi", "jkl"],
      "APPS_2": ["mno", "pqr"],
  ...
  }
  </code></pre>
  
  <p>console.log(this.electronService.settings.get('APPS_1')) gives:</p>
  
  <p><a href="https://i.stack.imgur.com/Dsc34.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dsc34.png" alt="enter image description here"></a></p>
  
  <p>I'm unable to understand why. Could someone give me some pointers regarding the same?</p>
  
  <p>Thanks.</p>