Function fetchVal

  • Convience method to fetch a haystack value from the server.

    If the returned value is a grid and has an error then the returned promise will be rejected with a GridError instance.

    Type Parameters

    • T extends HVal

    Parameters

    • resource: RequestInfo

      The resource to request.

    • Optionaloptions: RequestInit

      Optional object containing any custom settings.

    • OptionalfetchFunc: FetchMethod

      Optional fetch function to use instead of global fetch.

    Returns Promise<T>

    A promise that resolves to a value.

    A fetch or grid error.