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

    Function getStateEntries

    • Retrieves the values of a state.

      Each value comes as an Entry typed by the value shape it matches. Entries follow member declaration order, then value order within each member. The id and type members are not values and produce no entry.

      Type Parameters

      Parameters

      • shape: S

        The resource shape state conforms to, possibly deferred to break definition cycles

      • state: State<S>

        The state to read

      Returns readonly (
          | {
              kind: "boolean";
              field: string;
              property: Property;
              shape: BooleanShape;
              value: boolean;
          }
          | {
              kind: "number";
              field: string;
              property: Property;
              shape: NumberShape;
              value: number;
          }
          | {
              kind: "resource";
              field: string;
              property: Property;
              shape: ResourceShape;
              value: Resource;
          }
          | {
              kind: "reference";
              field: string;
              property: Property;
              shape: ReferenceShape;
              value: string;
          }
          | {
              kind: "string";
              field: string;
              property: Property;
              shape: StringShape;
              value: string;
          }
          | {
              kind: "dictionary";
              field: string;
              property: Property;
              shape: DictionaryShape;
              value: { inferred };
          }
      )[]

      One entry for each value state holds under a property shape declares

      TraceError Where state doesn't conform to shape, where a deferred definition reaches itself with no link to break the cycle, where it states a target that doesn't narrow the one the link it is reached through overrides, or where a union range declares a shared member name inconsistently