New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/window-size

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/window-size - npm Package Compare versions

Comparing version 0.2.5 to 1.1.0

45

window-size/index.d.ts

@@ -1,12 +0,43 @@

// Type definitions for window-size 0.2.0
// Type definitions for window-size 1.1.1
// Project: https://github.com/jonschlinkert/window-size
// Definitions by: Pouya Kary <https://github.com/pmkary>
// Definitions by: Pouya Kary <https://github.com/pmkary>,
// Juer Whang <https://github.com/juergenie>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "window-size" {
/** Height of the terminal window.*/
export const height: number;
/// <reference types="node" />
/** Width of the terminal window.*/
export const width: number;
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;
}
}

16

window-size/package.json
{
"name": "@types/window-size",
"version": "0.2.5",
"version": "1.1.0",
"description": "TypeScript definitions for window-size",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/window-size",
"license": "MIT",

@@ -11,2 +12,7 @@ "contributors": [

"githubUsername": "pmkary"
},
{
"name": "Juer Whang",
"url": "https://github.com/juergenie",
"githubUsername": "juergenie"
}

@@ -22,5 +28,7 @@ ],

"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "f6e026604761acbe543e031c8c820a4ee2af0905de7704fa6c5090b2c7edbcb8",
"typeScriptVersion": "3.0"
"dependencies": {
"@types/node": "*"
},
"typesPublisherContentHash": "c3e6f6451429973c2aa06d1e1875adb587f75d1cf5536d9348f529a597b6b2e9",
"typeScriptVersion": "3.7"
}

@@ -9,9 +9,56 @@ # Installation

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
// Type definitions for window-size 1.1.1
// Project: https://github.com/jonschlinkert/window-size
// Definitions by: Pouya Kary <https://github.com/pmkary>,
// 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: Fri, 15 May 2020 13:12:59 GMT
* Dependencies: none
* Last updated: Tue, 07 Sep 2021 01:01:18 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by [Pouya Kary](https://github.com/pmkary).
These definitions were written by [Pouya Kary](https://github.com/pmkary), and [Juer Whang](https://github.com/juergenie).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc