Skip to content

Commit

Permalink
fix: override types
Browse files Browse the repository at this point in the history
  • Loading branch information
dimonka83 authored and antongolub committed Aug 16, 2023
1 parent 3bb2b96 commit 28298fa
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/main/js/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
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,
tempy,
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)

0 comments on commit 28298fa

Please sign in to comment.