• Version 1.1.4
  • Published
  • 5.1 kB
  • 1 dependency
  • MIT license


npm i @types/window-size
yarn add @types/window-size
pnpm add @types/window-size


TypeScript definitions for window-size



namespace window-size

module 'window-size' {}

    variable windowSize

    const windowSize: windowSize.Size & {
    get(options?: windowSize.WindowSizeOptions): windowSize.Size;
    env(): windowSize.Size;
    tty(options: windowSize.TtySizeOptions): windowSize.Size;
    tput(): windowSize.Size;
    win(): windowSize.Size;

      interface Size

      interface Size {}

        property height

        height: number;

          property type

          type: string;

            property width

            width: number;

              interface TtySizeOptions

              interface TtySizeOptions {}
              • Options of function windowSize.tty.

              property tty

              tty?: {
              getWindowSize?: (out: WriteStream) => [number, number];

                type StreamSizeOptions

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

                type WindowSizeOptions

                type WindowSizeOptions = StreamSizeOptions & TtySizeOptions;
                • Options of function windowSize.get

                Package Files (1)

                Dependencies (1)

                Dev Dependencies (0)

                No dev dependencies.

                Peer Dependencies (0)

                No peer dependencies.


                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/window-size.

                • Markdown
                • HTML
                  <a href="https://www.jsdocs.io/package/@types/window-size"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>