diff --git a/src/main/js/index.d.ts b/src/main/js/index.d.ts index 86e6200..222b864 100644 --- a/src/main/js/index.d.ts +++ b/src/main/js/index.d.ts @@ -1,10 +1,11 @@ import * as semver from 'semver' -import {ProcessPromise} from 'zx' +import { ProcessPromise, Shell, Options as BasicOptions } from 'zx' import * as ip from 'ip' import * as tempy from 'tempy' import * as tcping from 'is-reachable' export * from 'zx' + export { ip, semver, @@ -12,12 +13,18 @@ export { tcping } -interface $ { - raw: $ - silent: $ +type Extra = { + raw: Executor + silent: Executor preferLocal?: boolean - opt: (options: any) => $ - o: (options: any) => $ + opt: (options: any) => Executor + o: (options: any) => Executor +} + +type Executor = Shell & BasicOptions & Extra + +declare module 'zx' { + export type Options = BasicOptions & Extra } -export function createHook(opts?: $, name?: string, cb?: (p: ProcessPromise) => any, configurable?: boolean) +export function createHook(opts?: Executor, name?: string, cb?: (p: ProcessPromise) => any, configurable?: boolean)