Just to illustrate what I think Steve already said, if you download d.ts from DefinitelyTyped and open the file, you will see the Validator interface (among other definitions). It can simply be expanded:
interface Validator { format(template: string, ...arguments: string[]): string; form(): bool; element(element: any): bool; resetForm(): void; showErrors(errors: any): void; numberOfInvalids(): number; setDefaults(defaults: ValidationOptions): void; addMethod(name: string, method: (value: any, element: any, ...params: any[]) => any, message?: any): void; addClassRules(rules: any): void; addClassRules(name: string, rules: any): void;
The rest of the work of extending the JQuery and JQueryStatic already done for you, elsewhere in the file. You won't get any typed kindness in an unobtrusive element, but at least the rest of the Validator code will be type checked.
source share