How can I convert the below function into an arrow function.

const handler: HttpHandler = {
handle: function (req: HttpRequest<any>): Observable<HttpEvent<any>> {
return of({} as any);
}
}
const handler: HttpHandler = {
handle: function (req: HttpRequest<any>): Observable<HttpEvent<any>> {
return of({} as any);
}
}
How can I convert the above function into the arrow one
1 Reply
Jochem
Jochem3y ago
it should be as simple as this
handle: (req: HttpRequest<any>): Observable<HttpEvent<any>> => {
handle: (req: HttpRequest<any>): Observable<HttpEvent<any>> => {
Want results from more Discord servers?
Add your server