mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
(restangular) Add some missing methods
Adds - `oneUrl` - `allUrl` - `withHttpConfig`
This commit is contained in:
6
restangular/restangular.d.ts
vendored
6
restangular/restangular.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Restangular v1.2.2 - 2014-01-10
|
||||
// Type definitions for Restangular v1.2.2
|
||||
// Project: https://github.com/mgonto/restangular
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -9,7 +9,9 @@
|
||||
interface Restangular extends RestangularCustom {
|
||||
one(route: string, id?: number): RestangularElement;
|
||||
one(route: string, id?: string): RestangularElement;
|
||||
oneUrl(route: string, url: string): RestangularElement;
|
||||
all(route: string): RestangularCollection;
|
||||
allUrl(route: string, url: string): RestangularCollection;
|
||||
copy(fromElement: any): RestangularElement;
|
||||
withConfig(configurer: (RestangularProvider) => any): Restangular;
|
||||
restangularizeElement(parent: any, element: any, route: string, collection?, reqParams?): RestangularElement;
|
||||
@@ -27,6 +29,7 @@ interface RestangularElement extends Restangular {
|
||||
trace(queryParams?, headers?): ng.IPromise<any>;
|
||||
options(queryParams?, headers?): ng.IPromise<any>;
|
||||
patch(queryParams?, headers?): ng.IPromise<any>;
|
||||
withHttpConfig(httpConfig: ng.IRequestConfig): RestangularElement;
|
||||
getRestangularUrl(): string;
|
||||
}
|
||||
|
||||
@@ -38,6 +41,7 @@ interface RestangularCollection extends Restangular {
|
||||
options(queryParams?, headers?): ng.IPromise<any>;
|
||||
patch(queryParams?, headers?): ng.IPromise<any>;
|
||||
putElement(idx, params, headers): ng.IPromise<any>;
|
||||
withHttpConfig(httpConfig: ng.IRequestConfig): RestangularCollection;
|
||||
getRestangularUrl(): string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user