Skip to content

有没有办法使 components.d.ts 中的类型定义只增不删? #403

@liamwang

Description

@liamwang

每次运行项目,components.d.ts 中类型定义都会重新生成,组件库(如 Ant Design Vue)的类型定义都会消失,只有运行时解析到的组件才会生成类型定义,这对 TypeScript 不友好。

我目前的做法是,关闭自动生成 d.ts 文件(dts: false),手动维护 d.ts 文件,但这样有些麻烦。

有没有办法使 components.d.ts 中生成的类型定义只增不减?或者能否增加一个配置项:不删除 d.ts 中历史生成的类型定义?

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy