
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@types/printer
Advanced tools
TypeScript definitions for printer
npm install --save @types/printer
This package contains type definitions for printer (https://github.com/tojocky/node-printer).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/printer.
/// <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";
These definitions were written by Christos Panagiotakopoulos.
FAQs
TypeScript definitions for printer
The npm package @types/printer receives a total of 277 weekly downloads. As such, @types/printer popularity was classified as not popular.
We found that @types/printer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.