# @types/screenshot-desktop

> TypeScript definitions for screenshot-desktop

Latest version **1.15.0** (published 2025-07-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/screenshot-desktop
pnpm add @types/screenshot-desktop
yarn add @types/screenshot-desktop
bun add @types/screenshot-desktop
```

## Health

**Score 55/100 (C)** — status: stable.

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

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.15.0 |
| Published | 2025-07-30 |
| First published | 2021-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51450 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 1.15.0 (latest) — 2025-07-30
- 1.12.3 (ts5.0) — 2023-11-07
- 1.12.0 (ts3.7) — 2021-07-26
- 1.12.2 — 2023-10-18
- 1.12.1 — 2023-09-25

## README

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

export = screenshotDesktop;

declare function screenshotDesktop(
    options?: screenshotDesktop.ScreenshotOptionsWithoutFilename,
): Promise<NonSharedBuffer>;
declare function screenshotDesktop(
    options?: screenshotDesktop.ScreenshotOptionsWithFilename,
): Promise<string>;

declare namespace screenshotDesktop {
    interface ScreenshotOptions {
        filename?: string;
        format?: ImageFormat;
        screen?: DisplayID;
        linuxLibrary?: "scrot" | "imagemagick";
    }

    interface ScreenshotOptionsWithFilename extends ScreenshotOptions {
        filename: string;
    }

    interface ScreenshotOptionsWithoutFilename extends ScreenshotOptions {
        filename?: "";
    }

    interface Display {
        id: number | string;
        name: string;
    }

    type DisplayID = Display["id"];

    type ImageFormat = "jpg" | "png";

    function listDisplays(): Promise<Array<Display>>;
    function all(): Promise<Array<NonSharedBuffer>>;
}

````

### Additional Details
 * Last updated: Wed, 30 Jul 2025 22:02:50 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Usama Ahsan](https://github.com/usama8800).

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