+ update of definitions to make use of union types

This commit is contained in:
reppners
2015-03-06 08:23:21 +01:00
parent a6cbfba663
commit e26a0474bd
3 changed files with 72 additions and 202 deletions
+2 -4
View File
@@ -16,15 +16,13 @@ declare module JSData {
bindAll<T>(resourceName:string, params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array<T>)=>void):Function;
bindOne<T>(resourceName:string, id:string, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
bindOne<T>(resourceName:string, id:number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
bindOne<T>(resourceName:string, id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
}
interface DSResourceDefinition<T> {
bindAll<T>(params:DSFilterParams, scope:ng.IScope, expr:string, cb?:(err:DSError, items:Array<T>)=>void):Function;
bindOne<T>(id:string, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
bindOne<T>(id:number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
bindOne<T>(id:string | number, scope:ng.IScope, expr:string, cb?:(err:DSError, item:T)=>void):Function;
}
}