diff --git a/angularjs/angular-resource-tests.ts b/angularjs/angular-resource-tests.ts index cfa7712cc2..fcf0bd0a96 100644 --- a/angularjs/angular-resource-tests.ts +++ b/angularjs/angular-resource-tests.ts @@ -89,6 +89,9 @@ resource = resourceClass.save({ key: 'value' }, { key: 'value' }, function () { var promise : angular.IPromise; var arrayPromise : angular.IPromise; +var json: { + [index: string]: any; +}; promise = resource.$delete(); promise = resource.$delete({ key: 'value' }); @@ -127,6 +130,8 @@ promise = resource.$save(function () { }); promise = resource.$save(function () { }, function () { }); promise = resource.$save({ key: 'value' }, function () { }, function () { }); +json = resource.toJSON(); + /////////////////////////////////////// // IResourceService /////////////////////////////////////// diff --git a/angularjs/angular-resource.d.ts b/angularjs/angular-resource.d.ts index 76930196ba..2187130ac9 100644 --- a/angularjs/angular-resource.d.ts +++ b/angularjs/angular-resource.d.ts @@ -136,6 +136,9 @@ declare module angular.resource { /** the promise of the original server interaction that created this instance. **/ $promise : angular.IPromise; $resolved : boolean; + toJSON: () => { + [index: string]: any; + } } /**