mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Adding legacy 1.2 versions of angular-animate, angular-cookies, angular-mocks, angular-resource, angular-route, angular-sanitize, and angular-scenario to address a reference issue when you bring in the 1.2 version of the core angular library. Updated documentation links in the 1.2 versions to point to the 1.2 versions of the documentation. Labeled /angularjs/angular-*.ts as 1.3 in the headers. These will be the starting points for a deeper 1.3 update review - though they are mostly backwards compatible as-is.
This commit is contained in:
30
angularjs/angular-resource.d.ts
vendored
30
angularjs/angular-resource.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Angular JS 1.2 (ngResource module)
|
||||
// Type definitions for Angular JS 1.3 (ngResource module)
|
||||
// Project: http://angularjs.org
|
||||
// Definitions by: Diego Vilar <http://github.com/diegovilar>, Michael Jess <http://github.com/miffels>
|
||||
// Definitions: https://github.com/daptiv/DefinitelyTyped
|
||||
@@ -11,6 +11,16 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
declare module ng.resource {
|
||||
|
||||
/**
|
||||
* Currently supported options for the $resource factory options argument.
|
||||
*/
|
||||
interface IResourceOptions {
|
||||
/**
|
||||
* If true then the trailing slashes from any calculated URL will be stripped (defaults to true)
|
||||
*/
|
||||
stripTrailingSlashes?: boolean;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ResourceService
|
||||
// see http://docs.angularjs.org/api/ngResource.$resource
|
||||
@@ -20,17 +30,17 @@ declare module ng.resource {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
interface IResourceService {
|
||||
(url: string, paramDefaults?: any,
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actionDescriptors?: any): IResourceClass<IResource<any>>;
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actions?: any, options?: IResourceOptions): IResourceClass<IResource<any>>;
|
||||
<T, U>(url: string, paramDefaults?: any,
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actionDescriptors?: any): U;
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actions?: any, options?: IResourceOptions): U;
|
||||
<T>(url: string, paramDefaults?: any,
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actionDescriptors?: any): IResourceClass<T>;
|
||||
/** example: {update: { method: 'PUT' }, delete: deleteDescriptor }
|
||||
where deleteDescriptor : IActionDescriptor */
|
||||
actions?: any, options?: IResourceOptions): IResourceClass<T>;
|
||||
}
|
||||
|
||||
// Just a reference to facilitate describing new actions
|
||||
|
||||
Reference in New Issue
Block a user