Skip to content

Commit 556523a

Browse files
committed
work so it will still compile if implicit any is turned off
1 parent b0d6f69 commit 556523a

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

winjs/winjs.d.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,42 @@ declare module WinJS {
2828
function converter(method: any): any;
2929

3030
export var optimizeBindingReferences: boolean;
31-
export var mixin;
32-
export var bind;
33-
export var oneTime;
31+
export var mixin: any;
32+
export var bind: any;
33+
export var oneTime: any;
3434

35-
export function initializer(customInit): any;
36-
export var setAttribute;
35+
export function initializer(customInit: any): any;
36+
export var setAttribute: any;
3737

3838
class List<T> {
3939
constructor(data?: T[], options?: { binding: boolean; proxy: boolean; });
4040
public push(item: T): number;
4141
public indexOf(item: T, fromIndex?: number): number;
4242
public splice(start: number, howMany?: number, ...items: T[]): T[];
4343
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);
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): List<T>;
4646
public groups: List<any>;
4747
public dataSource: any;
4848
public getAt(index: number): T;
49-
public forEach(callback: (val: T, index: number, array: T[]) => void, thisArg?: any);
49+
public forEach(callback: (val: T, index: number, array: T[]) => void, thisArg?: any): void;
5050
public every(callback: (val: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
5151
public join(separator: string): string;
5252
public map<U>(callback: (val: T, index: number, array: T[]) => U, thisArg?: any): U[];
53-
public move(index: number, newIndex: number);
53+
public move(index: number, newIndex: number): void;
5454
public pop(): T;
5555
public reduce(callback: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any;
5656
public reduceRight(callback: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any;
57-
public reverse();
58-
public setAt(index: number, newValue: T);
57+
public reverse(): void;
58+
public setAt(index: number, newValue: T): void;
5959
public shift(): T;
6060
public slice(begin: number, end: number): List<T>;
6161
public some(callback: (val: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
62-
public sort(sortFunction: (left: T, right: T) => number);
62+
public sort(sortFunction: (left: T, right: T) => number): void;
6363
public filter(callback: (val: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
6464
public unshift(value: T): number;
6565
public length: number;
66-
public notifyMutated(index: number);
66+
public notifyMutated(index: number): void;
6767
}
6868
class Template {
6969
public element: HTMLElement;
@@ -79,7 +79,7 @@ declare module WinJS {
7979
(dataContext: any, container?: HTMLElement): WinJS.Promise<HTMLElement>;
8080
value(href: string, dataContext: any, container?: HTMLElement): WinJS.Promise<HTMLElement>;
8181
};
82-
public renderItem(item: any, recycled?: HTMLElement);
82+
public renderItem(item: any, recycled?: HTMLElement): void;
8383
}
8484

8585

@@ -143,8 +143,8 @@ declare module WinJS {
143143
function addEventListener(type: string, listener: EventListener, capture: boolean): void;
144144
function back(): void;
145145
function forward(): void;
146-
function navigate(location: any, initialState: any);
147-
function navigate(location: any);
146+
function navigate(location: any, initialState: any): WinJS.Promise<boolean>;
147+
function navigate(location: any): WinJS.Promise<boolean>;
148148
function removeEventListener(type: string, listener: EventListener, capture: boolean): void;
149149
var onbeforenavigate: CustomEvent;
150150
var onnavigated: CustomEvent;
@@ -280,7 +280,7 @@ declare module WinJS {
280280
var DOMEventMixin: any;
281281

282282
class Flyout {
283-
constructor(element: HTMLElement, options);
283+
constructor(element: HTMLElement, options: any);
284284
element: Element;
285285
}
286286

@@ -298,24 +298,24 @@ declare module WinJS {
298298

299299
interface ISelection {
300300
clear(): WinJS.Promise<void>;
301-
count();
301+
count(): number;
302302
getItems(): WinJS.Promise<IItem[]>;
303303
}
304304

305305
class ListView {
306306
element: Element;
307-
elementFromIndex(index: number);
308-
indexOfElement(element: Element);
307+
elementFromIndex(index: number): Element;
308+
indexOfElement(element: Element): number;
309309
selection: ISelection;
310310
}
311311

312312
class Menu {
313-
constructor(element: HTMLElement, options);
313+
constructor(element: HTMLElement, options: any);
314314
element: Element;
315315
}
316316

317317
export class MenuCommand {
318-
constructor(element: HTMLElement, options);
318+
constructor(element: HTMLElement, options: any);
319319
}
320320

321321
export class SettingsFlyout {

winrt/winrt.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ declare module Windows {
502502
then<U>(success?: () => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise<U>;
503503
done? <U>(success?: () => any, error?: (error: any) => any, progress?: (progress: any) => void): void;
504504

505-
cancel();
505+
cancel(): void;
506506

507507
completed: Windows.Foundation.AsyncActionCompletedHandler;
508508
getResults(): void;

0 commit comments

Comments
 (0)