import * as util from 'util'; interface NodeCallback { (err: any, result?: T): void; } interface NodeCallback2 { (result: T): void; } declare module "util" { export function promisify(f: (callback?: NodeCallback) => void): () => Promise; export function promisify(f: (arg1: S, callback: NodeCallback) => void): (arg1: S) => Promise; export function promisify(f: (arg1: S, arg2: U, callback: NodeCallback) => void): (arg1: S, arg2: U) => Promise; export function promisify(f: (arg1: S, arg2: U, arg3: W, callback: NodeCallback) => void): (arg1: S, arg2: U, arg3: W) => Promise; export function promisify(f: (callback: NodeCallback2) => void): () => Promise; export function promisify(f: (arg1: S, callback: NodeCallback2) => void): (arg1: S) => Promise; export function promisify(f: (arg1: S, arg2: U, callback: NodeCallback2) => void): (arg1: S, arg2: U) => Promise; export function promisify(f: (arg1: S, arg2: U, arg3: W, callback: NodeCallback2) => void): (arg1: S, arg2: U, arg3: W) => Promise; }