mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Fixed definitions for 'js-data'.
This commit is contained in:
19
js-data/js-data.d.ts
vendored
19
js-data/js-data.d.ts
vendored
@@ -115,7 +115,17 @@ declare module JSData {
|
||||
}
|
||||
|
||||
interface DSAdapterOperationConfiguration extends DSConfiguration {
|
||||
adapter?: string
|
||||
adapter?: string;
|
||||
bypassCache?: boolean;
|
||||
cacheResponse?: boolean;
|
||||
findStrategy?: string;
|
||||
findFallbackAdapters?: string[];
|
||||
strategy?: string;
|
||||
fallbackAdapters?: string[];
|
||||
|
||||
params: {
|
||||
[paramName: string]: string | number | boolean;
|
||||
};
|
||||
}
|
||||
|
||||
interface DSSaveConfiguration extends DSAdapterOperationConfiguration {
|
||||
@@ -156,7 +166,8 @@ declare module JSData {
|
||||
digest():void;
|
||||
eject<T>(id:string | number, options?:DSConfiguration):T;
|
||||
ejectAll<T>(params:DSFilterParams, options?:DSConfiguration):Array<T>;
|
||||
filter<T>(params:DSFilterParams, options?:DSConfiguration):Array<T>;
|
||||
filter<T>(params: DSFilterParams, options?: DSConfiguration): Array<T>;
|
||||
filter<T>(params: DSFilterParamsForAllowSimpleWhere, options?: DSConfiguration): Array<T>;
|
||||
get<T>(id:string | number, options?:DSConfiguration):T;
|
||||
getAll<T>(ids?:Array<string | number>):Array<T>;
|
||||
hasChanges(id:string | number):boolean;
|
||||
@@ -184,6 +195,10 @@ declare module JSData {
|
||||
sort?: string | Array<string> | Array<Array<string>>;
|
||||
}
|
||||
|
||||
interface DSFilterParamsForAllowSimpleWhere {
|
||||
[key: string]: string | number;
|
||||
}
|
||||
|
||||
interface IDSResourceLifecycleValidateEventHandlers {
|
||||
beforeValidate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void;
|
||||
validate?: (resourceName:string, data:any, cb:(err:any, data?:any)=>void)=>void;
|
||||
|
||||
Reference in New Issue
Block a user