typescript - What does '(text: string): Observable<Response>=>{}' mean -
i saw syntax didn't make sense.
public request= (text: string): observable<response> => { const url = `https://my.api.com/search?q=${text}`; return this.http .get(url) .map(data => data.json()); }; request name of function,
{} actual function, is:
(text: string): observable<response> it supposed type of function right?
what return type of function?
more
function(text: string): observable<response> { }
Comments
Post a Comment