# @types/window-size

> TypeScript definitions for window-size

Latest version **1.1.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/window-size
pnpm add @types/window-size
yarn add @types/window-size
bun add @types/window-size
```

## 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.1.4 |
| Published | 2023-11-07 |
| First published | 2016-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 1.1.4 (latest) — 2023-11-07
- 1.1.1 (ts3.8) — 2021-12-24
- 1.1.0 (ts3.7) — 2021-09-07
- 0.2.5 (ts3.0) — 2020-05-15
- 0.2.4 (ts2.0) — 2016-10-05
- 1.1.3 — 2023-10-18
- 1.1.2 — 2023-09-25
- 0.2.3 — 2016-09-19
- 0.2.2 — 2016-08-25
- 0.2.1 — 2016-08-08

## README

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

declare module "window-size" {
    import { WriteStream } from "fs";

    const windowSize: windowSize.Size & {
        /** Get terminal window's size with available channels. */
        get(options?: windowSize.WindowSizeOptions): windowSize.Size;
        /** Get terminal window's size with `process.env.COLUMNS` and `process.env.ROWS`. */
        env(): windowSize.Size;
        /** Get terminal window's size with `tty` module */
        tty(options: windowSize.TtySizeOptions): windowSize.Size;
        tput(): windowSize.Size;
        win(): windowSize.Size;
    };
    export = windowSize;
    namespace windowSize {
        export interface Size {
            width: number;
            height: number;
            type: string;
        }

        /** Options of inner function `streamSize`. */
        type StreamSizeOptions = Record<string, WriteStream>;

        /** Options of function `windowSize.tty`. */
        interface TtySizeOptions {
            tty?: {
                getWindowSize?: (out: WriteStream) => [number, number];
            };
        }

        /** Options of function `windowSize.get` */
        type WindowSizeOptions = StreamSizeOptions & TtySizeOptions;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Juer Whang](https://github.com/juergenie).

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