Files
DefinitelyTyped/types/ccap/ccap-tests.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

22 lines
550 B
TypeScript

import * as ccap from 'ccap';
const captcha1 = ccap();
const width = 0;
const height = 0;
const offset = 0;
const captcha2 = ccap(width, height, offset);
const captcha3 = ccap({
width: 256, // set width,default is 256
height: 60, // set height,default is 60
offset: 40, // set text spacing,default is 40
quality: 100, // set pic quality,default is 50
fontsize: 57, // set font size,default is 57
// Custom the function to generate captcha text
generate() {
// generate captcha text here
return 'text'; // return the captcha text
}
});