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

新增忽略类型错误的配置选项 #735

Open
fz6m opened this issue Dec 23, 2023 · 0 comments
Open

新增忽略类型错误的配置选项 #735

fz6m opened this issue Dec 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@fz6m
Copy link
Member

fz6m commented Dec 23, 2023

What problem does this feature solve?

目前在 umi 4 仓库里用的 father 是 4.1.5 ,我注意到截止目前最新 father 版本之间,有一些 dts 的修复,使得类型错误也会在构建时被抛出,导致使用最新版本 father 去构建 umi 仓库时,会构建失败。

举个例子:

由于 turbo 是按照拓扑关系构建的,比如 umi/packages/plugin-run/src/index.ts 中,使用了 umi 导入:

import { IApi } from 'umi';
import { fsExtra, resolve } from 'umi/plugin-utils';

这里面有纯类型导入 IApi 和实体导入( fsExtra ) ,但无论是哪种导入,这个时候都是没有构建好 packages/umipackages/utils 这俩包的,因为这几个包都会在第一时刻同时构建,导致类型找不到报错,经过本地尝试,类似的类型错误还有很多,他们在 tsc 的类型引用上是合理的(即使存在循环导入,但类型循环导入不影响产物),故不希望这些类型发生报错。

期望新增一个选项可以忽略类型报错,而仅仅发挥 father 的转译构建功能,因为类型检查我们事先使用 tsc --noEmit 检查过了,这一步不需要类型检查。

Possible Solution (optional)

No response

@fz6m fz6m added the enhancement New feature or request label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant