Type alias GenerateExample<I, O>

GenerateExample<I, O>: (I extends string
    ? {
        input: I;
    }
    : I) & (MatchingOutput<O> extends string
    ? {
        output: MatchingOutput<O>;
    }
    : MatchingOutput<O>)

An example for the generate function.

Type Parameters

  • I extends Inputs

    Input type, extending Inputs.

  • O extends Specs

    Output type, extending Specs. If I or O extend a string, these will be converted to objects with keys input and output respectively; otherwise (i.e. if I or O are objects), these will be left as-is. In other words, the resulting type is an object with all the keys of I and O if those are objects, or with keys input and output if I or O are strings (respectively).

Generated using TypeDoc