FHIRClient - v3.0.0
    Preparing search index...

    Type Alias RequestFunction<R>

    RequestFunction: <O extends IncludeResponseHint = {}>(
        requestOptions?: O,
    ) => Promise<O["includeResponse"] extends true ? CombinedFetchResult<R> : R>

    A function or method that makes requests to the backend server. If the includeResponse option is true resolves with CombinedFetchResult where the response property is the Response object and the body property is the result of type R (if any). Otherwise resolves with the result as R.

    Type Parameters

    • R = any

      The expected return type

    Type Declaration

      • <O extends IncludeResponseHint = {}>(
            requestOptions?: O,
        ): Promise<O["includeResponse"] extends true ? CombinedFetchResult<R> : R>
      • Type Parameters

        • O extends IncludeResponseHint = {}

          May contain the includeResponse flag to signal that we also want to receive the raw response object. Any other option will be passed to the underlying fetch call.

        Parameters

        • OptionalrequestOptions: O

        Returns Promise<O["includeResponse"] extends true ? CombinedFetchResult<R> : R>