Skip to content

Commit

Permalink
Changed type of "data" to { [key: string]: any; }
Browse files Browse the repository at this point in the history
Changed the type of the data property on the IFieldGroup, ITypeOptions, IFormOptionsAPI, and IFieldConfigurationObject interfaces from "Object" to a hash of string to any. While Object was not incorrect, it made use without a cast a type error in all but the most trivial cases.
  • Loading branch information
aluanhaddad committed Feb 24, 2016
1 parent dade441 commit 3dc2ce1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions angular-formly/angular-formly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ declare module AngularFormly {
}

interface IFieldGroup {
data?: Object;
data?: {
[key: string]: any;
};
className?: string;
elementAttributes?: string;
fieldGroup?: IFieldArray;
Expand All @@ -37,7 +39,9 @@ declare module AngularFormly {


interface IFormOptionsAPI {
data?: Object;
data?: {
[key: string]: any;
};
fieldTransform?: Function;
formState?: Object;
removeChromeAutoComplete?: boolean;
Expand Down Expand Up @@ -177,7 +181,9 @@ declare module AngularFormly {
*
* see http://docs.angular-formly.com/docs/field-configuration-object#data-object
*/
data?: Object;
data?: {
[key: string]: any;
};


/**
Expand Down Expand Up @@ -536,7 +542,9 @@ declare module AngularFormly {
apiCheckOptions?: Object;
defaultOptions?: IFieldConfigurationObject | Function;
controller?: Function | string | any[];
data?: Object;
data?: {
[key: string]: any;
};
extends?: string;
link?: ng.IDirectiveLinkFn;
overwriteOk?: boolean;
Expand Down

0 comments on commit 3dc2ce1

Please sign in to comment.