docs(common): improve deprecation notices to be parsed by tslint
Closes: #24237
This commit is contained in:
parent
0e1919c2db
commit
10213d0ca0
@ -13,7 +13,7 @@ import {Injectable} from '@angular/core';
|
|||||||
*
|
*
|
||||||
* Take care not to evaluate this in non-browser contexts.
|
* Take care not to evaluate this in non-browser contexts.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BrowserXhr {
|
export class BrowserXhr {
|
||||||
|
@ -23,7 +23,7 @@ const JSONP_ERR_WRONG_METHOD = 'JSONP requests must use GET request method.';
|
|||||||
/**
|
/**
|
||||||
* Base class for an in-flight JSONP request.
|
* Base class for an in-flight JSONP request.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class JSONPConnection implements Connection {
|
export class JSONPConnection implements Connection {
|
||||||
private _id: string;
|
private _id: string;
|
||||||
@ -136,7 +136,7 @@ export class JSONPConnection implements Connection {
|
|||||||
/**
|
/**
|
||||||
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests.
|
* A {@link ConnectionBackend} that uses the JSONP strategy of making requests.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class JSONPBackend extends ConnectionBackend {
|
export class JSONPBackend extends ConnectionBackend {
|
||||||
|
@ -28,7 +28,7 @@ const XSSI_PREFIX = /^\)\]\}',?\n/;
|
|||||||
* This class would typically not be created or interacted with directly inside applications, though
|
* This class would typically not be created or interacted with directly inside applications, though
|
||||||
* the {@link MockConnection} may be interacted with in tests.
|
* the {@link MockConnection} may be interacted with in tests.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class XHRConnection implements Connection {
|
export class XHRConnection implements Connection {
|
||||||
request: Request;
|
request: Request;
|
||||||
@ -187,7 +187,7 @@ export class XHRConnection implements Connection {
|
|||||||
* with different `cookieName` and `headerName` values. See the main HTTP documentation for more
|
* with different `cookieName` and `headerName` values. See the main HTTP documentation for more
|
||||||
* details.
|
* details.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class CookieXSRFStrategy implements XSRFStrategy {
|
export class CookieXSRFStrategy implements XSRFStrategy {
|
||||||
constructor(
|
constructor(
|
||||||
@ -225,7 +225,7 @@ export class CookieXSRFStrategy implements XSRFStrategy {
|
|||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class XHRBackend implements ConnectionBackend {
|
export class XHRBackend implements ConnectionBackend {
|
||||||
|
@ -37,7 +37,7 @@ import {URLSearchParams} from './url_search_params';
|
|||||||
* console.log('options.url:', options.url); // https://google.com
|
* console.log('options.url:', options.url); // https://google.com
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class RequestOptions {
|
export class RequestOptions {
|
||||||
/**
|
/**
|
||||||
@ -200,7 +200,7 @@ export class RequestOptions {
|
|||||||
* console.log('req.url:', req.url); // https://google.com
|
* console.log('req.url:', req.url); // https://google.com
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BaseRequestOptions extends RequestOptions {
|
export class BaseRequestOptions extends RequestOptions {
|
||||||
|
@ -39,7 +39,7 @@ import {ResponseOptionsArgs} from './interfaces';
|
|||||||
* console.log('res.json():', res.json()); // Object {name: "Jeff"}
|
* console.log('res.json():', res.json()); // Object {name: "Jeff"}
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class ResponseOptions {
|
export class ResponseOptions {
|
||||||
// TODO: FormData | Blob
|
// TODO: FormData | Blob
|
||||||
@ -156,7 +156,7 @@ export class ResponseOptions {
|
|||||||
* console.log('res.text():', res.text()); // Angular;
|
* console.log('res.text():', res.text()); // Angular;
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BaseResponseOptions extends ResponseOptions {
|
export class BaseResponseOptions extends ResponseOptions {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Supported http methods.
|
* Supported http methods.
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export enum RequestMethod {
|
export enum RequestMethod {
|
||||||
Get,
|
Get,
|
||||||
@ -24,7 +24,7 @@ export enum RequestMethod {
|
|||||||
* All possible states in which a connection can be, based on
|
* All possible states in which a connection can be, based on
|
||||||
* [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
|
* [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
|
||||||
* additional "CANCELLED" state.
|
* additional "CANCELLED" state.
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export enum ReadyState {
|
export enum ReadyState {
|
||||||
Unsent,
|
Unsent,
|
||||||
@ -38,7 +38,7 @@ export enum ReadyState {
|
|||||||
/**
|
/**
|
||||||
* Acceptable response types to be associated with a {@link Response}, based on
|
* Acceptable response types to be associated with a {@link Response}, based on
|
||||||
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
|
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export enum ResponseType {
|
export enum ResponseType {
|
||||||
Basic,
|
Basic,
|
||||||
@ -50,7 +50,7 @@ export enum ResponseType {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Supported content type to be automatically associated with a {@link Request}.
|
* Supported content type to be automatically associated with a {@link Request}.
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export enum ContentType {
|
export enum ContentType {
|
||||||
NONE,
|
NONE,
|
||||||
@ -64,7 +64,7 @@ export enum ContentType {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Define which buffer to use to store the response
|
* Define which buffer to use to store the response
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export enum ResponseContentType {
|
export enum ResponseContentType {
|
||||||
Text,
|
Text,
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
* console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'
|
* console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class Headers {
|
export class Headers {
|
||||||
/** @internal header names are lower case */
|
/** @internal header names are lower case */
|
||||||
|
@ -99,7 +99,7 @@ function mergeOptions(
|
|||||||
* http.get('request-from-mock-backend.json').subscribe((res:Response) => doSomething(res));
|
* http.get('request-from-mock-backend.json').subscribe((res:Response) => doSomething(res));
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Http {
|
export class Http {
|
||||||
@ -187,7 +187,7 @@ export class Http {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Jsonp extends Http {
|
export class Jsonp extends Http {
|
||||||
|
@ -40,7 +40,7 @@ export function jsonpFactory(jsonpBackend: JSONPBackend, requestOptions: Request
|
|||||||
/**
|
/**
|
||||||
* The module that includes http's providers
|
* The module that includes http's providers
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
@ -60,7 +60,7 @@ export class HttpModule {
|
|||||||
/**
|
/**
|
||||||
* The module that includes jsonp's providers
|
* The module that includes jsonp's providers
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@NgModule({
|
@NgModule({
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -17,14 +17,14 @@ import {URLSearchParams} from './url_search_params';
|
|||||||
* The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given
|
* The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given
|
||||||
* {@link Request}.
|
* {@link Request}.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export abstract class ConnectionBackend { abstract createConnection(request: any): Connection; }
|
export abstract class ConnectionBackend { abstract createConnection(request: any): Connection; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract class from which real connections are derived.
|
* Abstract class from which real connections are derived.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export abstract class Connection {
|
export abstract class Connection {
|
||||||
readyState: ReadyState;
|
readyState: ReadyState;
|
||||||
@ -35,7 +35,7 @@ export abstract class Connection {
|
|||||||
/**
|
/**
|
||||||
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.
|
* An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export abstract class XSRFStrategy { abstract configureRequest(req: Request): void; }
|
export abstract class XSRFStrategy { abstract configureRequest(req: Request): void; }
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ export abstract class XSRFStrategy { abstract configureRequest(req: Request): vo
|
|||||||
* Interface for options to construct a RequestOptions, based on
|
* Interface for options to construct a RequestOptions, based on
|
||||||
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec.
|
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export interface RequestOptionsArgs {
|
export interface RequestOptionsArgs {
|
||||||
url?: string|null;
|
url?: string|null;
|
||||||
@ -66,7 +66,7 @@ export interface RequestArgs extends RequestOptionsArgs { url: string|null; }
|
|||||||
* Interface for options to construct a Response, based on
|
* Interface for options to construct a Response, based on
|
||||||
* [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec.
|
* [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export interface ResponseOptionsArgs {
|
export interface ResponseOptionsArgs {
|
||||||
body?: string|Object|FormData|ArrayBuffer|Blob|null;
|
body?: string|Object|FormData|ArrayBuffer|Blob|null;
|
||||||
|
@ -52,7 +52,7 @@ import {URLSearchParams} from './url_search_params';
|
|||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class Request extends Body {
|
export class Request extends Body {
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +32,7 @@ import {Headers} from './headers';
|
|||||||
* can be accessed many times. There are other differences in the implementation, but this is the
|
* can be accessed many times. There are other differences in the implementation, but this is the
|
||||||
* most significant.
|
* most significant.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class Response extends Body {
|
export class Response extends Body {
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +22,7 @@ function paramParser(rawParams: string = ''): Map<string, string[]> {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
**/
|
**/
|
||||||
export class QueryEncoder {
|
export class QueryEncoder {
|
||||||
encodeKey(k: string): string { return standardEncoding(k); }
|
encodeKey(k: string): string { return standardEncoding(k); }
|
||||||
@ -76,7 +76,7 @@ function standardEncoding(v: string): string {
|
|||||||
*
|
*
|
||||||
* let params = new URLSearchParams('', new MyQueryEncoder());
|
* let params = new URLSearchParams('', new MyQueryEncoder());
|
||||||
* ```
|
* ```
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class URLSearchParams {
|
export class URLSearchParams {
|
||||||
paramsMap: Map<string, string[]>;
|
paramsMap: Map<string, string[]>;
|
||||||
|
@ -14,6 +14,6 @@
|
|||||||
|
|
||||||
import {Version} from '@angular/core';
|
import {Version} from '@angular/core';
|
||||||
/**
|
/**
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export const VERSION = new Version('0.0.0-PLACEHOLDER');
|
export const VERSION = new Version('0.0.0-PLACEHOLDER');
|
||||||
|
@ -16,7 +16,7 @@ import {take} from 'rxjs/operators';
|
|||||||
*
|
*
|
||||||
* Mock Connection to represent a {@link Connection} for tests.
|
* Mock Connection to represent a {@link Connection} for tests.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
export class MockConnection implements Connection {
|
export class MockConnection implements Connection {
|
||||||
// TODO: Name `readyState` should change to be more generic, and states could be made to be more
|
// TODO: Name `readyState` should change to be more generic, and states could be made to be more
|
||||||
@ -189,7 +189,7 @@ export class MockConnection implements Connection {
|
|||||||
*
|
*
|
||||||
* This method only exists in the mock implementation, not in real Backends.
|
* This method only exists in the mock implementation, not in real Backends.
|
||||||
*
|
*
|
||||||
* @deprecated use @angular/common/http instead
|
* @deprecated see https://angular.io/guide/http
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MockBackend implements ConnectionBackend {
|
export class MockBackend implements ConnectionBackend {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user