ixfx
    Preparing search index...

    Function resolve

    • Resolves the input to a concrete value.

      The input can be:

      • primitive value (string, boolean, number, object)
      • a/sync function
      • a/sync generator/iterator
      • ReactiveNonInitial

      Examples:

      await resolve(10);       // 10
      await resolve(() => 10); // 10
      await resole(async () => {
      sleep(100);
      return 10;
      }); // 10

      If the input is a function, any arguments given to resolve are passed to it as a spread.

      Resolve is not recursive. If the input is an object, it will be returned, even though its properties may be resolvable. Use resolveFields if you want to handle this case.

      Type Parameters

      Parameters

      • resolvable: ResolveToValue<V>

        Input to resolve

      • ...args: unknown[]

        Additional arguments to pass to function-resolvables.

      Returns Promise<V>