Socket
Socket
Sign inDemoInstall

@types/qrcode

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/qrcode - npm Package Compare versions

Comparing version 0.8.1 to 1.2.0

60

qrcode/index.d.ts

@@ -1,4 +0,4 @@

// Type definitions for qrcode 0.8.2
// Type definitions for qrcode 1.2
// Project: https://github.com/soldair/node-qrcode
// Definitions by: York Yao <https://github.com/plantain-00/>
// Definitions by: York Yao <https://github.com/plantain-00>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -25,3 +25,3 @@

*/
toSJISFunc?: Function;
toSJISFunc?: (codePoint: string) => number;
}

@@ -44,3 +44,3 @@

export interface QRCodeToStringOptions extends QRCodeOptions {
export interface QRCodeToStringOptions extends QRCodeRenderersOptions {
/**

@@ -135,6 +135,2 @@ * Output format.

*/
export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[]): Promise<any>;
/**
* Draws qr code symbol to canvas.
*/
export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], callback: (error: Error) => void): void;

@@ -144,3 +140,3 @@ /**

*/
export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options: QRCodeOptions): Promise<any>;
export function toCanvas(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options?: QRCodeOptions): Promise<any>;
/**

@@ -153,6 +149,2 @@ * Draws qr code symbol to canvas.

*/
export function toCanvas(text: string | QRCodeSegment[]): Promise<any>;
/**
* Draws qr code symbol to canvas.
*/
export function toCanvas(text: string | QRCodeSegment[], callback: (error: Error, canvas: HTMLCanvasElement) => void): void;

@@ -162,3 +154,3 @@ /**

*/
export function toCanvas(text: string | QRCodeSegment[], options: QRCodeOptions): Promise<any>;
export function toCanvas(text: string | QRCodeSegment[], options?: QRCodeOptions): Promise<any>;
/**

@@ -171,6 +163,2 @@ * Draws qr code symbol to canvas.

*/
export function toCanvas(canvas: any, text: string | QRCodeSegment[]): Promise<any>;
/**
* Draws qr code symbol to node canvas.
*/
export function toCanvas(canvas: any, text: string | QRCodeSegment[], callback: (error: Error) => void): void;

@@ -180,3 +168,3 @@ /**

*/
export function toCanvas(canvas: any, text: string | QRCodeSegment[], options: QRCodeOptions): Promise<any>;
export function toCanvas(canvas: any, text: string | QRCodeSegment[], options?: QRCodeOptions): Promise<any>;
/**

@@ -190,6 +178,2 @@ * Draws qr code symbol to node canvas.

*/
export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[]): Promise<any>;
/**
* Returns a Data URI containing a representation of the QR Code image.
*/
export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], callback: (error: Error, url: string) => void): void;

@@ -199,3 +183,3 @@ /**

*/
export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options: QRCodeToDataURLOptions): Promise<any>;
export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options?: QRCodeToDataURLOptions): Promise<any>;
/**

@@ -205,9 +189,6 @@ * Returns a Data URI containing a representation of the QR Code image.

export function toDataURL(canvasElement: HTMLCanvasElement, text: string | QRCodeSegment[], options: QRCodeToDataURLOptions, callback: (error: Error, url: string) => void): void;
/**
* Returns a Data URI containing a representation of the QR Code image.
*/
export function toDataURL(text: string | QRCodeSegment[]): Promise<any>;
/**
* Returns a Data URI containing a representation of the QR Code image.
*/
export function toDataURL(text: string | QRCodeSegment[], callback: (error: Error, url: string) => void): void;

@@ -217,3 +198,3 @@ /**

*/
export function toDataURL(text: string | QRCodeSegment[], options: QRCodeToDataURLOptions): Promise<any>;
export function toDataURL(text: string | QRCodeSegment[], options?: QRCodeToDataURLOptions): Promise<any>;
/**

@@ -228,7 +209,2 @@ * Returns a Data URI containing a representation of the QR Code image.

*/
export function toString(text: string | QRCodeSegment[]): Promise<any>;
/**
* Returns a string representation of the QR Code.
* If choosen output format is svg it will returns a string containing xml code.
*/
export function toString(text: string | QRCodeSegment[], callback: (error: Error, string: string) => void): void;

@@ -239,3 +215,3 @@ /**

*/
export function toString(text: string | QRCodeSegment[], options: QRCodeToStringOptions): Promise<any>;
export function toString(text: string | QRCodeSegment[], options?: QRCodeToStringOptions): Promise<any>;
/**

@@ -252,8 +228,2 @@ * Returns a string representation of the QR Code.

*/
export function toFile(path: string, text: string | QRCodeSegment[]): Promise<any>;
/**
* Saves QR Code to image file.
* If options.type is not specified, the format will be guessed from file extension.
* Recognized extensions are png, svg, txt.
*/
export function toFile(path: string, text: string | QRCodeSegment[], callback: (error: Error) => void): void;

@@ -265,3 +235,3 @@ /**

*/
export function toFile(path: string, text: string | QRCodeSegment[], options: QRCodeToFileOptions): Promise<any>;
export function toFile(path: string, text: string | QRCodeSegment[], options?: QRCodeToFileOptions): Promise<any>;
/**

@@ -277,6 +247,2 @@ * Saves QR Code to image file.

*/
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[]): Promise<any>;
/**
* Writes QR Code image to stream. Only works with png format for now.
*/
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], callback: (error: Error) => void): void;

@@ -286,3 +252,3 @@ /**

*/
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], options: QRCodeOptions): Promise<any>;
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], options?: QRCodeOptions): Promise<any>;
/**

@@ -289,0 +255,0 @@ * Writes QR Code image to stream. Only works with png format for now.

{
"name": "@types/qrcode",
"version": "0.8.1",
"version": "1.2.0",
"description": "TypeScript definitions for qrcode",

@@ -9,3 +9,4 @@ "license": "MIT",

"name": "York Yao",
"url": "https://github.com/plantain-00/"
"url": "https://github.com/plantain-00",
"githubUsername": "plantain-00"
}

@@ -16,3 +17,3 @@ ],

"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},

@@ -23,4 +24,4 @@ "scripts": {},

},
"typesPublisherContentHash": "b4ccf41988bd6c44b2027b62842d8f7b22731b46b653de810b270e003f19bf9b",
"typesPublisherContentHash": "18b95e58cea20627e32e92fd0b579e0625cf360da7f8f363a2808d6f190348fd",
"typeScriptVersion": "2.0"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qrcode
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/qrcode
Additional Details
* Last updated: Wed, 31 Jan 2018 21:25:50 GMT
* Last updated: Mon, 11 Jun 2018 20:24:44 GMT
* Dependencies: stream, node

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by York Yao <https://github.com/plantain-00/>.
These definitions were written by York Yao <https://github.com/plantain-00>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc