btea
btea
It seems that you just adjusted the position of the test cases. Can you explain the reason?
Follow the calculation method of the tag's native `maxlength` attribute. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#maxlength
@kooriookami I think the spelling errors in the original comments may not need to be corrected. 😀
ts里面即使函数标注返回类型为`void`,当函数作为参数时,即使函数返回其他类型也不会报错,所以之前即使返回 false ts也没有报错。 2.7.2返回类型新增了一个`Promise`,在返回 false 时ts报错了。按照预期,只是新增了一种兼容情况,应该不会影响原来的逻辑,但事实是在这种情况下 ts 报错了。并非故意更改而不进行显著标记,而是不清楚会出现这种问题。 针对以上提到的情况,这里有一个简单的例子可以复现。[链接](https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABAcwE4FN1XagFMMALkVwENiBnKVGMZASkQF4A+RANzhgBNGBvALAAoRIgK4ARAAl0AG1lwANIgDqcVLO4T6AbmEBfYcNCRYCRAAcaYKABU4AYQQU4s9LgqVqtBokEjECGdXdAA6BWQPXWFRDCgQVCRqEHQDIyE0TGw8K1o7R2C3XSA) 不过,目前我没有找到ts关于这种情况的详细说明,如果你们有更多详细说明信息,欢迎分享共同学习。 事实上,这里的返回值没有用处,所以 @warmthsea 创建了 PR 修改了官网示例,我将会合并他的 PR,但不会关闭这个 issue。
@Liao-js 谢谢你提供的链接。
@raphaelbernhart Sorry, I don't have the relevant equipment environment locally. If you have ideas to solve this issue, please submit a PR. Thank you!
@raphaelbernhart Thank you for submitting the PR. However, everyone has been busy with work recently, so the review and release process may not be that fast! If you need it...
Thank you for your contribution! However, it may be more convenient and faster to adjust this requirement by yourself through style adjustment.
Thank you for your contribution, but it is duplicated with #16781.
@ttionya Hi, can you provide a reproducible example? We have not encountered the corresponding scenario.