0.1.6 • Published 6 months ago
@types/derhuerst__cli-on-key v0.1.6
Installation
npm install --save @types/derhuerst__cli-on-key
Summary
This package contains type definitions for @derhuerst/cli-on-key (https://github.com/derhuerst/cli-on-key).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/derhuerst__cli-on-key.
index.d.ts
// Type definitions for @derhuerst/cli-on-key 0.1
// Project: https://github.com/derhuerst/cli-on-key
// Definitions by: Rong Shen <https://github.com/jacobbubu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare namespace listen {
interface Key {
name?: string | undefined;
ctrl: boolean;
meta: boolean;
shift: boolean;
sequence: string;
code?: string | undefined; // ansi code leaving out leading \x1b's
raw: string;
}
type Callback = (key: Key) => void;
type OffKeyPress = (key: Key) => void;
}
declare function listen(
stream: NodeJS.ReadStream,
callback: listen.Callback
): listen.OffKeyPress;
export = listen;
Additional Details
- Last updated: Thu, 08 Jul 2021 09:08:39 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Rong Shen.