mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Always use forceConsistentCasingInFileNames * Rename files * Convert more packages to `types-2.0` style
15 lines
398 B
TypeScript
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!');
|
|
});
|