Skip to content

Commit 798dbfb

Browse files
committed
Converting ungeneric "Array" to "any[]"
TypeScript 0.9.5 beta does not allow generic type references without the type argument. This code will still compile for 0.9.1 users. Flight and Ember have further compile problems in 0.9.5 that I don't feel qualified to address as I'm not versed in those libraries.
1 parent 6321375 commit 798dbfb

File tree

26 files changed

+85
-85
lines changed

26 files changed

+85
-85
lines changed

ace/ace.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ declare module AceAjax {
624624
* Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
625625
* @param rows An array of row indices
626626
**/
627-
setBreakpoints(rows: Array);
627+
setBreakpoints(rows: any[]);
628628

629629
/**
630630
* Removes all breakpoints on the rows. This function also emites the `'changeBreakpoint'` event.
@@ -679,7 +679,7 @@ declare module AceAjax {
679679
* Returns an array containing the IDs of all the markers, either front or back.
680680
* @param inFront If `true`, indicates you only want front markers; `false` indicates only back markers
681681
**/
682-
getMarkers(inFront: boolean): Array;
682+
getMarkers(inFront: boolean): any[];
683683

684684
/**
685685
* Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event.
@@ -823,14 +823,14 @@ declare module AceAjax {
823823
* @param deltas An array of previous changes
824824
* @param dontSelect [If `true`, doesn't select the range of where the change occured]{: #dontSelect}
825825
**/
826-
undoChanges(deltas: Array, dontSelect: boolean): Range;
826+
undoChanges(deltas: any[], dontSelect: boolean): Range;
827827

828828
/**
829829
* Re-implements a previously undone change to your document.
830830
* @param deltas An array of previous changes
831831
* @param dontSelect {:dontSelect}
832832
**/
833-
redoChanges(deltas: Array, dontSelect: boolean): Range;
833+
redoChanges(deltas: any[], dontSelect: boolean): Range;
834834

835835
/**
836836
* Enables or disables highlighting of the range where an undo occured.
@@ -2778,7 +2778,7 @@ declare module AceAjax {
27782778
* Sets annotations for the gutter.
27792779
* @param annotations An array containing annotations
27802780
**/
2781-
setAnnotations(annotations: Array);
2781+
setAnnotations(annotations: any[]);
27822782

27832783
/**
27842784
* Updates the cursor icon.

breeze/breeze-tests.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,9 @@ function test_corefns() {
819819
f1 = core.propEq("name", "Joe");
820820
f1 = core.pluck("name");
821821

822-
var a1: Array;
823-
var a2: Array;
824-
var a3: Array;
822+
var a1: any[];
823+
var a2: any[];
824+
var a3: any[];
825825
var b: boolean;
826826
var n: number;
827827

breeze/breeze.d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ declare module breeze.core {
6262
export function extend(target: Object, source: Object): Object;
6363
export function propEq(propertyName: string, value: any): (obj: Object) => boolean;
6464
export function pluck(propertyName: string): (obj: Object) => any;
65-
export function arrayEquals(a1:Array, a2:Array, equalsFn: (e1:any, e2:any) => boolean): boolean;
66-
export function arrayFirst(a1:Array, predicate: (e:any) => boolean): any;
67-
export function arrayIndexOf(a1: Array, predicate: (e: any) => boolean): number;
68-
export function arrayRemoveItem(array: Array, item: any, shouldRemoveMultiple: boolean): any;
69-
export function arrayRemoveItem(array: Array, predicate: (e: any) => boolean, shouldRemoveMultiple: boolean): any;
70-
export function arrayZip(a1: Array, a2: Array, callback: (e1:any, e2:any) => any): Array;
65+
export function arrayEquals(a1: any[], a2: any[], equalsFn: (e1:any, e2:any) => boolean): boolean;
66+
export function arrayFirst(a1: any[], predicate: (e:any) => boolean): any;
67+
export function arrayIndexOf(a1: any[], predicate: (e: any) => boolean): number;
68+
export function arrayRemoveItem(array: any[], item: any, shouldRemoveMultiple: boolean): any;
69+
export function arrayRemoveItem(array: any[], predicate: (e: any) => boolean, shouldRemoveMultiple: boolean): any;
70+
export function arrayZip(a1: any[], a2: any[], callback: (e1:any, e2:any) => any): any[];
7171

7272
export function requireLib(libnames: string, errMessage: string): Object;
7373
export function using(obj: Object, property: string, tempValue: any, fn: () => any): any;

casperjs/casperjs.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ interface ElementInfo {
138138
}
139139

140140
interface CasperOptions {
141-
clientScripts?: Array;
141+
clientScripts?: any[];
142142
exitOnError?: boolean;
143143
httpStatusHandlers?: any;
144144
logLevel?: string;
@@ -155,7 +155,7 @@ interface CasperOptions {
155155
onWaitTimeout?: Function;
156156
page?: WebPage;
157157
pageSettings?: any;
158-
remoteScripts?: Array;
158+
remoteScripts?: any[];
159159
safeLogs?: boolean;
160160
stepTimeout?: number;
161161
timeout?: number;
@@ -205,7 +205,7 @@ interface Tester {
205205
assertNot(subject: any, message?: string): any;
206206
assertNotEquals(testValue: any, expected: any, message?: string): any;
207207
assertNotVisible(selector: string, message?: string): any;
208-
assertRaises(fn: Function, args: Array, message?: string): any;
208+
assertRaises(fn: Function, args: any[], message?: string): any;
209209
assertSelectorDoesntHaveText(selector: string, text: string, message?: string): any;
210210
assertSelectorExists(selector: string, message?: string): any;
211211
assertSelectorHasText(selector: string, text: string, message?: string): any;
@@ -283,5 +283,5 @@ interface Utils {
283283
mergeObjects(origin: any, add: any): any;
284284
node(name: string, attributes: any): any;
285285
serialize(value: any): any;
286-
unique(array: Array): any;
286+
unique(array: any[]): any;
287287
}

chai/chai.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ declare module chai {
146146

147147
interface Keys {
148148
(...keys: string[]): Expect;
149-
(keys: Array): Expect;
149+
(keys: any[]): Expect;
150150
}
151151

152152
interface Members {
153-
(set: Array, message?: string): Expect;
153+
(set: any[], message?: string): Expect;
154154
}
155155

156156
interface Throw {

express/express.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ declare module "express" {
230230
*
231231
* @param size
232232
*/
233-
range(size: number): Array;
233+
range(size: number): any[];
234234

235235
/**
236236
* Return an array of Accepted media types
@@ -247,7 +247,7 @@ declare module "express" {
247247
* type: 'text',
248248
* subtype: 'html' } ]
249249
*/
250-
accepted: Array;
250+
accepted: any[];
251251

252252
/**
253253
* Return an array of Accepted languages
@@ -258,7 +258,7 @@ declare module "express" {
258258
* Accept-Language: en;q=.5, en-us
259259
* ['en-us', 'en']
260260
*/
261-
acceptedLanguages: Array;
261+
acceptedLanguages: any[];
262262

263263
/**
264264
* Return an array of Accepted charsets
@@ -269,7 +269,7 @@ declare module "express" {
269269
* Accept-Charset: iso-8859-5;q=.2, unicode-1-1;q=0.8
270270
* ['unicode-1-1', 'iso-8859-5']
271271
*/
272-
acceptedCharsets: Array;
272+
acceptedCharsets: any[];
273273

274274
/**
275275
* Return the value of param `name` when present or `defaultValue`.
@@ -884,7 +884,7 @@ declare module "express" {
884884
*/
885885
param(name: string, fn: Function): Application;
886886

887-
param(name: Array, fn: Function): Application;
887+
param(name: any[], fn: Function): Application;
888888

889889
/**
890890
* Assign `setting` to `val`, or return `setting`'s value.

flight/flight.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ declare module Flight {
218218
merge(obj1: Object, obj2: Object, ...args: any[]): Object;
219219
push(base: Object, extra: Object, protect?: boolean): void;
220220
throttle(func: Function, wait: number): Function;
221-
toArray(obj: Object, from?: number): Array;
222-
uniqueArray(array: Array): Array;
221+
toArray(obj: Object, from?: number): any[];
222+
uniqueArray(array: any[]): any[];
223223
}
224224

225225
export interface EventData {

goJS/goJS.d.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,7 @@ declare module go {
21022102
defaultAlignment: Spot;
21032103

21042104
/**Gets or sets the default dash array for a particular column's separator.*/
2105-
defaultColumnSeparatorDashArray: Array;
2105+
defaultColumnSeparatorDashArray: any[];
21062106

21072107
/**Gets or sets the default Brush stroke (or CSS color string) for columns in a Table Panel provided a given column has a nonzero RowColumnDefinition#separatorStrokeWidth.*/
21082108
defaultColumnSeparatorStroke: any;
@@ -2111,7 +2111,7 @@ declare module go {
21112111
defaultColumnSeparatorStrokeWidth: number;
21122112

21132113
/**Gets or sets the default dash array for a particular row's separator.*/
2114-
defaultRowSeparatorDashArray: Array;
2114+
defaultRowSeparatorDashArray: any[];
21152115

21162116
/**Gets or sets the default Brush stroke (or CSS color string) for rows in a Table Panel provided a given row has a nonzero RowColumnDefinition#separatorStrokeWidth.*/
21172117
defaultRowSeparatorStroke: any;
@@ -2135,7 +2135,7 @@ declare module go {
21352135
gridOrigin: Point;
21362136

21372137
/**Gets or sets a JavaScript Array of values or objects, each of which will be represented by a Panel as elements in this Panel.*/
2138-
itemArray: Array;
2138+
itemArray: any[];
21392139

21402140
/**Gets or sets the name of the item data property that returns a string describing that data's category, or a function that takes an item data object and returns that string; the default value is the name 'category'.*/
21412141
itemCategoryProperty: any;
@@ -2690,7 +2690,7 @@ declare module go {
26902690
position: number;
26912691

26922692
/**Gets or sets the dash array for dashing the spacing provided this row or column has a nonzero RowColumnDefinition#separatorStrokeWidth and non-null RowColumnDefinition#separatorStroke.*/
2693-
separatorDashArray: Array;
2693+
separatorDashArray: any[];
26942694

26952695
/**Gets or sets the additional padding for a particular row or column, a Margin (or number for a uniform Margin).*/
26962696
separatorPadding: any;
@@ -2787,7 +2787,7 @@ declare module go {
27872787
strokeCap: string;
27882788

27892789
/**Gets or sets the dash array for creating dashed lines.*/
2790-
strokeDashArray: Array;
2790+
strokeDashArray: any[];
27912791

27922792
/**Gets or sets the offset for dashed lines, used in the phase pattern.*/
27932793
strokeDashOffset: number;
@@ -4547,7 +4547,7 @@ declare module go {
45474547
* @param {Array} arr an Array that is the value of some Panel's Panel#itemArray.
45484548
* @param {*} val the new value to be pushed onto the array.
45494549
*/
4550-
addArrayItem(arr: Array, val: any);
4550+
addArrayItem(arr: any[], val: any);
45514551

45524552
/**
45534553
* Register an event handler that is called when there is a ChangedEvent.
@@ -4633,7 +4633,7 @@ declare module go {
46334633
* @param {number} idx the zero-based array index where the new value will be inserted; use -1 to push the new value on the end of the array.
46344634
* @param {*} val the new value to be inserted into the array.
46354635
*/
4636-
insertArrayItem(arr: Array, idx: number, val: any);
4636+
insertArrayItem(arr: any[], idx: number, val: any);
46374637

46384638
/**
46394639
* This method is called when a node data object is added to the model to make sure that
@@ -4689,7 +4689,7 @@ declare module go {
46894689
* @param {number=} idx the zero-based array index of the data item to be removed from the array;
46904690
* if not supplied it will remove the last item of the array.
46914691
*/
4692-
removeArrayItem(arr: Array, idx?: number);
4692+
removeArrayItem(arr: any[], idx?: number);
46934693

46944694
/**
46954695
* Unregister an event handler listener.
@@ -6283,7 +6283,7 @@ declare module go {
62836283
childPortSpot: Spot;
62846284

62856285
/**Gets or sets the logical children for this node.*/
6286-
children: Array;
6286+
children: any[];
62876287

62886288
/**Gets the number of immediate children this node has.*/
62896289
childrenCount: number;
@@ -6292,7 +6292,7 @@ declare module go {
62926292
commentMargin: number;
62936293

62946294
/**Gets or sets an array of Nodes that will be positioned near this node.*/
6295-
comments: Array;
6295+
comments: any[];
62966296

62976297
/**Gets or sets the space to leave between consecutive comments.*/
62986298
commentSpacing: number;
@@ -7924,7 +7924,7 @@ declare module go {
79247924
/**
79257925
* Produces a JavaScript Array from the contents of this List.
79267926
*/
7927-
toArray(): Array;
7927+
toArray(): any[];
79287928

79297929
/**
79307930
* Converts the List to a Set.
@@ -8013,7 +8013,7 @@ declare module go {
80138013
/**
80148014
* Produces a JavaScript Array of key/value pair objects from the contents of this Map.
80158015
*/
8016-
toArray(): Array;
8016+
toArray(): any[];
80178017

80188018
/**
80198019
* Produces a Set that provides a read-only view onto the keys of this Map.
@@ -8109,7 +8109,7 @@ declare module go {
81098109
/**
81108110
* Produces a JavaScript Array from the contents of this Set.
81118111
*/
8112-
toArray(): Array;
8112+
toArray(): any[];
81138113

81148114
/**
81158115
* Converts the Set to a List.

highcharts/highcharts.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ interface HighchartsStatic {
10581058
setOptions(options: HighchartsOptions): HighchartsOptions;
10591059
getOptions(): HighchartsOptions;
10601060

1061-
map(array: Array, any): Array;
1061+
map(array: any[], any): any[];
10621062
}
10631063
declare var Highcharts: HighchartsStatic;
10641064

humane/humane.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface Humane {
3333
log(message: string, options: HumaneOptions): Humane;
3434
log(message: string, callback: Function, options: HumaneOptions): Humane;
3535

36-
log(listOfMessages: Array): Humane;
36+
log(listOfMessages: any[]): Humane;
3737
}
3838

3939
declare var humane: Humane;

jquery.noty/jquery.noty.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface NotyOptions {
1616
timeout?: number;
1717
force?: boolean;
1818
modal?: boolean;
19-
closeWith?: Array;
19+
closeWith?: any[];
2020
callback?: NotyCallbackOptions;
2121
buttons?: any;
2222
}

knockout.deferred.updates/knockout.deferred.updates.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/// <reference path="../knockout/knockout.d.ts" />
77

88
interface KnockoutDeferredTasks {
9-
processImmediate(evaluator: Function, object?: any, args?: Array): any;
10-
processDelayed(evaluator: Function, distinct?: boolean, options?: Array): boolean;
9+
processImmediate(evaluator: Function, object?: any, args?: any[]): any;
10+
processDelayed(evaluator: Function, distinct?: boolean, options?: any[]): boolean;
1111
makeProcessedCallback(evaluator: Function): void;
1212
}
1313

@@ -17,7 +17,7 @@ interface KnockoutStatic {
1717
processAllDeferredBindingUpdates(): void;
1818
processAllDeferredUpdates(): void;
1919
evaluateAsynchronously(evaluator: Function, timeout?: any): number;
20-
ignoreDependencies(callback: Function, callbackTarget: any, callbackArgs?: Array);
20+
ignoreDependencies(callback: Function, callbackTarget: any, callbackArgs?: any[]);
2121
}
2222

2323
// Observables

knockout/knockout.amd.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ declare module 'knockout' {
7777
export function renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
7878
export function renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
7979
export function renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
80-
export function renderTemplateForEach(template: Function, arrayOrObservableArray: Array, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
81-
export function renderTemplateForEach(template: any, arrayOrObservableArray: Array, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
82-
export function renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable<Array>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
83-
export function renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable < Array>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
80+
export function renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
81+
export function renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
82+
export function renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable<any[]>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
83+
export function renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable <any[]>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
8484
export var expressionRewriting: {
8585
bindingRewriteValidators: any;
8686
};

0 commit comments

Comments
 (0)