New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@types/printer

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/printer - npm Package Compare versions

Comparing version
0.4.0
to
0.4.1
+8
-8
printer/index.d.ts

@@ -22,7 +22,7 @@ // Type definitions for printer 0.4

data: string | Buffer;
printer?: string;
type?: 'RAW' | 'TEXT' | 'PDF' | 'JPEG' | 'POSTSCRIPT' | 'COMMAND' | 'AUTO';
options?: { [key: string]: string };
success?: PrintOnSuccessFunction;
error?: PrintOnErrorFunction;
printer?: string | undefined;
type?: 'RAW' | 'TEXT' | 'PDF' | 'JPEG' | 'POSTSCRIPT' | 'COMMAND' | 'AUTO' | undefined;
options?: { [key: string]: string } | undefined;
success?: PrintOnSuccessFunction | undefined;
error?: PrintOnErrorFunction | undefined;
}

@@ -32,5 +32,5 @@

filename: string;
printer?: string;
success?: PrintOnSuccessFunction;
error?: PrintOnErrorFunction;
printer?: string | undefined;
success?: PrintOnSuccessFunction | undefined;
error?: PrintOnErrorFunction | undefined;
}

@@ -37,0 +37,0 @@

{
"name": "@types/printer",
"version": "0.4.0",
"version": "0.4.1",
"description": "TypeScript definitions for printer",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/printer",
"license": "MIT",

@@ -24,4 +25,4 @@ "contributors": [

},
"typesPublisherContentHash": "579430caf80cca27139ad4d13cac8a2f671aff6bf1c82bcb814c4ba6779e7aa5",
"typeScriptVersion": "3.2"
"typesPublisherContentHash": "fc13942d8829f5039022b735f9a9eea86082f5ddd060232ab6e7d13b80658cde",
"typeScriptVersion": "3.6"
}

@@ -9,5 +9,72 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/printer.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/printer/index.d.ts)
````ts
// Type definitions for printer 0.4
// Project: http://github.com/tojocky/node-printer
// Definitions by: Christos Panagiotakopoulos <https://github.com/chrispanag>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export function getPrinters(): PrinterDetails[];
export function getPrinter(printerName: string): PrinterDetails;
export function getPrinterDriverOptions(printerName: string): PrinterDriverOptions;
export function getSelectedPaperSize(printerName: string): string;
export function getDefaultPrinterName(): string | undefined;
export function printDirect(options: PrintDirectOptions): void;
export function printFile(options: PrintFileOptions): void;
export function getSupportedPrintFormats(): string[];
export function getJob(printerName: string, jobId: number): JobDetails;
export function setJob(printerName: string, jobId: number, command: 'CANCEL' | string): void;
export function getSupportedJobCommands(): string[];
export interface PrintDirectOptions {
data: string | Buffer;
printer?: string | undefined;
type?: 'RAW' | 'TEXT' | 'PDF' | 'JPEG' | 'POSTSCRIPT' | 'COMMAND' | 'AUTO' | undefined;
options?: { [key: string]: string } | undefined;
success?: PrintOnSuccessFunction | undefined;
error?: PrintOnErrorFunction | undefined;
}
export interface PrintFileOptions {
filename: string;
printer?: string | undefined;
success?: PrintOnSuccessFunction | undefined;
error?: PrintOnErrorFunction | undefined;
}
export type PrintOnSuccessFunction = (jobId: string) => any;
export type PrintOnErrorFunction = (err: Error) => any;
export interface PrinterDetails {
name: string;
isDefault: boolean;
options: { [key: string]: string; };
}
export interface PrinterDriverOptions {
[key: string]: { [key: string]: boolean; };
}
export interface JobDetails {
id: number;
name: string;
printerName: string;
user: string;
format: string;
priority: number;
size: number;
status: JobStatus[];
completedTime: Date;
creationTime: Date;
processingTime: Date;
}
export type JobStatus = 'PAUSED' | 'PRINTING' | 'PRINTED' | 'CANCELLED' | 'PENDING' | 'ABORTED';
````
### Additional Details
* Last updated: Thu, 17 Sep 2020 16:51:55 GMT
* Last updated: Thu, 08 Jul 2021 20:19:50 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +81,0 @@ * Global values: none