Type alias MessageCallback

MessageCallback: ((message: string) => void | Promise<void>)

Type declaration

    • (message: string): void | Promise<void>
    • The clone, fetch, push, and pull commands all accept an the callback.

      Message events are for messages generated by the remote server and sent during fetch and push requests. They are particularly useful if the remote server has custom git-hooks that print to the console.

      Example

      You are writing a console application, and you want to simply print any server messages to standard out.

      import { clone } from 'git-essentials'
      clone({
      ...,
      onMessage: console.log
      })

      Parameters

      • message: string

      Returns void | Promise<void>

Generated using TypeDoc