Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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 1.3.2 to 1.3.3

40

qrcode/index.d.ts
// Type definitions for qrcode 1.3
// Project: http://github.com/soldair/node-qrcode
// Definitions by: York Yao <https://github.com/plantain-00>
// Michael Nahkies <https://github.com/mnahkies>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -10,2 +11,4 @@

export type QRCodeErrorCorrectionLevel = "low" | "medium" | "quartile" | "high" | "L" | "M" | "Q" | "H";
export interface QRCodeOptions {

@@ -21,3 +24,3 @@ /**

*/
errorCorrectionLevel?: "low" | "medium" | "quartile" | "high" | "L" | "M" | "Q" | "H";
errorCorrectionLevel?: QRCodeErrorCorrectionLevel;
/**

@@ -73,2 +76,21 @@ * Helper function used internally to convert a kanji to its Shift JIS value.

export interface QRCodeToFileStreamOptions extends QRCodeRenderersOptions {
/**
* Output format. Only png supported for file stream
*/
type?: "png";
rendererOpts?: {
/**
* Compression level for deflate.
* Default: 9
*/
deflateLevel?: number;
/**
* Compression strategy for deflate.
* Default: 3
*/
deflateStrategy?: number;
};
}
export interface QRCodeRenderersOptions extends QRCodeOptions {

@@ -146,7 +168,7 @@ /**

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

@@ -159,7 +181,7 @@ * Draws qr code symbol to canvas.

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

@@ -172,7 +194,7 @@ * Draws qr code symbol to node canvas.

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

@@ -247,6 +269,6 @@ /**

*/
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], options?: QRCodeOptions): Promise<any>;
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], options?: QRCodeToFileStreamOptions): Promise<any>;
/**
* Writes QR Code image to stream. Only works with png format for now.
*/
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], options: QRCodeOptions, callback: (error: Error) => void): void;
export function toFileStream(stream: stream.Writable, text: string | QRCodeSegment[], options: QRCodeToFileStreamOptions, callback: (error: Error) => void): void;
{
"name": "@types/qrcode",
"version": "1.3.2",
"version": "1.3.3",
"description": "TypeScript definitions for qrcode",

@@ -11,2 +11,7 @@ "license": "MIT",

"githubUsername": "plantain-00"
},
{
"name": "Michael Nahkies",
"url": "https://github.com/mnahkies",
"githubUsername": "mnahkies"
}

@@ -25,4 +30,4 @@ ],

},
"typesPublisherContentHash": "309cedb77a4e2ef9a340a0fd97e0cdd0350be422dda086d26bdcd28d04630902",
"typesPublisherContentHash": "ece54995aca52d0dc6a97b3e9fd47b882eaf899d8766c0a29e84aec8d9f8ad6e",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Mon, 18 Mar 2019 16:17:02 GMT
* Last updated: Tue, 14 May 2019 20:27:13 GMT
* Dependencies: @types/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>, Michael Nahkies <https://github.com/mnahkies>.
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