diff --git a/tools/public_api_guard/common/common.d.ts b/tools/public_api_guard/common/common.d.ts index 4f25cd39d1..72468bdc91 100644 --- a/tools/public_api_guard/common/common.d.ts +++ b/tools/public_api_guard/common/common.d.ts @@ -3,10 +3,10 @@ export declare const APP_BASE_HREF: InjectionToken; export declare class AsyncPipe implements OnDestroy, PipeTransform { constructor(_ref: ChangeDetectorRef); ngOnDestroy(): void; + transform(obj: null): null; + transform(obj: undefined): undefined; transform(obj: Observable | null | undefined): T | null; transform(obj: Promise | null | undefined): T | null; - transform(obj: undefined): undefined; - transform(obj: null): null; } export declare class CommonModule { @@ -214,8 +214,8 @@ export declare class NgComponentOutlet implements OnChanges, OnDestroy { export declare class NgForOf = NgIterable> implements DoCheck { set ngForOf(ngForOf: (U & NgIterable) | undefined | null); set ngForTemplate(value: TemplateRef>); - get ngForTrackBy(): TrackByFunction; set ngForTrackBy(fn: TrackByFunction); + get ngForTrackBy(): TrackByFunction; constructor(_viewContainer: ViewContainerRef, _template: TemplateRef>, _differs: IterableDiffers); ngDoCheck(): void; static ngTemplateContextGuard>(dir: NgForOf, ctx: any): ctx is NgForOfContext; diff --git a/tools/public_api_guard/common/http.d.ts b/tools/public_api_guard/common/http.d.ts index b82636b302..0f2fa899aa 100644 --- a/tools/public_api_guard/common/http.d.ts +++ b/tools/public_api_guard/common/http.d.ts @@ -6,7 +6,7 @@ export declare abstract class HttpBackend implements HttpHandler { export declare class HttpClient { constructor(handler: HttpHandler); - delete(url: string, options?: { + delete(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -15,9 +15,153 @@ export declare class HttpClient { [param: string]: string | string[]; }; reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; responseType?: 'json'; withCredentials?: boolean; - }): Observable; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + delete(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; delete(url: string, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -30,7 +174,19 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; - delete(url: string, options: { + delete(url: string, options?: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable; + get(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -42,7 +198,7 @@ export declare class HttpClient { responseType: 'arraybuffer'; withCredentials?: boolean; }): Observable; - delete(url: string, options: { + get(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -54,7 +210,7 @@ export declare class HttpClient { responseType: 'blob'; withCredentials?: boolean; }): Observable; - delete(url: string, options: { + get(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -66,7 +222,7 @@ export declare class HttpClient { responseType: 'text'; withCredentials?: boolean; }): Observable; - delete(url: string, options: { + get(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -78,7 +234,7 @@ export declare class HttpClient { responseType: 'arraybuffer'; withCredentials?: boolean; }): Observable>; - delete(url: string, options: { + get(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -90,102 +246,6 @@ export declare class HttpClient { responseType: 'blob'; withCredentials?: boolean; }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - delete(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; get(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -198,6 +258,90 @@ export declare class HttpClient { responseType: 'text'; withCredentials?: boolean; }): Observable>; + get(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + get(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + get(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + get(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + get(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; + get(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + get(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; get(url: string, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -210,66 +354,6 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; - get(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable; - get(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable; - get(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable; - get(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - get(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; get(url: string, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -282,7 +366,79 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; - get(url: string, options: { + head(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable; + head(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable; + head(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable; + head(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + head(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + head(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; + head(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -294,7 +450,7 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable>; - get(url: string, options: { + head(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -306,7 +462,7 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable>; - get(url: string, options: { + head(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -318,7 +474,7 @@ export declare class HttpClient { responseType: 'arraybuffer'; withCredentials?: boolean; }): Observable>; - get(url: string, options: { + head(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -330,7 +486,7 @@ export declare class HttpClient { responseType: 'blob'; withCredentials?: boolean; }): Observable>; - get(url: string, options: { + head(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -342,7 +498,7 @@ export declare class HttpClient { responseType: 'text'; withCredentials?: boolean; }): Observable>; - get(url: string, options: { + head(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -354,7 +510,7 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable>; - get(url: string, options: { + head(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -366,18 +522,6 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable>; - head(url: string, options?: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable; head(url: string, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -390,249 +534,7 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable; - head(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable; - jsonp(url: string, callbackParam: string): Observable; - jsonp(url: string, callbackParam: string): Observable; - options(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - options(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable; - options(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable; - options(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable; - options(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - options(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; - options(url: string, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - options(url: string, options?: { + head(url: string, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -644,6 +546,92 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; + jsonp(url: string, callbackParam: string): Observable; + jsonp(url: string, callbackParam: string): Observable; + options(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable; + options(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable; + options(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable; + options(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + options(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + options(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; + options(url: string, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; options(url: string, options: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -728,30 +716,18 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; - patch(url: string, body: any | null, options: { + options(url: string, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; }; - observe: 'events'; + observe?: 'body'; params?: HttpParams | { [param: string]: string | string[]; }; reportProgress?: boolean; - responseType: 'blob'; + responseType?: 'json'; withCredentials?: boolean; - }): Observable>; - patch(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; + }): Observable; patch(url: string, body: any | null, options: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -800,30 +776,30 @@ export declare class HttpClient { responseType: 'arraybuffer'; withCredentials?: boolean; }): Observable>; - patch(url: string, body: any | null, options?: { + patch(url: string, body: any | null, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; - observe?: 'body'; + observe: 'events'; params?: HttpParams | { [param: string]: string | string[]; }; reportProgress?: boolean; - responseType?: 'json'; + responseType: 'blob'; withCredentials?: boolean; - }): Observable; - patch(url: string, body: any | null, options?: { + }): Observable>; + patch(url: string, body: any | null, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; - observe?: 'body'; + observe: 'events'; params?: HttpParams | { [param: string]: string | string[]; }; reportProgress?: boolean; - responseType?: 'json'; + responseType: 'text'; withCredentials?: boolean; - }): Observable; + }): Observable>; patch(url: string, body: any | null, options: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -908,19 +884,7 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable>; - post(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - post(url: string, body: any | null, options?: { + patch(url: string, body: any | null, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; }; @@ -932,6 +896,18 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; + patch(url: string, body: any | null, options?: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable; post(url: string, body: any | null, options: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -992,18 +968,18 @@ export declare class HttpClient { responseType: 'blob'; withCredentials?: boolean; }): Observable>; - post(url: string, body: any | null, options?: { + post(url: string, body: any | null, options: { headers?: HttpHeaders | { [header: string]: string | string[]; }; - observe?: 'body'; + observe: 'events'; params?: HttpParams | { [param: string]: string | string[]; }; reportProgress?: boolean; - responseType?: 'json'; + responseType: 'text'; withCredentials?: boolean; - }): Observable; + }): Observable>; post(url: string, body: any | null, options: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -1088,6 +1064,182 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable>; + post(url: string, body: any | null, options?: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable; + post(url: string, body: any | null, options?: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; + put(url: string, body: any | null, options: { + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'response'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType?: 'json'; + withCredentials?: boolean; + }): Observable>; put(url: string, body: any | null, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -1100,158 +1252,6 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'response'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType?: 'json'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable; - put(url: string, body: any | null, options: { - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable; put(url: string, body: any | null, options?: { headers?: HttpHeaders | { [header: string]: string | string[]; @@ -1264,6 +1264,85 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable; + request(req: HttpRequest): Observable>; + request(method: string, url: string, options: { + body?: any; + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable; + request(method: string, url: string, options: { + body?: any; + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable; + request(method: string, url: string, options: { + body?: any; + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable; + request(method: string, url: string, options: { + body?: any; + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + params?: HttpParams | { + [param: string]: string | string[]; + }; + observe: 'events'; + reportProgress?: boolean; + responseType: 'arraybuffer'; + withCredentials?: boolean; + }): Observable>; + request(method: string, url: string, options: { + body?: any; + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'blob'; + withCredentials?: boolean; + }): Observable>; + request(method: string, url: string, options: { + body?: any; + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe: 'events'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + reportProgress?: boolean; + responseType: 'text'; + withCredentials?: boolean; + }): Observable>; request(method: string, url: string, options: { body?: any; headers?: HttpHeaders | { @@ -1277,98 +1356,6 @@ export declare class HttpClient { responseType?: 'json'; withCredentials?: boolean; }): Observable>; - request(method: string, url: string, options?: { - body?: any; - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - responseType?: 'json'; - reportProgress?: boolean; - withCredentials?: boolean; - }): Observable; - request(method: string, url: string, options: { - body?: any; - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable; - request(method: string, url: string, options: { - body?: any; - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable; - request(method: string, url: string, options: { - body?: any; - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe?: 'body'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable; - request(method: string, url: string, options: { - body?: any; - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - params?: HttpParams | { - [param: string]: string | string[]; - }; - observe: 'events'; - reportProgress?: boolean; - responseType: 'arraybuffer'; - withCredentials?: boolean; - }): Observable>; - request(method: string, url: string, options: { - body?: any; - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'blob'; - withCredentials?: boolean; - }): Observable>; - request(method: string, url: string, options: { - body?: any; - headers?: HttpHeaders | { - [header: string]: string | string[]; - }; - observe: 'events'; - params?: HttpParams | { - [param: string]: string | string[]; - }; - reportProgress?: boolean; - responseType: 'text'; - withCredentials?: boolean; - }): Observable>; - request(req: HttpRequest): Observable>; request(method: string, url: string, options: { body?: any; headers?: HttpHeaders | { @@ -1460,6 +1447,19 @@ export declare class HttpClient { reportProgress?: boolean; withCredentials?: boolean; }): Observable; + request(method: string, url: string, options?: { + body?: any; + headers?: HttpHeaders | { + [header: string]: string | string[]; + }; + observe?: 'body'; + params?: HttpParams | { + [param: string]: string | string[]; + }; + responseType?: 'json'; + reportProgress?: boolean; + withCredentials?: boolean; + }): Observable; request(method: string, url: string, options?: { body?: any; headers?: HttpHeaders | { diff --git a/tools/public_api_guard/common/upgrade.d.ts b/tools/public_api_guard/common/upgrade.d.ts index 4ea123fffa..db9f0782de 100644 --- a/tools/public_api_guard/common/upgrade.d.ts +++ b/tools/public_api_guard/common/upgrade.d.ts @@ -3,8 +3,8 @@ export declare class $locationShim { $$parse(url: string): void; $$parseLinkUrl(url: string, relHref?: string | null): boolean; absUrl(): string; - hash(hash: string | number | null): this; hash(): string; + hash(hash: string | number | null): this; host(): string; onChange(fn: (url: string, state: unknown, oldUrl: string, oldState: unknown) => void, err?: (e: Error) => void): void; path(): string; @@ -21,8 +21,8 @@ export declare class $locationShim { search(search: string | number | { [key: string]: unknown; }, paramValue: null | undefined | string | number | boolean | string[]): this; - state(state: unknown): this; state(): unknown; + state(state: unknown): this; url(): string; url(url: string): this; } diff --git a/tools/public_api_guard/core/testing.d.ts b/tools/public_api_guard/core/testing.d.ts index e502c94f0d..111156ec83 100644 --- a/tools/public_api_guard/core/testing.d.ts +++ b/tools/public_api_guard/core/testing.d.ts @@ -58,8 +58,8 @@ export interface TestBed { configureTestingModule(moduleDef: TestModuleMetadata): void; createComponent(component: Type): ComponentFixture; execute(tokens: any[], fn: Function, context?: any): any; - /** @deprecated */ get(token: any, notFoundValue?: any): any; /** @deprecated */ get(token: Type | InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; + /** @deprecated */ get(token: any, notFoundValue?: any): any; initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): void; inject(token: Type | InjectionToken | AbstractType, notFoundValue?: T, flags?: InjectFlags): T; inject(token: Type | InjectionToken | AbstractType, notFoundValue: null, flags?: InjectFlags): T | null; @@ -95,15 +95,19 @@ export interface TestBedStatic { }): TestBedStatic; configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic; createComponent(component: Type): ComponentFixture; - /** @deprecated */ get(token: any, notFoundValue?: any): any; /** @deprecated */ get(token: Type | InjectionToken, notFoundValue?: T, flags?: InjectFlags): any; + /** @deprecated */ get(token: any, notFoundValue?: any): any; initTestEnvironment(ngModule: Type | Type[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed; - inject(token: Type | InjectionToken | AbstractType, notFoundValue: null, flags?: InjectFlags): T | null; inject(token: Type | InjectionToken | AbstractType, notFoundValue?: T, flags?: InjectFlags): T; + inject(token: Type | InjectionToken | AbstractType, notFoundValue: null, flags?: InjectFlags): T | null; overrideComponent(component: Type, override: MetadataOverride): TestBedStatic; overrideDirective(directive: Type, override: MetadataOverride): TestBedStatic; overrideModule(ngModule: Type, override: MetadataOverride): TestBedStatic; overridePipe(pipe: Type, override: MetadataOverride): TestBedStatic; + overrideProvider(token: any, provider: { + useFactory: Function; + deps: any[]; + }): TestBedStatic; overrideProvider(token: any, provider: { useValue: any; }): TestBedStatic; @@ -112,10 +116,6 @@ export interface TestBedStatic { useValue?: any; deps?: any[]; }): TestBedStatic; - overrideProvider(token: any, provider: { - useFactory: Function; - deps: any[]; - }): TestBedStatic; overrideTemplate(component: Type, template: string): TestBedStatic; overrideTemplateUsingTestingModule(component: Type, template: string): TestBedStatic; resetTestEnvironment(): void; diff --git a/tools/public_api_guard/forms/forms.d.ts b/tools/public_api_guard/forms/forms.d.ts index 52b979cd50..fa6a25659d 100644 --- a/tools/public_api_guard/forms/forms.d.ts +++ b/tools/public_api_guard/forms/forms.d.ts @@ -524,8 +524,8 @@ export interface ValidatorFn { } export declare class Validators { - static compose(validators: (ValidatorFn | null | undefined)[]): ValidatorFn | null; static compose(validators: null): null; + static compose(validators: (ValidatorFn | null | undefined)[]): ValidatorFn | null; static composeAsync(validators: (AsyncValidatorFn | null)[]): AsyncValidatorFn | null; static email(control: AbstractControl): ValidationErrors | null; static max(max: number): ValidatorFn; diff --git a/tools/public_api_guard/http/http.d.ts b/tools/public_api_guard/http/http.d.ts index edc79a97b0..5651e7289a 100644 --- a/tools/public_api_guard/http/http.d.ts +++ b/tools/public_api_guard/http/http.d.ts @@ -142,8 +142,8 @@ export declare class RequestOptions { method: RequestMethod | string | null; params: URLSearchParams; responseType: ResponseContentType | null; - /** @deprecated */ set search(params: URLSearchParams); /** @deprecated */ get search(): URLSearchParams; + /** @deprecated */ set search(params: URLSearchParams); url: string | null; withCredentials: boolean | null; constructor(opts?: RequestOptionsArgs);