Skip to content

Commit

Permalink
addMethod params arguments vs array syntax
Browse files Browse the repository at this point in the history
jQUery Validation does not send arguments but an array of the argument already built. By using the ... syntax of TypeScript, we get an array with one item that has the array sent by jQuery validation. I think the definition should use an array instead of arguments syntax.
  • Loading branch information
lpperras committed Feb 24, 2014
1 parent 0243d56 commit 7fa3c07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.validation/jquery.validation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ interface Validator
{
addClassRules(name: string, rules: any): void;
addClassRules(rules: any): void;
addMethod(name: string, method: (value: any, element: any, ...params: any[]) => any, message?: any): void;
addMethod(name: string, method: (value: any, element: any, params: any[]) => any, message?: any): void;
element(element: any): boolean;
form(): boolean;
format(template: string, ...arguments: string[]): string;
Expand Down Expand Up @@ -82,4 +82,4 @@ interface JQueryStatic
{
format(template: string, ...arguments: string[]): string;
validator: Validator;
}
}

0 comments on commit 7fa3c07

Please sign in to comment.