Skip to content

Commit

Permalink
make extract static
Browse files Browse the repository at this point in the history
  • Loading branch information
joesonw committed Aug 7, 2017
1 parent 0cbfa4d commit f1f4ee9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@t2ee/restful",
"version": "1.0.2",
"version": "1.0.3",
"description": "restful",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/RestfulService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class RestfulService {
}

public create<T>(service: new (...args) => T): T {
const description = this.extract(service);
const description = RestfulService.extract(service);
return new Proxy({} as any, new RestfulClient(
description,
this._baseUrl,
Expand All @@ -92,7 +92,7 @@ export default class RestfulService {
));
}

public extract<T>(service: new (...args) => T): {[key: string]: MethodDescription} {
public static extract<T>(service: new (...args) => T): {[key: string]: MethodDescription} {
const description: {[key: string]: MethodDescription} = {};
const methods = Metadata.get('t2ee:restful:method', service.prototype);
for (const key in methods) {
Expand Down

0 comments on commit f1f4ee9

Please sign in to comment.