Type alias ZOptionsParser<TOption, TCtx>

ZOptionsParser<TOption, TCtx>: ((this, context, args, opts?) => Promise<TCtx>)

Type Parameters

  • TOption extends ZOption

    A type of option representation.

  • TCtx

    A type of option processing context required by parser.

Type declaration

    • (this, context, args, opts?): Promise<TCtx>
    • Command line options parser signature.

      Parameters

      • this: void
      • context: TCtx

        Options processing context. This context is supposed to receive the processing results.

      • args: readonly string[]

        Array of command line arguments

      • Optional opts: Opts<TOption, TCtx>

        Parser options.

      Returns Promise<TCtx>

      A promise resolved to processing context when parsing completes.

Generated using TypeDoc