title: Argument of type '{}' is not assignable to parameter of type 'string'
body: <p>this is my typescript  </p>
  
  <pre><code>export class State {
    constructor(public name: string, public population: string, public flag: string) { }
  }
  
  
  
  export class AutocompleteOverviewComponent implements OnInit {
        stateCtrl: FormControl;
        filteredStates: Observable&lt;any[]&gt;;
      temp:string;
        states: State[] = [
          {
            name: 'Arkansas',
            population: '2.978M',
            // https://commons.wikimedia.org/wiki/File:Flag_of_Arkansas.svg
            flag: 'https://upload.wikimedia.org/wikipedia/commons/9/9d/Flag_of_Arkansas.svg'
          },
          {
            name: 'California',
            population: '39.14M',
            // https://commons.wikimedia.org/wiki/File:Flag_of_California.svg
            flag: 'https://upload.wikimedia.org/wikipedia/commons/0/01/Flag_of_California.svg'
          },
          {
            name: 'Florida',
            population: '20.27M',
            // https://commons.wikimedia.org/wiki/File:Flag_of_Florida.svg
            flag: 'https://upload.wikimedia.org/wikipedia/commons/f/f7/Flag_of_Florida.svg'
          },
          {
            name: 'Texas',
            population: '27.47M',
            // https://commons.wikimedia.org/wiki/File:Flag_of_Texas.svg
            flag: 'https://upload.wikimedia.org/wikipedia/commons/f/f7/Flag_of_Texas.svg'
          }
        ];
  
        constructor() {
          this.stateCtrl = new FormControl();
  
        }
     ngOnInit() {
          this.filteredStates = this.stateCtrl.valueChanges
          .pipe(
            startWith(''),
            map(state =&gt; state ? this.filterStates(state) : this.states.slice(),
          )
          );
        }
  
        filterStates(name1:string) {
          return this.states.filter(state =&gt;
            state.name.toLowerCase().indexOf(name1.toLowerCase()) === 0);
        }
  </code></pre>
  
  <p>i am getting error like ** Argument of type '{}' is not assignable to parameter of type 'string'.** on ngOnInit function i am calling this.filterStates(state) function but i am getting error please help he</p>