fix(http): change type declarations to interfaces and export EventEmitter
This commit is contained in:
parent
38a5a2a955
commit
10437ab85c
|
@ -41,8 +41,9 @@ export {
|
|||
RequestCredentialsOpts,
|
||||
RequestCacheOpts,
|
||||
RequestModesOpts
|
||||
} from './src/enums';
|
||||
export {URLSearchParams} from './src/url_search_params';
|
||||
} from './src/http/enums';
|
||||
export {URLSearchParams} from './src/http/url_search_params';
|
||||
export {EventEmitter, Observable} from './src/core/facade/async';
|
||||
|
||||
/**
|
||||
* Provides a basic set of injectables to use the {@link Http} service in any application.
|
||||
|
|
|
@ -42,7 +42,9 @@ export class Connection {
|
|||
* Interface for options to construct a Request, based on
|
||||
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec.
|
||||
*/
|
||||
export type RequestOptionsArgs = {
|
||||
// TODO(jeffbcross): Change to type declaration when #3828 is fixed
|
||||
// https://github.com/angular/angular/issues/3828
|
||||
export interface RequestOptionsArgs {
|
||||
url?: string;
|
||||
method?: RequestMethods;
|
||||
search?: string | URLSearchParams;
|
||||
|
@ -58,7 +60,7 @@ export type RequestOptionsArgs = {
|
|||
* Interface for options to construct a Response, based on
|
||||
* [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec.
|
||||
*/
|
||||
export type ResponseOptionsArgs = {
|
||||
export interface ResponseOptionsArgs {
|
||||
// TODO: Support Blob, ArrayBuffer, JSON
|
||||
body?: string | Object | FormData;
|
||||
status?: number;
|
||||
|
|
Loading…
Reference in New Issue