style(lint): re-format modules/@angular
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
import {isPresent, isString} from '../src/facade/lang';
|
||||
import {Headers} from './headers';
|
||||
import {RequestMethod} from './enums';
|
||||
import {RequestOptionsArgs} from './interfaces';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {URLSearchParams} from './url_search_params';
|
||||
|
||||
import {isPresent, isString} from '../src/facade/lang';
|
||||
|
||||
import {RequestMethod} from './enums';
|
||||
import {Headers} from './headers';
|
||||
import {normalizeMethodName} from './http_utils';
|
||||
import {RequestOptionsArgs} from './interfaces';
|
||||
import {URLSearchParams} from './url_search_params';
|
||||
|
||||
|
||||
/**
|
||||
* Creates a request options object to be optionally provided when instantiating a
|
||||
@ -35,7 +38,7 @@ export class RequestOptions {
|
||||
* Http method with which to execute a {@link Request}.
|
||||
* Acceptable methods are defined in the {@link RequestMethod} enum.
|
||||
*/
|
||||
method: RequestMethod | string;
|
||||
method: RequestMethod|string;
|
||||
/**
|
||||
* {@link Headers} to be attached to a {@link Request}.
|
||||
*/
|
||||
@ -61,9 +64,9 @@ export class RequestOptions {
|
||||
this.headers = isPresent(headers) ? headers : null;
|
||||
this.body = isPresent(body) ? body : null;
|
||||
this.url = isPresent(url) ? url : null;
|
||||
this.search = isPresent(search) ? (isString(search) ? new URLSearchParams(<string>(search)) :
|
||||
<URLSearchParams>(search)) :
|
||||
null;
|
||||
this.search = isPresent(search) ?
|
||||
(isString(search) ? new URLSearchParams(<string>(search)) : <URLSearchParams>(search)) :
|
||||
null;
|
||||
this.withCredentials = isPresent(withCredentials) ? withCredentials : null;
|
||||
}
|
||||
|
||||
@ -99,12 +102,12 @@ export class RequestOptions {
|
||||
body: isPresent(options) && isPresent(options.body) ? options.body : this.body,
|
||||
url: isPresent(options) && isPresent(options.url) ? options.url : this.url,
|
||||
search: isPresent(options) && isPresent(options.search) ?
|
||||
(isString(options.search) ? new URLSearchParams(<string>(options.search)) :
|
||||
(<URLSearchParams>(options.search)).clone()) :
|
||||
this.search,
|
||||
(isString(options.search) ? new URLSearchParams(<string>(options.search)) :
|
||||
(<URLSearchParams>(options.search)).clone()) :
|
||||
this.search,
|
||||
withCredentials: isPresent(options) && isPresent(options.withCredentials) ?
|
||||
options.withCredentials :
|
||||
this.withCredentials
|
||||
options.withCredentials :
|
||||
this.withCredentials
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user