hey-api / openapi-ts

✨ Turn your OpenAPI specification into a beautiful TypeScript client
https://heyapi.vercel.app
MIT License
639 stars 45 forks source link

Default export of the module has or is using private name 'ClientConfig'. #661

Open alainfonhof opened 3 weeks ago

alainfonhof commented 3 weeks ago

Description

When following the documentation I get a type error with the following code block:

import { defineConfig } from '@hey-api/openapi-ts';

export default defineConfig({
  input: 'path/to/openapi.json',
  output: 'src/client',
});

Default export of the module has or is using private name 'ClientConfig'.

It seems that only the type UserConfig is exported, however because type UserConfig = ClientConfig; the type ClientConfig is expected and this is a private interface.

OpenAPI specification (optional)

No response

Configuration

No response

System information (optional)

tsconfig

"compilerOptions": {
    "rootDir": ".",
    "sourceMap": true,
    "declaration": false,
    "strict": true,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es2015",
    "module": "esnext",
    "lib": ["es2020", "dom"],
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "baseUrl": "."
    }

typescript: 5.3.3

mrlubos commented 3 weeks ago

Which package versions is this @alainfonhof?

alainfonhof commented 3 weeks ago

0.46.3