Skip to content

Commit

Permalink
Updated typescript definitions for angular-odata-resources. Added sup…
Browse files Browse the repository at this point in the history
…port for $select
  • Loading branch information
Raphael ATALLAH committed Aug 17, 2015
1 parent 9f9ce5f commit 9f02d02
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
9 changes: 9 additions & 0 deletions angular-odata-resources/angular-odata-resources-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,12 @@ users = odataResourceClass.odata()
var countResult = odataResourceClass.odata().count();
var total = countResult.result;




var usersSelect1 = odataResourceClass.odata()
.select('name', 'user');


var usersSelect2 = odataResourceClass.odata()
.select(['name', 'user']);
13 changes: 8 additions & 5 deletions angular-odata-resources/angular-odata-resources.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,17 @@ declare module OData {
private expandables;
constructor(callback: ProviderCallback<T>);
filter(operand1: any, operand2?: any, operand3?: any): Provider<T>;
orderBy(arg1: any, arg2?: any): Provider<T>;
orderBy(arg1: string, arg2?: string): Provider<T>;
take(amount: number): Provider<T>;
skip(amount: number): Provider<T>;
private execute();
query(success?: any, error?: any): T[];
single(success?: any, error?: any): T;
get(data: any, success?: any, error?: any): T;
expand(params: any, otherParam1?: any, otherParam2?: any, otherParam3?: any, otherParam4?: any, otherParam5?: any, otherParam6?: any, otherParam7?: any): Provider<T>;
query(success?: ((p:T)=>void), error?: (()=>void)): T[];
single(success?: ((p:T)=>void), error?: (()=>void)): T;
get(key: any, success?: ((p:T)=>void), error?: (()=>void)): T;
expand(...params: string[]): Provider<T>;
expand(params: string[]): Provider<T>;
select(...params: string[]): Provider<T>;
select(params: string[]): Provider<T>;
count(success?: (result: ICountResult) => any, error?: () => any):ICountResult;
withInlineCount(): Provider<T>;
}
Expand Down

0 comments on commit 9f02d02

Please sign in to comment.