Skip to content

Commit a75be3c

Browse files
Actualize d.ts (#366)
1 parent 1938b47 commit a75be3c

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

js-test/check-ts-compilation.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,25 @@ let store = AspNetData.createStore({
1616
store.load({ sort: "name" }).done(r => {
1717

1818
})
19+
20+
AspNetData.createStore({
21+
loadMode: "raw",
22+
cacheRawData: false,
23+
24+
onLoading: (loadOptions) => console.log(loadOptions.filter),
25+
onLoaded: (result) => console.log(result.length),
26+
27+
onInserting: (values) => console.log(values),
28+
onInserted: (values, key) => console.log(values, key),
29+
30+
onUpdating: (key, values) => console.log(key, values),
31+
onUpdated: (key, values) => console.log(key, values),
32+
33+
onRemoving: (key) => console.log(key),
34+
onRemoved: (key) => console.log(key),
35+
36+
onModifying: () => console.log("modifying"),
37+
onModified: () => console.log("modified"),
38+
39+
onPush: (changes) => console.log(changes.length)
40+
})

js/dx.aspnet.data.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import CustomStore from "devextreme/data/custom_store";
2+
import { LoadOptions } from "devextreme/data/load_options";
23

34
interface Options {
45
key?: string|Array<string>,
@@ -17,8 +18,28 @@ interface Options {
1718
deleteUrl?: string,
1819
deleteMethod?: string,
1920

21+
loadMode?: "processed" | "raw",
22+
cacheRawData?: boolean,
23+
2024
onBeforeSend?: (operation: string, ajaxSettings: JQueryAjaxSettings) => void,
2125
onAjaxError?: (e: { xhr: JQueryXHR, error: string | Error }) => void
26+
27+
onLoading?: (loadOptions: LoadOptions) => void;
28+
onLoaded?: (result: Array<any>) => void;
29+
30+
onInserting?: (values: any) => void;
31+
onInserted?: (values: any, key: any) => void;
32+
33+
onUpdating?: (key: any, values: any) => void;
34+
onUpdated?: (key: any, values: any) => void;
35+
36+
onRemoving?: (key: any) => void;
37+
onRemoved?: (key: any) => void;
38+
39+
onModifying?: Function;
40+
onModified?: Function;
41+
42+
onPush?: (changes: Array<any>) => void;
2243
}
2344

2445
export function createStore(options: Options): CustomStore;

0 commit comments

Comments
 (0)