@types/window-size
Advanced tools
Comparing version 0.2.5 to 1.1.0
@@ -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; | ||
} | ||
} |
{ | ||
"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). |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5886
37
0
64
0
1
+ Added@types/node@*
+ Added@types/node@22.13.8(transitive)
+ Addedundici-types@6.20.0(transitive)