title: No overload matches this call when trying to send StorageEvent - Angular
body: <p>I am currently developing an application in Angular which saves the current state of the app in the local storage.</p>
  <p>I saw that you can subscribe to a StorageEvent, so when running the app in 2 different tabs and modifying the data, the state is updated simultaneously in both tabs.</p>
  <p>I've written the subscription as follows:</p>
  <pre><code>this.storageListenSub = fromEvent(window, 'storage').subscribe(
        (event: StorageEvent) =&gt; {
          if (event.key === 'notes') this.loadState();
        }
      );
  </code></pre>
  <p>The loadState function is described below:</p>
  <pre><code> loadState() {
      try {
        const notesInStorage = JSON.parse(localStorage.getItem('notes')!);
        // if (!notesInStorage) return;
  
        this.notes.length = 0; //clear the notes array while keeping referenece
        this.notes.push(...notesInStorage);
  
        this.notes = notesInStorage;
      } catch (e) {
        console.log('There was an error retrieving the notes from local storage');
        console.log(e);
      }
    }
  
  </code></pre>
  <p>However, I'm getting the following error message:</p>
  <blockquote>
  <p>No overload matches this call.   Overload 1 of 3, '(observer?:
  Partial&lt;Observer&gt; | undefined): Subscription', gave the
  following error.
  Type '(event: StorageEvent) =&gt; void' has no properties in common with type 'Partial&lt;Observer&gt;'.   Overload 2 of 3, '(next:
  (value: Event) =&gt; void): Subscription', gave the following error.
  Argument of type '(event: StorageEvent) =&gt; void' is not assignable to parameter of type '(value: Event) =&gt; void'.
  Types of parameters 'event' and 'value' are incompatible.
  Type 'Event' is missing the following properties from type 'StorageEvent': key, newValue, oldValue, storageArea, and 2 more.<br />
  Overload 3 of 3, '(next?: ((value: Event) =&gt; void) | null | undefined,
  error?: ((error: any) =&gt; void) | null | undefined, complete?: (() =&gt;
  void) | null | undefined): Subscription', gave the following error.
  Argument of type '(event: StorageEvent) =&gt; void' is not assignable to parameter of type '(value: Event) =&gt; void'.
  Types of parameters 'event' and 'value' are incompatible.
  Type 'Event' is not assignable to type 'StorageEvent'.ts(2769)</p>
  </blockquote>
  <p>Any help would be appreciated.</p>
  <p>Thanks</p>