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

    Function eager

    • Resolves a possibly deferred shape or range.

      Yields the shape or range a definition states, resolving a deferred one on first reach and handing back the same value on every later reach, so that a definition stated once compares equal wherever it is reached from. A resource shape comes back merged, so a caller reading its members needs not merge the inheritance chain itself; a range comes back as stated, the shape it carries still possibly deferred.

      A deferred definition may reach itself only through a link. An embedded resource is carried inline, so a definition that embeds itself, directly or through other embedded resources or unions, admits no finite value and is rejected. A cycle running through several definitions is reported only once all of them have been resolved, in whatever order: resolving the earlier ones succeeds, and the error surfaces on the definition resolved last.

      Type Parameters

      • S extends Lazy<Shape | Range>

        The stated shape or range, possibly deferred to break definition cycles

      Parameters

      • shape: S

        The shape or range to resolve

      Returns Eager<S>

      The shape or range shape states, merged where it describes a resource

      TraceError Where a deferred definition reaches itself, leaving the shape it states undefined, where it embeds itself with no link to break the cycle, or where it states a target that doesn't narrow the inherited target overridden by the link it is reached through