Files
DefinitelyTyped/types/qr-image/qr-image-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

8 lines
232 B
TypeScript

import * as qr from 'qr-image';
import * as fs from 'fs';
const qr_svg = qr.image('I love QR!', { type: 'svg' });
qr_svg.pipe(fs.createWriteStream('i_love_qr.svg'));
const svg_string = qr.imageSync('I love QR!', { type: 'svg' });