Skip to content

Commit

Permalink
Converting ungeneric "Array" to "any[]"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pushplay committed Nov 26, 2013
1 parent 6321375 commit 798dbfb
Show file tree
Hide file tree
Showing 26 changed files with 85 additions and 85 deletions.
10 changes: 5 additions & 5 deletions ace/ace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ declare module AceAjax {
* Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
* @param rows An array of row indices
**/
setBreakpoints(rows: Array);
setBreakpoints(rows: any[]);

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

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

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

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

/**
* Updates the cursor icon.
Expand Down
6 changes: 3 additions & 3 deletions breeze/breeze-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,9 @@ function test_corefns() {
f1 = core.propEq("name", "Joe");
f1 = core.pluck("name");

var a1: Array;
var a2: Array;
var a3: Array;
var a1: any[];
var a2: any[];
var a3: any[];
var b: boolean;
var n: number;

Expand Down
12 changes: 6 additions & 6 deletions breeze/breeze.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ declare module breeze.core {
export function extend(target: Object, source: Object): Object;
export function propEq(propertyName: string, value: any): (obj: Object) => boolean;
export function pluck(propertyName: string): (obj: Object) => any;
export function arrayEquals(a1:Array, a2:Array, equalsFn: (e1:any, e2:any) => boolean): boolean;
export function arrayFirst(a1:Array, predicate: (e:any) => boolean): any;
export function arrayIndexOf(a1: Array, predicate: (e: any) => boolean): number;
export function arrayRemoveItem(array: Array, item: any, shouldRemoveMultiple: boolean): any;
export function arrayRemoveItem(array: Array, predicate: (e: any) => boolean, shouldRemoveMultiple: boolean): any;
export function arrayZip(a1: Array, a2: Array, callback: (e1:any, e2:any) => any): Array;
export function arrayEquals(a1: any[], a2: any[], equalsFn: (e1:any, e2:any) => boolean): boolean;
export function arrayFirst(a1: any[], predicate: (e:any) => boolean): any;
export function arrayIndexOf(a1: any[], predicate: (e: any) => boolean): number;
export function arrayRemoveItem(array: any[], item: any, shouldRemoveMultiple: boolean): any;
export function arrayRemoveItem(array: any[], predicate: (e: any) => boolean, shouldRemoveMultiple: boolean): any;
export function arrayZip(a1: any[], a2: any[], callback: (e1:any, e2:any) => any): any[];

export function requireLib(libnames: string, errMessage: string): Object;
export function using(obj: Object, property: string, tempValue: any, fn: () => any): any;
Expand Down
8 changes: 4 additions & 4 deletions casperjs/casperjs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ interface ElementInfo {
}

interface CasperOptions {
clientScripts?: Array;
clientScripts?: any[];
exitOnError?: boolean;
httpStatusHandlers?: any;
logLevel?: string;
Expand All @@ -155,7 +155,7 @@ interface CasperOptions {
onWaitTimeout?: Function;
page?: WebPage;
pageSettings?: any;
remoteScripts?: Array;
remoteScripts?: any[];
safeLogs?: boolean;
stepTimeout?: number;
timeout?: number;
Expand Down Expand Up @@ -205,7 +205,7 @@ interface Tester {
assertNot(subject: any, message?: string): any;
assertNotEquals(testValue: any, expected: any, message?: string): any;
assertNotVisible(selector: string, message?: string): any;
assertRaises(fn: Function, args: Array, message?: string): any;
assertRaises(fn: Function, args: any[], message?: string): any;
assertSelectorDoesntHaveText(selector: string, text: string, message?: string): any;
assertSelectorExists(selector: string, message?: string): any;
assertSelectorHasText(selector: string, text: string, message?: string): any;
Expand Down Expand Up @@ -283,5 +283,5 @@ interface Utils {
mergeObjects(origin: any, add: any): any;
node(name: string, attributes: any): any;
serialize(value: any): any;
unique(array: Array): any;
unique(array: any[]): any;
}
4 changes: 2 additions & 2 deletions chai/chai.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ declare module chai {

interface Keys {
(...keys: string[]): Expect;
(keys: Array): Expect;
(keys: any[]): Expect;
}

interface Members {
(set: Array, message?: string): Expect;
(set: any[], message?: string): Expect;
}

interface Throw {
Expand Down
10 changes: 5 additions & 5 deletions express/express.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ declare module "express" {
*
* @param size
*/
range(size: number): Array;
range(size: number): any[];

/**
* Return an array of Accepted media types
Expand All @@ -247,7 +247,7 @@ declare module "express" {
* type: 'text',
* subtype: 'html' } ]
*/
accepted: Array;
accepted: any[];

/**
* Return an array of Accepted languages
Expand All @@ -258,7 +258,7 @@ declare module "express" {
* Accept-Language: en;q=.5, en-us
* ['en-us', 'en']
*/
acceptedLanguages: Array;
acceptedLanguages: any[];

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

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

param(name: Array, fn: Function): Application;
param(name: any[], fn: Function): Application;

/**
* Assign `setting` to `val`, or return `setting`'s value.
Expand Down
4 changes: 2 additions & 2 deletions flight/flight.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ declare module Flight {
merge(obj1: Object, obj2: Object, ...args: any[]): Object;
push(base: Object, extra: Object, protect?: boolean): void;
throttle(func: Function, wait: number): Function;
toArray(obj: Object, from?: number): Array;
uniqueArray(array: Array): Array;
toArray(obj: Object, from?: number): any[];
uniqueArray(array: any[]): any[];
}

export interface EventData {
Expand Down
26 changes: 13 additions & 13 deletions goJS/goJS.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2102,7 +2102,7 @@ declare module go {
defaultAlignment: Spot;

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

/**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.*/
defaultColumnSeparatorStroke: any;
Expand All @@ -2111,7 +2111,7 @@ declare module go {
defaultColumnSeparatorStrokeWidth: number;

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

/**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.*/
defaultRowSeparatorStroke: any;
Expand All @@ -2135,7 +2135,7 @@ declare module go {
gridOrigin: Point;

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

/**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'.*/
itemCategoryProperty: any;
Expand Down Expand Up @@ -2690,7 +2690,7 @@ declare module go {
position: number;

/**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.*/
separatorDashArray: Array;
separatorDashArray: any[];

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

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

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

/**
* Register an event handler that is called when there is a ChangedEvent.
Expand Down Expand Up @@ -4633,7 +4633,7 @@ declare module go {
* @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.
* @param {*} val the new value to be inserted into the array.
*/
insertArrayItem(arr: Array, idx: number, val: any);
insertArrayItem(arr: any[], idx: number, val: any);

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

/**
* Unregister an event handler listener.
Expand Down Expand Up @@ -6283,7 +6283,7 @@ declare module go {
childPortSpot: Spot;

/**Gets or sets the logical children for this node.*/
children: Array;
children: any[];

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

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

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

/**
* Converts the List to a Set.
Expand Down Expand Up @@ -8013,7 +8013,7 @@ declare module go {
/**
* Produces a JavaScript Array of key/value pair objects from the contents of this Map.
*/
toArray(): Array;
toArray(): any[];

/**
* Produces a Set that provides a read-only view onto the keys of this Map.
Expand Down Expand Up @@ -8109,7 +8109,7 @@ declare module go {
/**
* Produces a JavaScript Array from the contents of this Set.
*/
toArray(): Array;
toArray(): any[];

/**
* Converts the Set to a List.
Expand Down
2 changes: 1 addition & 1 deletion highcharts/highcharts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ interface HighchartsStatic {
setOptions(options: HighchartsOptions): HighchartsOptions;
getOptions(): HighchartsOptions;

map(array: Array, any): Array;
map(array: any[], any): any[];
}
declare var Highcharts: HighchartsStatic;

Expand Down
2 changes: 1 addition & 1 deletion humane/humane.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface Humane {
log(message: string, options: HumaneOptions): Humane;
log(message: string, callback: Function, options: HumaneOptions): Humane;

log(listOfMessages: Array): Humane;
log(listOfMessages: any[]): Humane;
}

declare var humane: Humane;
2 changes: 1 addition & 1 deletion jquery.noty/jquery.noty.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface NotyOptions {
timeout?: number;
force?: boolean;
modal?: boolean;
closeWith?: Array;
closeWith?: any[];
callback?: NotyCallbackOptions;
buttons?: any;
}
Expand Down
6 changes: 3 additions & 3 deletions knockout.deferred.updates/knockout.deferred.updates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/// <reference path="../knockout/knockout.d.ts" />

interface KnockoutDeferredTasks {
processImmediate(evaluator: Function, object?: any, args?: Array): any;
processDelayed(evaluator: Function, distinct?: boolean, options?: Array): boolean;
processImmediate(evaluator: Function, object?: any, args?: any[]): any;
processDelayed(evaluator: Function, distinct?: boolean, options?: any[]): boolean;
makeProcessedCallback(evaluator: Function): void;
}

Expand All @@ -17,7 +17,7 @@ interface KnockoutStatic {
processAllDeferredBindingUpdates(): void;
processAllDeferredUpdates(): void;
evaluateAsynchronously(evaluator: Function, timeout?: any): number;
ignoreDependencies(callback: Function, callbackTarget: any, callbackArgs?: Array);
ignoreDependencies(callback: Function, callbackTarget: any, callbackArgs?: any[]);
}

// Observables
Expand Down
8 changes: 4 additions & 4 deletions knockout/knockout.amd.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ declare module 'knockout' {
export function renderTemplate(template: any, dataOrBindingContext: KnockoutBindingContext, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
export function renderTemplate(template: Function, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
export function renderTemplate(template: any, dataOrBindingContext: any, options: Object, targetNodeOrNodeArray: Node[], renderMode: string): any;
export function renderTemplateForEach(template: Function, arrayOrObservableArray: Array, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export function renderTemplateForEach(template: any, arrayOrObservableArray: Array, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export function renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable<Array>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export function renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable < Array>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export function renderTemplateForEach(template: Function, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export function renderTemplateForEach(template: any, arrayOrObservableArray: any[], options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export function renderTemplateForEach(template: Function, arrayOrObservableArray: KnockoutObservable<any[]>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export function renderTemplateForEach(template: any, arrayOrObservableArray: KnockoutObservable <any[]>, options: Object, targetNode: Node, parentBindingContext: KnockoutBindingContext): any;
export var expressionRewriting: {
bindingRewriteValidators: any;
};
Expand Down
Loading

0 comments on commit 798dbfb

Please sign in to comment.