From fbfbc7ca5eb4f0754cd6802f11cd059e6caf8a3a Mon Sep 17 00:00:00 2001 From: Santi Albo Date: Tue, 13 Aug 2013 22:23:59 +0100 Subject: [PATCH] Fix type signatures for methods that return an IPromise --- restangular/restangular.d.ts | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/restangular/restangular.d.ts b/restangular/restangular.d.ts index 357750e2df..e44c1a486f 100644 --- a/restangular/restangular.d.ts +++ b/restangular/restangular.d.ts @@ -15,45 +15,45 @@ interface Restangular extends RestangularCustom { } interface RestangularElement extends Restangular { - get (): ng.IPromise; - get (params: any): ng.IPromise; - get (params: any, headers: any): ng.IPromise; + get (): ng.IPromise; + get (params: any): ng.IPromise; + get (params: any, headers: any): ng.IPromise; - getList(): ng.IPromise; - getList(subElement: any): ng.IPromise; - getList(subElement: any, queryParams: string, headers: any): ng.IPromise; + getList(): ng.IPromise; + getList(subElement: any): ng.IPromise; + getList(subElement: any, queryParams: string, headers: any): ng.IPromise; - put(queryParams?: string, headers?: any): ng.IPromise; + put(queryParams?: string, headers?: any): ng.IPromise; - post(subElement, elementToPost, queryParams?, headers?): ng.IPromise; + post(subElement, elementToPost, queryParams?, headers?): ng.IPromise; - remove(queryParams?, headers?): ng.IPromise; - head(queryParams?, headers?): ng.IPromise; - trace(queryParams?, headers?): ng.IPromise; - options(queryParams?, headers?): ng.IPromise; - patch(queryParams?, headers?): ng.IPromise; + remove(queryParams?, headers?): ng.IPromise; + head(queryParams?, headers?): ng.IPromise; + trace(queryParams?, headers?): ng.IPromise; + options(queryParams?, headers?): ng.IPromise; + patch(queryParams?, headers?): ng.IPromise; getRestangularUrl(): string; } interface RestangularCollection extends Restangular { - getList(queryParams?, headers?): ng.IPromise; - post(elementToPost, queryParams?, headers?): ng.IPromise; - head(queryParams?, headers?): ng.IPromise; - trace(queryParams?, headers?): ng.IPromise; - options(queryParams?, headers?): ng.IPromise; - patch(queryParams?, headers?): ng.IPromise; - putElement(idx, params, headers): ng.IPromise; + getList(queryParams?, headers?): ng.IPromise; + post(elementToPost, queryParams?, headers?): ng.IPromise; + head(queryParams?, headers?): ng.IPromise; + trace(queryParams?, headers?): ng.IPromise; + options(queryParams?, headers?): ng.IPromise; + patch(queryParams?, headers?): ng.IPromise; + putElement(idx, params, headers): ng.IPromise; getRestangularUrl(): string; } interface RestangularCustom { - customGET(path, params?, headers?): ng.IPromise; - customGETLIST(path, params?, headers?): ng.IPromise; - customDELETE(path, params?, headers?): ng.IPromise; - customPOST(path, params?, headers?, elem?): ng.IPromise; - customPUT(path, params?, headers?, elem?): ng.IPromise; - customOperation(operation, path, params?, headers?, elem?): ng.IPromise; - addRestangularMethod(name, operation, path?, params?, headers?, elem?): ng.IPromise; + customGET(path, params?, headers?): ng.IPromise; + customGETLIST(path, params?, headers?): ng.IPromise; + customDELETE(path, params?, headers?): ng.IPromise; + customPOST(path, params?, headers?, elem?): ng.IPromise; + customPUT(path, params?, headers?, elem?): ng.IPromise; + customOperation(operation, path, params?, headers?, elem?): ng.IPromise; + addRestangularMethod(name, operation, path?, params?, headers?, elem?): ng.IPromise; } interface RestangularProvider {