From cc0537a0ac38b9731007f11573d1580709ce6acd Mon Sep 17 00:00:00 2001 From: Marvin Luchs Date: Mon, 27 Apr 2015 13:01:12 +0200 Subject: [PATCH] "parent" argument of Restangular.service() should be optional The documentation as well as the actual source code of Restangular define the parent argument of Restangular.service(route, parent) as optional: https://github.com/mgonto/restangular#decoupled-restangular-service function toService(route, parent) { [...] var collection = (parent || service).all(route); --- restangular/restangular.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/restangular/restangular.d.ts b/restangular/restangular.d.ts index c2013f6c4..5a4e87483 100644 --- a/restangular/restangular.d.ts +++ b/restangular/restangular.d.ts @@ -93,7 +93,7 @@ declare module restangular { withConfig(configurer: (RestangularProvider: IProvider) => any): IService; restangularizeElement(parent: any, element: any, route: string, collection?: any, reqParams?: any): IElement; restangularizeCollection(parent: any, element: any, route: string): ICollection; - service(route: string, parent: any): IService; + service(route: string, parent?: any): IService; stripRestangular(element: any): any; }