title: Error : Type String is not assignable to type '{ name : string; }' in Angular
body: <p>I'm trying to define a scope variable in Angular 2. Here is the code:</p>
  
  <pre><code>export class GroceryComponent {
    task = {
      name: ''
    };
    tasks = [];
  }
  </code></pre>
  
  <p>But its throwing the following error :</p>
  
  <pre><code>Type String is not assignable to type '{ name : string; }' 
  </code></pre>