-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
110 lines (91 loc) · 2.94 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
export class View extends Backbone.View<Backbone.Model> {
// bounding box
el: HTMLElement;
// models to bind to the template
models: NgBackbone.ModelMap;
// collections to bind to the template
collections: NgBackbone.CollectionMap;
// array of subviews
views: NgBackbone.ViewMap;
// instance of NgTemplate
template: any;
// constructor options getting available across the prototype
options: NgBackbone.ViewOptions;
// template errors/warnings
errors: string[][];
// is this view ever mounted
didComponentMount: boolean;
// is this view ever updated
didComponentUpdate: boolean;
// link to parent view
parent: NgBackbone.View;
// @Component payload for this class
__ngbComponent: NgBackbone.ComponentDto;
constructor( options?: NgBackbone.ViewOptions );
/**
* Abstract method: implement it when you want to plug in straight before el.innerHTML populated
*/
componentWillMount(): void;
/**
* Abstract method: implement it when you want to plug in straight after el.innerHTML populated
*/
componentDidMount(): void;
/**
* Abstract method: implement it when you want to control manually if the template requires re-sync
*/
shouldComponentUpdate( nextScope: NgBackbone.DataMap<any> ): boolean;
/**
* Abstract method: implement it when you need preparation before an template sync occurs
*/
componentWillUpdate( nextScope: NgBackbone.DataMap<any> ): void;
/**
* Abstract method: implement it when you need operate on the DOM after template sync
*/
componentDidUpdate( prevScope: NgBackbone.DataMap<any> ): void;
/**
* Render first and then sync the template
*/
render( source?: NgBackbone.Model | NgBackbone.Collection ): any;
/**
* Enhance listenTo to process maps
* @example:
* this.listenToMap( eventEmitter, {
* "cleanup-list": this.onCleanpList,
* "update-list": this.syncCollection
* });
* @param {Backbone.Events} other
* @param {NgBackbone.DataMap} event
*
* @returns {Backbone.NativeView}
*/
listenToMap( eventEmitter: Backbone.Events, event: NgBackbone.DataMap<string> ): View;
/**
* Remove all the nested view on parent removal
*/
remove(): View;
}
export class FormView extends View {
el: HTMLElement;
models: NgBackbone.ModelMap;
formValidators: { [key: string]: Function; };
/**
* Bind form and inputs
*/
bindGroups(): void;
/**
* helpere to test states control/group on input
*/
testInput( pointer: string, value: any ): Promise<any>;
/**
* Get form data of a specified form
*/
getData( groupName: string ): NgBackbone.DataMap<string | boolean>;
reset( groupName: string ): void;
}
export function Component( options: NgBackbone.ComponentOptions ): Function;
export class Collection extends Backbone.Collection<Backbone.Model> {
}
export class Model extends Backbone.Model {
}
export function Debounce( wait: number ): Function;
export function Mixin( mixin: NgBackbone.DataMap<any> ): Function;