Skip to content

Commit 2aaa584

Browse files
committed
compile stuff
1 parent 8bf40e1 commit 2aaa584

9 files changed

+349
-17
lines changed

.DS_Store

6 KB
Binary file not shown.

angular2-rest.d.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/// <reference path="node_modules/angular2/core.d.ts" />
22
/// <reference path="node_modules/angular2/http.d.ts" />
33
/// <reference path="node_modules/rxjs/Rx.d.ts" />
4-
import { Http, Request, Response } from "angular2/http";
4+
import { Http, Request } from "angular2/http";
5+
import { Observable } from "rxjs/Observable";
56
/**
67
* Angular 2 RESTClient class.
78
*
@@ -27,7 +28,7 @@ export declare class RESTClient {
2728
* @param {Response} res - response object
2829
* @returns {Response} res - transformed response object
2930
*/
30-
protected responseInterceptor(res: Response): Response;
31+
protected responseInterceptor(res: Observable<any>): Observable<any>;
3132
}
3233
/**
3334
* Set the base URL of REST resource
@@ -64,6 +65,17 @@ export declare var Header: (key: string) => (target: RESTClient, propertyKey: st
6465
* @param {Object} headersDef - custom headers in a key-value pair
6566
*/
6667
export declare function Headers(headersDef: any): (target: RESTClient, propertyKey: string, descriptor: any) => any;
68+
/**
69+
* Defines the media type(s) that the methods can produce
70+
* @param MediaType producesDef - mediaType to be parsed
71+
*/
72+
export declare function Produces(producesDef: MediaType): (target: RESTClient, propertyKey: string, descriptor: any) => any;
73+
/**
74+
* Supported @Produces media types
75+
*/
76+
export declare enum MediaType {
77+
JSON = 0,
78+
}
6779
/**
6880
* GET method
6981
* @param {string} url - resource url of the method

angular2-rest.js

+24-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular2-rest.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular2-rest.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Table of Contents:
2222
@PUT(url: String)
2323
@DELETE(url: String)
2424
@Headers(object)
25+
@Produces(MediaType)
2526
2627
- Parameter Decorators:
2728
@Path(string)
2829
@Query(string)
2930
@Header(string)
3031
@Body
31-
3232
*/
3333

3434
import {Inject} from "angular2/core";
@@ -175,7 +175,7 @@ export function Produces(producesDef: MediaType) {
175175
* Supported @Produces media types
176176
*/
177177
export enum MediaType {
178-
JSON
178+
JSON
179179
}
180180

181181

0 commit comments

Comments
 (0)