style(docs-infra): fix docs examples for tslint rules related to whitespace (#38143)
This commit updates the docs examples to be compatible with the `align`, `space-before-function-paren` and `typedef-whitespace` tslint rules. This is in preparation of updating the docs examples `tslint.json` to match the one generated for new Angular CLI apps in a future commit. PR Close #38143
This commit is contained in:

committed by
Alex Rickabaugh

parent
0a791e4a50
commit
7c0f11789b
@ -15,8 +15,10 @@ export class HttpErrorHandler {
|
||||
constructor(private messageService: MessageService) { }
|
||||
|
||||
/** Create curried handleError function that already knows the service name */
|
||||
createHandleError = (serviceName = '') => <T>
|
||||
(operation = 'operation', result = {} as T) => this.handleError(serviceName, operation, result);
|
||||
createHandleError = (serviceName = '') => {
|
||||
return <T>(operation = 'operation', result = {} as T) =>
|
||||
this.handleError(serviceName, operation, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a function that handles Http operation failures.
|
||||
@ -25,7 +27,7 @@ export class HttpErrorHandler {
|
||||
* @param operation - name of the operation that failed
|
||||
* @param result - optional value to return as the observable result
|
||||
*/
|
||||
handleError<T> (serviceName = '', operation = 'operation', result = {} as T) {
|
||||
handleError<T>(serviceName = '', operation = 'operation', result = {} as T) {
|
||||
|
||||
return (error: HttpErrorResponse): Observable<T> => {
|
||||
// TODO: send the error to remote logging infrastructure
|
||||
|
Reference in New Issue
Block a user