@metreeca/blue - v0.12.0
    Preparing search index...

    Function optional

    • Creates a member carrying at most one value.

      Type Parameters

      Parameters

      • range: R

        The shape the value is drawn from, possibly deferred to break definition cycles

      • Optionalconstraints: C

        Optional member constraints

      Returns NoInfer<C> & PropertyConstraints<string> & {
          kind: "property";
          range: Range<R, undefined, 1>;
      }

      An immutable member admitting at most one value of range

      • Readonlykind: "property"

        Discriminator identifying this as a member carrying values.

        Inheritance — cannot be overridden.

      • Readonlyrange: Range<R, undefined, 1>

        Value set the property carries.

        States the shape every value is drawn from and how many of them a resource may carry. A path resolved through the property yields a Range of the same form, so the range a property states and the one a path reaches are read alike.

        Inheritance — child may only narrow the inherited range, bound by bound and shape by shape.