typescript error Expected 0 type arguments for get call
问题 I am getting typescript error Expected 0 type arguments, but got 1 for line that returns get call. What is wrong with my get call? public get(params: SummaryParams): Observable<Summary[]> { const uri = `${this.config.URLS.LOAD_SUMMARY}`; const params = new HttpParams() .set('startDate', params.startDate.toString()) .set('endDate', params.endDate.toString()) .set('userId', params.userId); return this.http.get<Summary[]>(uri, { params }); } 回答1: HttpClient has generic methods that can be used