title: rxjs - deprecated subscribe with multiple parameter
body: <p><code>rxjs</code> 6.4. started to deprecate <code>subscribe</code> with multiple parameters. To some extend I understand but on a practical level I have my problems. Especially when I specify the type received parameter. E.g.</p>
  <pre><code>subscribe((response: boolean | LibDto) =&gt; {
              this.errorCmpt.showMsgShort('save success');
              }, () =&gt;
              this.errorCmpt.showMsgShort('save failure')
          )
  </code></pre>
  <p>When I try to follow the given <a href="https://rxjs.dev/deprecations/subscribe-arguments" rel="nofollow noreferrer">link</a> than I thought I can rewrite the function like:</p>
  <pre><code>subscribe({
          complete:(response: boolean | LibDto) =&gt; {
              this.errorCmpt.showMsgShort('save success');
      }, error: () =&gt;
              this.errorCmpt.showMsgShort('save failure')
              })
  </code></pre>
  <p>But this fails</p>
  <pre><code>  Overload 1 of 3, '(observer?: Partial&lt;Observer&lt;boolean | LibDto&gt;&gt;): Subscription', gave the following error.
      Type '(response: any) =&gt; void' is not assignable to type '() =&gt; void'.
    Overload 2 of 3, '(next: (value: boolean | LibDto) =&gt; void): Subscription', gave the following error.
      Argument of type '{ complete: (response: any) =&gt; void; }' is not assignable to parameter of type '(value: boolean | LibDto) =&gt; void'.
        Object literal may only specify known properties, and 'complete' does not exist in type '(value: boolean | LibDto) =&gt; void'.
    Overload 3 of 3, '(next?: (value: boolean | LibDto) =&gt; void, error?: (error: any) =&gt; void, complete?: () =&gt; void): Subscription', gave the following error.
      Argument of type '{ complete: (response: any) =&gt; void; }' is not assignable to parameter of type '(value: boolean | LibDto) =&gt; void'.
        Object literal may only specify known properties, and 'complete' does not exist in type '(value: boolean | LibDto) =&gt; void'.  ref-source-dialog.component.ts  
  </code></pre>
  <p>If I try <code>complete</code> with a function without parameters it works. How to write it correctly?</p>