Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
liamwang opened this issue May 28, 2022 · 0 comments · Fixed by #447
Closed

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

liamwang opened this issue May 28, 2022 · 0 comments · Fixed by #447

Comments

@liamwang
Copy link

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant