fix(common): add `params` and `reportProgress` options to `HttpClient.put()` overload (#37873)
When the response type is JSON, the `put()` overload signature did not have `reportProgress` and `params` options. This makes it difficult to type-check this overload. This commit adds them to the overload signature. Fixes #23600 PR Close #37873
This commit is contained in:
parent
129107191c
commit
dd8d8c8289
|
@ -1177,6 +1177,10 @@ export declare class HttpClient {
|
||||||
[header: string]: string | string[];
|
[header: string]: string | string[];
|
||||||
};
|
};
|
||||||
observe: 'events';
|
observe: 'events';
|
||||||
|
params?: HttpParams | {
|
||||||
|
[param: string]: string | string[];
|
||||||
|
};
|
||||||
|
reportProgress?: boolean;
|
||||||
responseType?: 'json';
|
responseType?: 'json';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
}): Observable<HttpEvent<T>>;
|
}): Observable<HttpEvent<T>>;
|
||||||
|
|
|
@ -2448,6 +2448,8 @@ export class HttpClient {
|
||||||
*/
|
*/
|
||||||
put<T>(url: string, body: any|null, options: {
|
put<T>(url: string, body: any|null, options: {
|
||||||
headers?: HttpHeaders|{[header: string]: string | string[]}, observe: 'events',
|
headers?: HttpHeaders|{[header: string]: string | string[]}, observe: 'events',
|
||||||
|
params?: HttpParams|{[param: string]: string | string[]},
|
||||||
|
reportProgress?: boolean,
|
||||||
responseType?: 'json',
|
responseType?: 'json',
|
||||||
withCredentials?: boolean,
|
withCredentials?: boolean,
|
||||||
}): Observable<HttpEvent<T>>;
|
}): Observable<HttpEvent<T>>;
|
||||||
|
|
Loading…
Reference in New Issue