Skip to content

[BUG] 生成的 types.ts 过大,无法拆分 #589

@Juexe

Description

@Juexe

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

使用hook可以拆分接口,但是发现所有类型定义还是塞在 types.ts 中了,导致 types.ts 文件达到数千行,对于 AI 造成困扰(浪费 token),不知道能否拆分,还是我的方法不对?

customFileNames: (operationObject, apiPath) => {
        console.log('customFileNames', apiPath)
        const path = apiPath.split('/').filter(Boolean)
        if (path.length > 2) {
          return [path[2]]
        }
        return ['common']
      },

Expected Behavior

拆分不同的 type.ts 而不是全部塞在 types.ts中

Steps To Reproduce

直接生成就能复现了

Environment

- OS: Windows 11

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions