+ changing the JSData Promise type to interface

+ adding definitions object with usage example in tests for enabling custom type definitions of created resource definitions
This commit is contained in:
reppners
2015-03-02 21:27:20 +01:00
parent 8385575c31
commit eec429264e
2 changed files with 39 additions and 5 deletions
+7 -2
View File
@@ -16,7 +16,7 @@
// defining what exists in JSData and how it looks
declare module JSData_ {
class JSDataPromise<R> extends Promise<R> {
interface JSDataPromise<R> extends Promise<R> {
// enhanced with finally
finally<U>(finallyCb?:() => U):Promise<U>;
@@ -30,6 +30,10 @@ declare module JSData_ {
// rather undocumented
errors:DSErrors;
// those are objects containing the defined resources and adapters
definitions:any;
adapters:any;
defaults:DSConfiguration;
changeHistory(resourceName:string, id?:string):Array<Object>;
@@ -394,7 +398,8 @@ declare module JSData_ {
// declaring the existing global js object
declare var JSData:{
DS: JSData_.DS
DS: JSData_.DS;
DSErrors: JSData_.DSErrors;
};
//Support node require