@@ -21,9 +21,10 @@ import { CustomQueryEncoderHelper } from '../encoder';
2121{ {^useRxJS6} }
2222import { Observable } from 'rxjs/Observable';
2323import { Subject } from 'rxjs/Subject';
24+ import { Subscription } from 'rxjs/Subscription';
2425{ {/useRxJS6} }
2526{ {#useRxJS6} }
26- import { Observable, Subject } from 'rxjs';
27+ import { Observable, Subject, Subscription } from 'rxjs';
2728import { catchError, takeUntil, tap, share } from 'rxjs/operators';
2829{ {/useRxJS6} }
2930{ {^useHttpClient} }
@@ -351,7 +352,7 @@ export class {{classname}} {
351352 this.configuration.beforeHandler(' {{operationIdOriginal}}' , ' {{httpMethod}}' .toUpperCase());
352353 }
353354 let afterSubscription: Subscription;
354- const afterHandler = (result: any) => {
355+ const afterHandler = (result: any = null ) => {
355356 if (afterSubscription) {
356357 afterSubscription.unsubscribe();
357358 }
@@ -373,7 +374,7 @@ export class {{classname}} {
373374 result => afterHandler(result),
374375 err => afterHandler(err),
375376 () => afterHandler()
376- )
377+ );
377378
378379 if (typeof this.configuration.errorHandler === 'function') {
379380 return handle.pipe(catchError(err => this.configuration.errorHandler(err, ' {{operationIdOriginal}}' )));
@@ -421,7 +422,7 @@ export class {{classname}} {
421422 this.configuration.beforeHandler(' {{operationIdOriginal}}' , ' {{httpMethod}}' .toUpperCase());
422423 }
423424 let afterSubscription: Subscription;
424- const afterHandler = (result: any) => {
425+ const afterHandler = (result: any = null ) => {
425426 if (afterSubscription) {
426427 afterSubscription.unsubscribe();
427428 }
@@ -443,7 +444,7 @@ export class {{classname}} {
443444 result => afterHandler(result),
444445 err => afterHandler(err),
445446 () => afterHandler()
446- )
447+ );
447448
448449 if (typeof this.configuration.errorHandler === 'function') {
449450 return handle.catch(err => this.configuration.errorHandler(err, ' {{operationIdOriginal}}' ));
0 commit comments