Function resolveValue

  • Resolves a value by the provided token.

    If an argument is an object which has tokens as its properties, then returns an object containing resolved values as properties.

    If a value is not found by the token, then ResolverError is thrown.

    Example

    const value = resolveValue(container, tokenA);
    console.log(value); // 1

    const props = resolveValue(container, {a: tokenA, b: tokenB});
    console.log(props); // {a: 1, b: 2}

    Type Parameters

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

    • Values extends unknown

    Parameters

    Returns Values

Generated using TypeDoc