mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
addMethod params arguments vs array syntax
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.
This commit is contained in:
4
jquery.validation/jquery.validation.d.ts
vendored
4
jquery.validation/jquery.validation.d.ts
vendored
@@ -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;
|
||||
@@ -82,4 +82,4 @@ interface JQueryStatic
|
||||
{
|
||||
format(template: string, ...arguments: string[]): string;
|
||||
validator: Validator;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user