···11+---
22+'@hey-api/client-nuxt': patch
33+'@hey-api/openapi-ts': patch
44+---
55+66+fix: correctly type default value for Nuxt client
+22-2
examples/openapi-ts-nuxt/client/client.gen.ts
···11// This file is auto-generated by @hey-api/openapi-ts
2233-import { createClient, createConfig } from '@hey-api/client-nuxt';
33+import {
44+ type ClientOptions as DefaultClientOptions,
55+ type Config,
66+ createClient,
77+ createConfig,
88+} from '@hey-api/client-nuxt';
4955-export const client = createClient(createConfig());
1010+import type { ClientOptions } from './types.gen';
1111+1212+/**
1313+ * The `createClientConfig()` function will be called on client initialization
1414+ * and the returned object will become the client's initial configuration.
1515+ *
1616+ * You may want to initialize your client this way instead of calling
1717+ * `setConfig()`. This is useful for example if you're using Next.js
1818+ * to ensure your client always has the correct values.
1919+ */
2020+export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> =
2121+ (
2222+ override?: Config<DefaultClientOptions & T>,
2323+ ) => Config<Required<DefaultClientOptions> & T>;
2424+2525+export const client = createClient(createConfig<ClientOptions>());