fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: improve preset types

Lubos a0a0101d 5f7c22ed

+8 -6
+1 -1
dev/hey-api.ts
··· 1 1 // @ts-ignore 2 - import type { CreateClientConfig } from './client/client.gen'; 2 + import type { CreateClientConfig } from './.gen/typescript/client.gen'; 3 3 4 4 // @ts-ignore 5 5 export const createClientConfig: CreateClientConfig = (config) => ({
+1 -1
dev/playground.ts
··· 1 1 import type { DefinePlugin, IR } from '@hey-api/openapi-ts'; 2 2 3 3 // import { createOpencode } from '@opencode-ai/sdk'; 4 - import { PetStore } from './.gen/sdk.gen.ts'; 4 + import { PetStore } from './.gen/typescript/sdk.gen.ts'; 5 5 6 6 type MyPluginConfig = { readonly name: 'myplugin' }; 7 7 type MyPlugin = DefinePlugin<MyPluginConfig>;
+1 -1
dev/python/plugins.ts
··· 1 1 import type { UserConfig } from '@hey-api/openapi-python'; 2 2 3 - type PluginConfig = NonNullable<NonNullable<UserConfig['plugins']>[number]>; 3 + export type PluginConfig = NonNullable<NonNullable<UserConfig['plugins']>[number]>; 4 4 5 5 export function sdk( 6 6 options?: Omit<Extract<PluginConfig, { name: '@hey-api/python-sdk' }>, 'name'>,
+2 -1
dev/python/presets.ts
··· 1 + import type { PluginConfig } from './plugins'; 1 2 import { pydantic, sdk } from './plugins'; 2 3 3 4 export const presets = { ··· 19 20 sdk(), 20 21 pydantic(), 21 22 ], 22 - } as const; 23 + } as const satisfies Record<string, () => ReadonlyArray<PluginConfig>>; 23 24 24 25 export type PresetKey = keyof typeof presets; 25 26
+1 -1
dev/typescript/plugins.ts
··· 1 1 import type { UserConfig } from '@hey-api/openapi-ts'; 2 2 3 - type PluginConfig = NonNullable<NonNullable<UserConfig['plugins']>[number]>; 3 + export type PluginConfig = NonNullable<NonNullable<UserConfig['plugins']>[number]>; 4 4 5 5 export function typescript( 6 6 options?: Omit<Extract<PluginConfig, { name: '@hey-api/typescript' }>, 'name'>,
+2 -1
dev/typescript/presets.ts
··· 1 + import type { PluginConfig } from './plugins'; 1 2 import { sdk, tanstackReactQuery, transformers, typescript, valibot, zod } from './plugins'; 2 3 3 4 export const presets = { ··· 36 37 valibot({ metadata: true }), 37 38 zod({ metadata: true }), 38 39 ], 39 - } as const; 40 + } as const satisfies Record<string, () => ReadonlyArray<PluginConfig>>; 40 41 41 42 export type PresetKey = keyof typeof presets; 42 43