Skip to content
Source
Sign inSign up
TanStack/schemas
Open History to see the last commit

client.gen.ts

26 lines861 Bytes

1// This file is auto-generated by @hey-api/openapi-ts
2​
3import {
4 type Client,
5 type ClientOptions,
6 type Config,
7 createClient,
8 createConfig,
9} from './client/index.js'
10import type { ClientOptions as ClientOptions2 } from './types.gen.js'
11​
12/**
13 * The `createClientConfig()` function will be called on client initialization
14 * and the returned object will become the client's initial configuration.
15 *
16 * You may want to initialize your client this way instead of calling
17 * `setConfig()`. This is useful for example if you're using Next.js
18 * to ensure your client always has the correct values.
19 */
20export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (
21 override?: Config<ClientOptions & T>,
22) => Config<Required<ClientOptions> & T>
23​
24export const client: Client = createClient(
25 createConfig<ClientOptions2>({ baseUrl: '/' }),