DefinitelyTyped/qrcode/qrcode-tests.ts
Andy d2150a603f Even more 2.0 (#12503)
* Always use forceConsistentCasingInFileNames

* Rename files

* Convert more packages to `types-2.0` style
2016-11-05 13:34:11 -07:00

15 lines
398 B
TypeScript

import * as QRCode from 'qrcode';
QRCode.toDataURL('i am a pony!', function (err, url) {
console.log(url);
});
var qrcodedraw = new QRCodeLib.QRCodeDraw();
qrcodedraw.draw(document.getElementById('test') as HTMLCanvasElement, "this text will be in the code!", function (error, canvas) {
if (error) {
return console.log('Error =( ', error);
}
console.log('success!');
});