brepjs API Reference
    Preparing search index...

    Function resolveParams

    • Turn caller input into the values for a part function.

      A missing parameter takes its default. A string is accepted for a number or a boolean parameter ('80', 'true'), so command-line and URL input needs no conversion first. The defaults go through the same checks, so a declaration whose default breaks its own limits fails here too.

      Type Parameters

      • D extends Readonly<Record<string, ParamDef>>

      Parameters

      • params: Params<D>
      • input: Readonly<Record<string, unknown>> = {}

      Returns Result<ParamValues<D>>

      The values, or the first problem found: an input key that is not declared (PARAM_UNKNOWN), a value of the wrong type (PARAM_INVALID_VALUE), or a value outside its limits (PARAM_OUT_OF_RANGE).