Skip to content

Commit 10437ab

Browse files
committed
fix(http): change type declarations to interfaces and export EventEmitter
1 parent 38a5a2a commit 10437ab

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

modules/angular2/http.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ export {
4141
RequestCredentialsOpts,
4242
RequestCacheOpts,
4343
RequestModesOpts
44-
} from './src/enums';
45-
export {URLSearchParams} from './src/url_search_params';
44+
} from './src/http/enums';
45+
export {URLSearchParams} from './src/http/url_search_params';
46+
export {EventEmitter, Observable} from './src/core/facade/async';
4647

4748
/**
4849
* Provides a basic set of injectables to use the {@link Http} service in any application.

modules/angular2/src/http/interfaces.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export class Connection {
4242
* Interface for options to construct a Request, based on
4343
* [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec.
4444
*/
45-
export type RequestOptionsArgs = {
45+
// TODO(jeffbcross): Change to type declaration when #3828 is fixed
46+
// https://github.com/angular/angular/issues/3828
47+
export interface RequestOptionsArgs {
4648
url?: string;
4749
method?: RequestMethods;
4850
search?: string | URLSearchParams;
@@ -58,7 +60,7 @@ export type RequestOptionsArgs = {
5860
* Interface for options to construct a Response, based on
5961
* [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec.
6062
*/
61-
export type ResponseOptionsArgs = {
63+
export interface ResponseOptionsArgs {
6264
// TODO: Support Blob, ArrayBuffer, JSON
6365
body?: string | Object | FormData;
6466
status?: number;

0 commit comments

Comments
 (0)