1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class ViewList<T> {
|
14 | constructor(create_view: (model: any, index: any) => T | Promise<T>, remove_view: ((view: T) => void) | null, context: any);
|
15 | initialize(create_view: (model: any, index: any) => T | Promise<T>, remove_view: ((view: T) => void) | null, context: any): void;
|
16 | /**
|
17 | * the create_view, remove_view, and context arguments override the defaults
|
18 | * specified when the list is created.
|
19 | * after this function, the .views attribute is a list of promises for views
|
20 | * if you want to perform some action on the list of views, do something like
|
21 | * `Promise.all(myviewlist.views).then(function(views) {...});`
|
22 | */
|
23 | update(new_models: any[], create_view?: (model: any, index: any) => T | Promise<T>, remove_view?: (view: T) => void, context?: any): Promise<T[]>;
|
24 | /**
|
25 | * removes every view in the list; convenience function for `.update([])`
|
26 | * that should be faster
|
27 | * returns a promise that resolves after this removal is done
|
28 | */
|
29 | remove(): Promise<void>;
|
30 | /**
|
31 | * Dispose this viewlist.
|
32 | *
|
33 | * A synchronous function which just deletes references to child views. This
|
34 | * function does not call .remove() on child views because that is
|
35 | * asynchronous. Use this in cases where child views will be removed in
|
36 | * another way.
|
37 | */
|
38 | dispose(): void;
|
39 | _handler_context: any;
|
40 | _models: any[];
|
41 | views: Promise<T>[];
|
42 | _create_view: (model: any, index: any) => T | Promise<T>;
|
43 | _remove_view: (view: T) => void;
|
44 | }
|
45 | //# sourceMappingURL=viewlist.d.ts.map |
\ | No newline at end of file |