DefinitelyTyped/types/ccap/index.d.ts
taoqf 45db0d6087 Add jweixin weixin-app ccap qr-image defination (#15801)
* add weixin-app

* add wx

* add new line at end of file

* tslint wx and wx-app

* fixed test error

* change project name weixin

* rename

* weixin-app Add param this

* change discription of jweixin

* add some Event declaration

* change tslint config
extends dtslint/dt.json

* add defination of ccap, qr-image

* remove redundant jsdoc

* remove doc

* allow overloads

* inline some types

* fix tslint error
2017-04-20 19:54:56 -07:00

27 lines
795 B
TypeScript

// Type definitions for ccap 0.6
// Project: https://github.com/DoubleSpout/ccap
// Definitions by: taoqf <https://github.com/taoqf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
interface Captcha {
get(): [string, Buffer];
}
interface Options {
width?: number; // set width,default is 256
height?: number; // set height,default is 60
offset?: number; // set text spacing,default is 40
quality?: number; // set pic quality,default is 50
fontsize?: number; // set font size,default is 57
// Custom the function to generate captcha text
generate?(): string;
}
declare function ccap(width: number, height: number, offset: number): Captcha;
declare function ccap(options?: Options): Captcha;
declare namespace ccap { }
export = ccap;