@types/js-captcha
TypeScript icon, indicating that this package has built-in type declarations

1.3.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/js-captcha

Weekly Downloads

23

Version

1.3.3

License

MIT

Unpacked Size

4.56 kB

Total Files

5

Last publish

Collaborators

  • types