UNPKG

482 BTypeScriptView Raw
1// Type definitions for getpass 0.1
2// Project: https://github.com/arekinath/node-getpass#readme
3// Definitions by: Claas Ahlrichs <https://github.com/claasahl>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6export interface Options {
7 prompt?: string | undefined;
8}
9
10export interface Callback {
11 (error: Error | null, password: string): void;
12}
13
14export function getPass(cb: Callback): void;
15export function getPass(options: Options, cb: Callback): void;