mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
+ 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:
Vendored
+7
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user