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