fix(http): change type declarations to interfaces and export EventEmitter

This commit is contained in:
Jeff Cross 2015-08-25 10:11:28 -07:00
parent 38a5a2a955
commit 10437ab85c
2 changed files with 7 additions and 4 deletions

View File

@ -41,8 +41,9 @@ export {
RequestCredentialsOpts, RequestCredentialsOpts,
RequestCacheOpts, RequestCacheOpts,
RequestModesOpts RequestModesOpts
} from './src/enums'; } from './src/http/enums';
export {URLSearchParams} from './src/url_search_params'; 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. * Provides a basic set of injectables to use the {@link Http} service in any application.

View File

@ -42,7 +42,9 @@ export class Connection {
* Interface for options to construct a Request, based on * Interface for options to construct a Request, based on
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec. * [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; url?: string;
method?: RequestMethods; method?: RequestMethods;
search?: string | URLSearchParams; search?: string | URLSearchParams;
@ -58,7 +60,7 @@ export type RequestOptionsArgs = {
* 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.
*/ */
export type ResponseOptionsArgs = { export interface ResponseOptionsArgs {
// TODO: Support Blob, ArrayBuffer, JSON // TODO: Support Blob, ArrayBuffer, JSON
body?: string | Object | FormData; body?: string | Object | FormData;
status?: number; status?: number;