# @types/ipp-printer

> TypeScript definitions for ipp-printer

Latest version **1.0.4** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/ipp-printer
pnpm add @types/ipp-printer
yarn add @types/ipp-printer
bun add @types/ipp-printer
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-11-21 |
| First published | 2022-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/ipp-printer
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ipp-printer
- npm.io page: https://npm.io/package/@types/ipp-printer

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.0.4 (latest) — 2023-11-21
- 1.0.0 (ts4.1) — 2022-11-23
- 1.0.3 — 2023-11-07
- 1.0.2 — 2023-10-18
- 1.0.1 — 2023-09-26

## README

# Installation
> `npm install --save @types/ipp-printer`

# Summary
This package contains type definitions for ipp-printer (https://github.com/watson/ipp-printer).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ipp-printer.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ipp-printer/index.d.ts)
````ts
/// <reference types="node" />

import * as http from "http";
import { Readable } from "node:stream";

declare class Printer {
    constructor(opts?: Printer.Options | string);
    fallback: boolean;
    jobs: Printer.Job[];
    name: string;
    port: number;
    server: http.Server;
    started: Date;
    state: number;
    uri: string;

    on(event: "job", handler: (job: Printer.Job) => void): Printer;
    on(event: "operation", handler: (operation: Printer.Operation) => void): Printer;
}

declare namespace Printer {
    interface Attribute {
        name: string;
        tag: number;
        value: string | number | Date;
    }

    interface AttributeGroup {
        attributes: Attribute[];
        tag: number;
    }

    class Job extends Readable {
        compression: string;
        createdAt: Date;
        id: number;
        name: string;
        state: number;
        uri: string;
        userName: string;

        attributes(filter?: readonly string[]): Attribute[];
        pause(): this;
        resume(): this;
        setEncoding(encoding: BufferEncoding): this;
        unpipe(destination?: NodeJS.WritableStream): this;
        wrap(oldStream: NodeJS.ReadableStream): this;
    }

    interface Operation {
        version: { major: number; minor: number };
        operationId: number;
        requestId: number;
        groups: AttributeGroup[];
    }

    interface Options {
        fallback?: boolean;
        name?: string;
        port?: number;
        server?: http.Server;
        uri?: string;
        zeroconf?: boolean;
    }
}

export = Printer;

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Matt Smith](https://github.com/mattsmithcode).

---
_Source: https://npm.io/package/@types/ipp-printer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
