1.1.4 • Published 6 months ago

@types/window-size v1.1.4

Weekly downloads
22,885
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for window-size 1.1.1
// Project: https://github.com/jonschlinkert/window-size
// Definitions by: Juer Whang <https://github.com/juergenie>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <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: Thu, 23 Dec 2021 23:36:05 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Juer Whang.

1.1.4

6 months ago

1.1.3

6 months ago

1.1.2

7 months ago

1.1.1

2 years ago

1.1.0

3 years ago

0.2.5

4 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago