-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
[TypeScript] [form] FormInstance
中的 validate
方法类型错误
#16776
Comments
你可以试下在 |
@Liao-js 如果这里的写法发生变动,请增加非兼容版本号,并明显标注,如果全部修改是存在大量工作量的。经过测试 |
ts里面即使函数标注返回类型为 2.7.2返回类型新增了一个 针对以上提到的情况,这里有一个简单的例子可以复现。链接 不过,目前我没有找到ts关于这种情况的详细说明,如果你们有更多详细说明信息,欢迎分享共同学习。 事实上,这里的返回值没有用处,所以 @warmthsea 创建了 PR 修改了官网示例,我将会合并他的 PR,但不会关闭这个 issue。 |
我在 ts 看到这个问题的 issue,里面有项目是改回了 |
@Liao-js 谢谢你提供的链接。 |
Bug Type:
TypeScript
Environment
3.4.27
2.7.2
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Vite
Reproduction
Related Component
el-form
Reproduction Link
Github Repo
Steps to reproduce
官方文档 demo 中的代码直接复制后运行
tsc
就会报错,详见提供的复现链接中的ElFormType.vue
文件运行
pnpm type-check
会出现以下错误What is Expected?
不报错
What is actually happening?
报错
Additional comments
(empty)
The text was updated successfully, but these errors were encountered: