
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@types/printer
Advanced tools
npm install --save @types/printer
This package contains type definitions for printer (http://github.com/tojocky/node-printer).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/printer.
// 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';
These definitions were written by Christos Panagiotakopoulos.
FAQs
TypeScript definitions for printer
The npm package @types/printer receives a total of 222 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.