@@ -15,37 +15,55 @@ and limitations under the License.
15
15
16
16
declare module WinJS {
17
17
function strictProcessing ( ) : void ;
18
+
19
+ export module Application {
20
+ export var onsettings : EventListener ;
21
+ }
22
+
18
23
module Binding {
19
24
function as ( data : any ) : any ;
20
- class List {
21
- constructor ( data ?: any [ ] ) ;
22
- public push ( item : any ) : any ;
23
- public indexOf ( item : any ) : number ;
24
- public splice ( start : number , howMany ?: number , item ?: any [ ] ) : any [ ] ;
25
- public createFiltered ( predicate : ( x : any ) => boolean ) : List ;
26
- public createGrouped ( keySelector : ( x : any ) => any , dataSelector : ( x :any ) => any , groupSorter : ( left :any , right :any ) => number ) : List ;
27
- public groups : any ;
25
+ function processAll ( rootElement ?: any , dataContext ?: any , skipRoot ?: boolean , bindingCache ?: any ) : any ;
26
+ function define ( data : any ) : any ;
27
+ function expandProperties ( data : any ) : any ;
28
+ function converter ( method : any ) : any ;
29
+
30
+ export var optimizeBindingReferences : boolean ;
31
+ export var mixin ;
32
+ export var bind ;
33
+ export var oneTime ;
34
+
35
+ export function initializer ( customInit ) : any ;
36
+ export var setAttribute ;
37
+
38
+ class List < T > {
39
+ constructor ( data ?: T [ ] , options ?: { binding : boolean ; proxy : boolean ; } ) ;
40
+ public push ( item : T ) : number ;
41
+ public indexOf ( item : T , fromIndex ?: number ) : number ;
42
+ public splice ( start : number , howMany ?: number , ...items : T [ ] ) : T [ ] ;
43
+ public createFiltered ( predicate : ( x : T ) => boolean ) : List < T > ;
44
+ public createGrouped < U > ( keySelector : ( x : T ) => string , dataSelector : ( x :T ) => U , groupSorter : ( left :string , right :string ) => number ) : List < T > ;
45
+ public createSorted ( sorter : ( left :T , right :T ) => number ) ;
46
+ public groups : List < any > ;
28
47
public dataSource : any ;
29
- public getAt ( index : number ) : any ;
30
- public createSorted ( sorter : ( left , right ) => number ) ;
31
- public forEach ( callback : ( val : any , index : number , array : any [ ] ) => void , thisArg ?: any ) ;
32
- public every ( callback : ( val : any , index : number , array : any [ ] ) => boolean , thisArg ?: any ) : boolean ;
48
+ public getAt ( index : number ) : T ;
49
+ public forEach ( callback : ( val : T , index : number , array : T [ ] ) => void , thisArg ?: any ) ;
50
+ public every ( callback : ( val : T , index : number , array : T [ ] ) => boolean , thisArg ?: any ) : boolean ;
33
51
public join ( separator : string ) : string ;
34
- public map ( callback : ( val : any , index : number , array : any [ ] ) => any , thisArg ?: any ) : any [ ] ;
52
+ public map < U > ( callback : ( val : T , index : number , array : T [ ] ) => U , thisArg ?: any ) : U [ ] ;
35
53
public move ( index : number , newIndex : number ) ;
36
- public pop ( ) : any ;
54
+ public pop ( ) : T ;
37
55
public reduce ( callback : ( previousValue : any , currentValue : any , currentIndex : number , array : any [ ] ) => any , initialValue ?: any ) : any ;
38
56
public reduceRight ( callback : ( previousValue : any , currentValue : any , currentIndex : number , array : any [ ] ) => any , initialValue ?: any ) : any ;
39
57
public reverse ( ) ;
40
- public setAt ( index : number , newValue : number ) ;
41
- public shift ( ) : any ;
42
- public slice ( begin : number , end : number ) : WinJS . Binding . List ;
43
- public some ( callback : ( val : any , index : number , array : any [ ] ) => boolean , thisArg ?: any ) : boolean ;
44
- public sort ( sortFunction : ( left , right ) => number ) ;
45
- public unshift ( value : any ) : number ;
58
+ public setAt ( index : number , newValue : T ) ;
59
+ public shift ( ) : T ;
60
+ public slice ( begin : number , end : number ) : List < T > ;
61
+ public some ( callback : ( val : T , index : number , array : T [ ] ) => boolean , thisArg ?: any ) : boolean ;
62
+ public sort ( sortFunction : ( left : T , right : T ) => number ) ;
63
+ public filter ( callback : ( val : T , index : number , array : T [ ] ) => boolean , thisArg ?: any ) : T [ ] ;
64
+ public unshift ( value : T ) : number ;
46
65
public length : number ;
47
- public notifyMutated ( index : number ) ;
48
-
66
+ public notifyMutated ( index : number ) ;
49
67
}
50
68
class Template {
51
69
public element : HTMLElement ;
@@ -73,7 +91,7 @@ declare module WinJS {
73
91
module Class {
74
92
function define ( constructor : any , instanceMembers : any ) : any ;
75
93
function derive ( baseClass : any , constructor : any , instanceMembers : any ) : any ;
76
- function mix ( constructor : any , mixin : any ) : any ;
94
+ function mix ( constructor : any , ... mixin : any [ ] ) : any ;
77
95
}
78
96
function xhr ( options : { type ?: string ; url ?: string ; user ?: string ; password ?: string ; headers ?: any ; data ?: any ; responseType ?: string ; } ) : WinJS . Promise < XMLHttpRequest > ;
79
97
module Application {
@@ -100,15 +118,21 @@ declare module WinJS {
100
118
class ErrorFromName {
101
119
constructor ( name : string , message ?: string ) ;
102
120
}
103
- class Promise < T > {
121
+ class Promise < T > implements Windows . Foundation . IPromise < T > {
104
122
constructor ( init : ( c : any , e : any , p : any ) => void ) ;
105
- then < U > ( success ?: ( value : T ) => Promise < U > , error ?: ( error : any ) => Promise < U > , progress ?: ( progress : any ) => void ) : Promise < U > ;
106
- then < U > ( success ?: ( value : T ) => Promise < U > , error ?: ( error : any ) => U , progress ?: ( progress : any ) => void ) : Promise < U > ;
107
- then < U > ( success ?: ( value : T ) => U , error ?: ( error : any ) => Promise < U > , progress ?: ( progress : any ) => void ) : Promise < U > ;
108
- then < U > ( success ?: ( value : T ) => U , error ?: ( error : any ) => U , progress ?: ( progress : any ) => void ) : Promise < U > ;
123
+ then < U > ( success ?: ( value : T ) => Windows . Foundation . IPromise < U > , error ?: ( error : any ) => Windows . Foundation . IPromise < U > , progress ?: ( progress : any ) => void ) : Windows . Foundation . IPromise < U > ;
124
+ then < U > ( success ?: ( value : T ) => Windows . Foundation . IPromise < U > , error ?: ( error : any ) => U , progress ?: ( progress : any ) => void ) : Windows . Foundation . IPromise < U > ;
125
+ then < U > ( success ?: ( value : T ) => U , error ?: ( error : any ) => Windows . Foundation . IPromise < U > , progress ?: ( progress : any ) => void ) : Windows . Foundation . IPromise < U > ;
126
+ then < U > ( success ?: ( value : T ) => U , error ?: ( error : any ) => U , progress ?: ( progress : any ) => void ) : Windows . Foundation . IPromise < U > ;
109
127
done < U > ( success ?: ( value : T ) => any , error ?: ( error : any ) => any , progress ?: ( progress : any ) => void ) : void ;
110
- static join : any ;
111
- static timeout : any ;
128
+
129
+ cancel ( ) : void ;
130
+
131
+ static join ( values : any [ ] ) : Promise < any [ ] > ;
132
+ static timeout ( timeout : number ) : Promise < void > ;
133
+ static as ( ) : Promise < any > ;
134
+ static as < U > ( obj : U ) : Promise < U > ;
135
+ static wrapError < U > ( obj : U ) : Promise < U > ;
112
136
}
113
137
module Navigation {
114
138
var history : any ;
@@ -126,9 +150,23 @@ declare module WinJS {
126
150
var onnavigated : CustomEvent ;
127
151
var onnavigating : CustomEvent ;
128
152
}
153
+
154
+ export module Resources {
155
+ export var processAll : ( element ?: HTMLElement ) => void ;
156
+ export var getString : ( id : string ) => { value : string ; empty ?: boolean ; lang ?: string ; } ;
157
+ export var addEventListener : ( id : string , handler : EventListener , useCapture ?: boolean ) => void ;
158
+ }
159
+
129
160
module Utilities {
130
- function markSupportedForProcessing ( obj : any ) : void ;
131
- enum Key {
161
+ function markSupportedForProcessing < T > ( obj : T ) : T ;
162
+ function createEventProperties ( ...events : string [ ] ) : any ;
163
+
164
+ export function addClass ( element : HTMLElement , className : string ) : void ;
165
+ export function removeClass ( element : HTMLElement , className : string ) : void ;
166
+
167
+ export function hasClass ( element : HTMLElement , className : string ) : boolean ;
168
+
169
+ enum Key {
132
170
backspace ,
133
171
tab ,
134
172
enter ,
@@ -235,9 +273,58 @@ declare module WinJS {
235
273
var ListLayout : any ;
236
274
var GridLayout : any ;
237
275
var Pages : any ;
238
- var Menu : any ;
239
- var setOptions : any ;
276
+ var setOptions : any ;
277
+
278
+ export var Animation : any ;
279
+
280
+ var DOMEventMixin : any ;
281
+
282
+ class Flyout {
283
+ constructor ( element : HTMLElement , options ) ;
284
+ element : Element ;
285
+ }
286
+
287
+ module Fragments {
288
+ var renderCopy : any ;
289
+ }
290
+
291
+ export class HtmlControl {
292
+ constructor ( element : HTMLElement , options : { uri : string ; } ) ;
293
+ }
294
+
295
+ interface IItem {
296
+ data : any ;
297
+ }
298
+
299
+ interface ISelection {
300
+ clear ( ) : WinJS . Promise < void > ;
301
+ count ( ) ;
302
+ getItems ( ) : WinJS . Promise < IItem [ ] > ;
303
+ }
304
+
305
+ class ListView {
306
+ element : Element ;
307
+ elementFromIndex ( index : number ) ;
308
+ indexOfElement ( element : Element ) ;
309
+ selection : ISelection ;
310
+ }
311
+
312
+ class Menu {
313
+ constructor ( element : HTMLElement , options ) ;
314
+ element : Element ;
315
+ }
316
+
317
+ export class MenuCommand {
318
+ constructor ( element : HTMLElement , options ) ;
319
+ }
320
+
321
+ export class SettingsFlyout {
322
+ static populateSettings ( e : any ) : any ;
323
+ static showSettings ( id : string , path : any ) : any ;
324
+ }
240
325
}
326
+
327
+ export function xhr ( options : { type : string ; url : string ; } ) : WinJS . Promise < any > ; // user: string; password: string; headers: any; data: any; responseType: string;
241
328
}
242
329
243
330
interface Element {
0 commit comments