Options
All
  • Public
  • Public/Protected
  • All
Menu

cli-driver

Index

Type aliases

EventNames

EventNames: "start" | "data" | "destroy" | "exit" | "error"

Listener

Listener<O>: function

Type parameters

  • O

Type declaration

    • (event: O): void
    • Parameters

      • event: O

      Returns void

Variables

Const ansi

ansi: Ansi

Const now

now: function

returns a timestamp like Date.now() but in this case this timestamp means nothing special. Just extracting two now() calls will give the millisecond difference: for example:


  let t0 = now()
  execute some task...
  console.log(`the task took ${now()-t0}` milliseconds`)

    ```

Type declaration

    • (): number
    • Returns number

Const time

time: function

Usage:

```javascript

let t1 = time() execute some task.... const t2 = time(t1) console.log(the task took ${t2} milliseconds`)

```
param

Type declaration

    • (input?: void | [number, number]): number | [number, number]
    • Parameters

      • Optional input: void | [number, number]

      Returns number | [number, number]

Functions

waitFor

  • waitFor(condition: function, interval: number, timeout: number): Promise<unknown>
  • Parameters

    • condition: function
        • (...args: any[]): boolean
        • Parameters

          • Rest ...args: any[]

          Returns boolean

    • interval: number
    • timeout: number

    Returns Promise<unknown>

Generated using TypeDoc