DefinitelyTyped/types/getpass/index.d.ts
Claas Ahlrichs 8ad81d7563 new package: getpass (#34852)
* npx dts-gen -m getpass --dt

* drafted types for getpass

* npx prettier --write .\types\getpass\**

* updated prompt
2019-04-19 16:36:04 -07:00

16 lines
470 B
TypeScript

// Type definitions for getpass 0.1
// Project: https://github.com/arekinath/node-getpass#readme
// Definitions by: Claas Ahlrichs <https://github.com/claasahl>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface Options {
prompt?: string;
}
export interface Callback {
(error: Error | null, password: string): void;
}
export function getPass(cb: Callback): void;
export function getPass(options: Options, cb: Callback): void;