Skip to content

Typescript Issue Since 0.65.0 #1930

Open
@bdbvb

Description

@bdbvb

Description

Everything was working OK for me in 0.64.15, but since 0.65.0 (currently 0.66.3), I'm getting a typescript error, and it seems to be in the library's typings file (\node_modules@hey-api\openapi-ts\dist\index.d.ts) rather than my config file.

node_modules/@hey-api/openapi-ts/dist/index.d.ts(6471,32): error TS2344: Type 'Omit<Config, "name">' does not satisfy the constraint 'BaseConfig'.
  Property 'name' is missing in type 'Omit<Config, "name">' but required in type 'BaseConfig'.
node_modules/@hey-api/openapi-ts/dist/index.d.ts(6542,3): error TS2344: Type 'Omit<Config$k | Config$j | Config$i | Config$h, "name">' does not satisfy the constraint 'BaseConfig'.
  Property 'name' is missing in type 'Omit<Config$k | Config$j | Config$i | Config$h, "name">' but required in type 'BaseConfig'.

My config file is named openapi-ts.config.mts.

Reproducible example or configuration

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

export default defineConfig({
    input: "./openapi/swagger-design.json",
    output: {
        path: "./openapi-gen",
        lint: "eslint"
    },
    name: "GlacierDesignApi",
    plugins: [
        {
            name: "legacy/fetch"
        },
        {
            name: "@hey-api/schemas"
        },
        {
            name: "@hey-api/sdk",
            asClass: true
        },
        {
            name: "@hey-api/typescript",
            enums: "javascript",
            exportInlineEnums: true
        }
    ]
});

OpenAPI specification (optional)

No response

System information (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🔥Something isn't workinghelp wanted 🙋This issue is unlikely to be prioritized, please contribute a pull request if you'd like it resolved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions