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"
Source
Package
Preview
type SdkInstance<Schema,TClient> = InjectClient<Schema, TClient> & { $configure: (defaults: SdkConfigurationMap<Schema>) => SdkInstance<Schema, TClient> };
Structure
SdkInstance
| Name | Type | Description |
|---|---|---|
| $configure | | 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. |
