Installation
npm install --save @types/js-captcha
Summary
This package contains type definitions for js-captcha (https://github.com/robiveli/js-captcha).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-captcha.
index.d.ts
declare namespace jCaptcha {
/**
* Options for the base jCaptcha class. Derived from https://github.com/robiveli/js-captcha#options
*/
interface Options {
el?: string | undefined;
requiredValue?: string | undefined;
resetOnError?: boolean | undefined;
focusOnError?: boolean | undefined;
clearOnSubmit?: boolean | undefined;
canvasClass?: string | undefined;
canvasStyle: {
width?: number | undefined;
height?: number | undefined;
font?: string | undefined;
fillStyle?: string | undefined;
textAlign?: string | undefined;
textBaseline?: string | undefined;
};
callback?: ((response: "success" | "error", captcha: Element, numberOfTries: number) => void) | undefined;
}
}
declare class jCaptcha {
constructor(options?: jCaptcha.Options);
validate(): void;
reset(): void;
}
export as namespace jCaptcha;
export = jCaptcha;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by PikachuEXE.