Skip to main content
Version: v8.0.0

SdkInstance

The fully-resolved SDK instance type returned by createSdk .

The schema is rewritten via InjectClient so every Request leaf carries the actual client type passed to createSdk(client)

  • users do not need to repeat

client: AppClient in every RequestModel<{...}> declaration.


Import
import { SdkInstance } from "@hyper-fetch/core"

Preview

type SdkInstance<Schema,TClient> = InjectClient<Schema, TClient> & { $configure: (defaults: SdkConfigurationMap<Schema>) => SdkInstance<Schema, TClient> };

Structure

SdkInstance
NameTypeDescription
$configure
(defaults: SdkConfigurationMap<Schema>) => SdkInstance<Schema, TClient>

Apply request defaults to the SDK. Returns a new SDK instance with the configuration applied. Use "*" to match all endpoints, or specific endpoint strings / wildcard patterns.