title: Type 'Observable<unknown>' is not assignable to type 'Observable<Lesson[]>'
body: <p>I am using a Angular 8 application. And I am using the Observable pattern form rxjs. But I still get an error on the Observable line. </p>
  
  <p>Googled on the error of course. But didn find the correct answare.</p>
  
  <p>So I Importated this:</p>
  
  <pre><code>import { Subject, Observer, Observable } from 'rxjs';
  </code></pre>
  
  <p>And I have this line:</p>
  
  <pre><code>    public lessonList$: Observable&lt;Lesson[]&gt; = this.lessonListSubject.asObservable();
  </code></pre>
  
  <p>But I still get this error:</p>
  
  <pre><code>
  Type 'Observable&lt;unknown&gt;' is not assignable to type 'Observable&lt;Lesson[]&gt;'.
    Type '{}' is missing the following properties from type 'Lesson[]': length, pop, push, concat, and 26 more.ts(2322)
  </code></pre>
  
  <p>That the error will dissapear.</p>
  
  <p>Thank you</p>
  
  <p>oke, this is the interface Lesson:</p>
  
  <pre><code>export interface Lesson {
      id: number;
      description: string;
      duration?: string;
      completed?: boolean;
  
  }
  </code></pre>
  
  <p>This is the whole file:</p>
  
  <pre><code>import * as _ from 'lodash';
  import { Lesson } from '../shared/model/lesson';
  import { Subject, Observer, Observable } from 'rxjs';
  
  
  class DataStore {
  
      private lessons: Lesson[] = [];
  
      private lessonListSubject = new Subject();
  
      public lessonList$: Observable&lt;Lesson[]&gt; = this.lessonListSubject.asObservable();
  
  
  
      initaliseLessonList(newList: Lesson[]) {
          this.lessons = _.clone(newList);
          this.broadCast();
  
  
      }
      addLesson(newLesson: Lesson) {
  
          this.lessons.push(newLesson);
          this.broadCast();
      }
  
      deleteLesson(deleted: Lesson) {
          _.remove(this.lessons, lesson =&gt; lesson.id === deleted.id);
          this.broadCast();
  
  
      }
  
      toggleView(toggled: Lesson) {
          // tslint:disable-next-line: no-shadowed-variable
          const lesson = _.find(this.lessons, lesson =&gt; lesson.id === toggled.id);
  
          lesson.completed = !lesson.completed;
          this.broadCast();
  
  
      }
  
      broadCast() {
          this.lessonListSubject.next(_.cloneDeep(this.lessons));
  
      }
  }
  
  export const store = new DataStore();
  
  
  
  
  
  
  
  
  
  </code></pre>