docs: common with @publicApi tags (#26595)

PR Close #26595
This commit is contained in:
Pete Bacon Darwin
2018-10-19 15:06:08 +01:00
committed by Alex Rickabaugh
parent 42c331bbf2
commit 0918adf39d
43 changed files with 87 additions and 97 deletions

View File

@ -20,7 +20,7 @@ import {HttpEvent} from './response';
*
* In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.
*
*
* @publicApi
*/
export abstract class HttpHandler {
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;
@ -34,7 +34,7 @@ export abstract class HttpHandler {
* When injected, `HttpBackend` dispatches requests directly to the backend, without going
* through the interceptor chain.
*
*
* @publicApi
*/
export abstract class HttpBackend implements HttpHandler {
abstract handle(req: HttpRequest<any>): Observable<HttpEvent<any>>;

View File

@ -51,7 +51,7 @@ export type HttpObserve = 'body' | 'events' | 'response';
* Each request method has multiple signatures, and the return type varies according to which
* signature is called (mainly the values of `observe` and `responseType`).
*
*
* @publicApi
*/
@Injectable()
export class HttpClient {

View File

@ -15,6 +15,7 @@ interface Update {
/**
* Immutable set of Http headers, with lazy parsing.
*
* @publicApi
*/
export class HttpHeaders {
/**

View File

@ -22,7 +22,7 @@ import {HttpEvent} from './response';
* In rare cases, interceptors may wish to completely handle a request themselves,
* and not delegate to the remainder of the chain. This behavior is allowed.
*
*
* @publicApi
*/
export interface HttpInterceptor {
/**
@ -61,7 +61,7 @@ export class HttpInterceptorHandler implements HttpHandler {
* A multi-provider token which represents the array of `HttpInterceptor`s that
* are registered.
*
*
* @publicApi
*/
export const HTTP_INTERCEPTORS = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS');

View File

@ -42,7 +42,7 @@ export abstract class JsonpCallbackContext { [key: string]: (data: any) => void;
* `HttpBackend` that only processes `HttpRequest` with the JSONP method,
* by performing JSONP style requests.
*
*
* @publicApi
*/
@Injectable()
export class JsonpClientBackend implements HttpBackend {
@ -206,7 +206,7 @@ export class JsonpClientBackend implements HttpBackend {
* An `HttpInterceptor` which identifies requests with the method JSONP and
* shifts them to the `JsonpClientBackend`.
*
*
* @publicApi
*/
@Injectable()
export class JsonpInterceptor {

View File

@ -85,7 +85,7 @@ export function jsonpCallbackContext(): Object {
* If no names are supplied, the default cookie name is `XSRF-TOKEN`
* and the default header name is `X-XSRF-TOKEN`.
*
*
* @publicApi
*/
@NgModule({
providers: [
@ -138,7 +138,7 @@ export class HttpClientXsrfModule {
* You can add interceptors to the chain behind `HttpClient` by binding them to the
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
*
*
* @publicApi
*/
@NgModule({
/**
@ -175,7 +175,7 @@ export class HttpClientModule {
* You can add interceptors to the chain behind `HttpClient` by binding them to the
* multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.
*
*
* @publicApi
*/
@NgModule({
providers: [

View File

@ -11,7 +11,7 @@
*
* Used by `HttpParams`.
*
*
* @publicApi
**/
export interface HttpParameterCodec {
encodeKey(key: string): string;
@ -25,7 +25,7 @@ export interface HttpParameterCodec {
* A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to
* serialize and parse URL parameter keys and values.
*
*
* @publicApi
*/
export class HttpUrlEncodingCodec implements HttpParameterCodec {
encodeKey(key: string): string { return standardEncoding(key); }
@ -94,7 +94,7 @@ export interface HttpParamsOptions {
*
* This class is immutable - all mutation operations return a new instance.
*
*
* @publicApi
*/
export class HttpParams {
private map: Map<string, string[]>|null;

View File

@ -73,7 +73,7 @@ function isFormData(value: any): value is FormData {
* assumed to be immutable. To modify a `HttpRequest`, the `clone`
* method should be used.
*
*
* @publicApi
*/
export class HttpRequest<T> {
/**

View File

@ -11,7 +11,7 @@ import {HttpHeaders} from './headers';
/**
* Type enumeration for the different kinds of `HttpEvent`.
*
*
* @publicApi
*/
export enum HttpEventType {
/**
@ -48,7 +48,7 @@ export enum HttpEventType {
/**
* Base interface for progress events.
*
*
* @publicApi
*/
export interface HttpProgressEvent {
/**
@ -71,7 +71,7 @@ export interface HttpProgressEvent {
/**
* A download progress event.
*
*
* @publicApi
*/
export interface HttpDownloadProgressEvent extends HttpProgressEvent {
type: HttpEventType.DownloadProgress;
@ -98,7 +98,7 @@ export interface HttpUploadProgressEvent extends HttpProgressEvent {
* when a request may be retried multiple times, to distinguish between
* retries on the final event stream.
*
*
* @publicApi
*/
export interface HttpSentEvent { type: HttpEventType.Sent; }
@ -108,7 +108,7 @@ export interface HttpSentEvent { type: HttpEventType.Sent; }
* Grouping all custom events under this type ensures they will be handled
* and forwarded by all implementations of interceptors.
*
*
* @publicApi
*/
export interface HttpUserEvent<T> { type: HttpEventType.User; }
@ -130,7 +130,7 @@ export interface HttpJsonParseError {
*
* Typed according to the expected type of the response.
*
*
* @publicApi
*/
export type HttpEvent<T> =
HttpSentEvent | HttpHeaderResponse | HttpResponse<T>| HttpProgressEvent | HttpUserEvent<T>;
@ -138,7 +138,7 @@ export type HttpEvent<T> =
/**
* Base class for both `HttpResponse` and `HttpHeaderResponse`.
*
*
* @publicApi
*/
export abstract class HttpResponseBase {
/**
@ -207,7 +207,7 @@ export abstract class HttpResponseBase {
* `HttpHeaderResponse` is a `HttpEvent` available on the response
* event stream, only when progress events are requested.
*
*
* @publicApi
*/
export class HttpHeaderResponse extends HttpResponseBase {
/**
@ -248,7 +248,7 @@ export class HttpHeaderResponse extends HttpResponseBase {
* `HttpResponse` is a `HttpEvent` available on the response event
* stream.
*
*
* @publicApi
*/
export class HttpResponse<T> extends HttpResponseBase {
/**
@ -298,7 +298,7 @@ export class HttpResponse<T> extends HttpResponseBase {
* will contain either a wrapped Error object or the error response returned
* from the server.
*
*
* @publicApi
*/
export class HttpErrorResponse extends HttpResponseBase implements Error {
readonly name = 'HttpErrorResponse';

View File

@ -33,7 +33,7 @@ function getResponseUrl(xhr: any): string|null {
/**
* A wrapper around the `XMLHttpRequest` constructor.
*
*
* @publicApi
*/
export abstract class XhrFactory { abstract build(): XMLHttpRequest; }
@ -62,7 +62,7 @@ interface PartialResponse {
* An `HttpBackend` which uses the XMLHttpRequest API to send
* requests to a backend server.
*
*
* @publicApi
*/
@Injectable()
export class HttpXhrBackend implements HttpBackend {

View File

@ -21,7 +21,7 @@ export const XSRF_HEADER_NAME = new InjectionToken<string>('XSRF_HEADER_NAME');
/**
* Retrieves the current XSRF token to use with the next outgoing request.
*
*
* @publicApi
*/
export abstract class HttpXsrfTokenExtractor {
/**

View File

@ -13,7 +13,7 @@ import {TestRequest} from './request';
/**
* Defines a matcher for requests based on URL, method, or both.
*
*
* @publicApi
*/
export interface RequestMatch {
method?: string;
@ -24,7 +24,7 @@ export interface RequestMatch {
* Controller to be injected into tests, that allows for mocking and flushing
* of requests.
*
*
* @publicApi
*/
export abstract class HttpTestingController {
/**

View File

@ -18,7 +18,7 @@ import {HttpClientTestingBackend} from './backend';
*
* Inject `HttpTestingController` to expect and flush requests in your tests.
*
*
* @publicApi
*/
@NgModule({
imports: [

View File

@ -15,7 +15,7 @@ import {Observer} from 'rxjs';
* This interface allows access to the underlying `HttpRequest`, and allows
* responding with `HttpEvent`s or `HttpErrorResponse`s.
*
*
* @publicApi
*/
export class TestRequest {
/**