Function resolveValues

  • Returns an array of resolved values or objects with resolved values.

    If an item of the array is an object which has tokens as its properties, then returns an object containing resolved values as properties.

    If a token is not found, then ResolverError is thrown.

    Example

    const items1 = resolveValues(container, tokenA);
    console.log(items1); // [1]

    const items2 = resolveValues(container, tokenA, {a: tokenA, b: tokenB});
    console.log(items2); // [1, {a: 1, b: 2}]

    Type Parameters

    • Tokens extends (Token<unknown> | {
          [key: string]: Token<unknown>;
      })[]

    • Values extends { [ K in string | number | symbol]: Tokens[K] extends Token<V> ? V : Tokens[K] extends TokenProps<Props> ? Props : never }

    Parameters

    Returns Values

Generated using TypeDoc