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

There is a problem with the type hint in the playground #12403

Open
YiMo1 opened this issue Nov 15, 2024 · 0 comments
Open

There is a problem with the type hint in the playground #12403

YiMo1 opened this issue Nov 15, 2024 · 0 comments

Comments

@YiMo1
Copy link

YiMo1 commented Nov 15, 2024

Vue version

3.5.12

Link to minimal reproduction

https://play.vuejs.org/#eNp9kc1OwzAQhF9l5VMrValK4RKFSgX1AAeoKDeMUJRsUxfHNv4pRVHenY2jlhxQb+uZWfvbdcOWxiSHgCxlmSusMB4c+mBA5qq65cw7zhZclbgVCtdWGzdquAIwVC5TiDWAxa8gLJYpeBtw0ov+x2AKbxtvhaomoIKU79FquWrHXGXT/kG6ng4eayNzj3QCyHazRdNA3zqKb42hbbMp6V3jIMwmxFhotRVVsnda0SARirNC10ZItM/GC61ojjMuZ7mU+vsxagNi6tlh8fmPvnfHTuNsbdGhPSBnZ8/ntkLf26vNEx6pPpu1LoOk9AXzBZ2WoWPsY3dBlYQ9yEXah9po62kfr2519KjcaagONK415jmj37y/MPof7jy5Pn0HbfHjgLa7kxY4T26S2RVrfwEXULH2

Steps to reproduce

鼠标悬浮在属性 propA 上。

Hover over the property propA.

What is expected?

属性 propA 的类型应该是 string | null

propA should be string | null.

What is actually happening?

属性 propA 的类型却是 string

propA is actually string.

System Info

No response

Any additional comments?

VSCode 中,类型提示是正常的。

It's normal in VSCode.

image


我想知道关于“可为 null 的类型”具体是在哪一个版本中新增加的功能,在文档中并没有写,我在componentProps.ts文件中查看类型 PropType 的最近一次修改是在 75c8cf6 ,所以它是在 v3.5.0-alpha.1 之后增加的新功能吗?如果是的,那么能否在文档中用徽章标记出来?

I wonder exactly what version of Nullable Type was added in, it wasn't written in the docs, I looked at the type in the componentProps.ts file The last modification of the type PropType was in 75c8cf6, so is it a new feature added after v3.5.0-alpha.1? If so, can it be marked with a badge in the document?

@YiMo1 YiMo1 changed the title definedProps 在演练场中的类型提示有错误。 defineProps 在演练场中的类型提示有错误。 Nov 15, 2024
@YiMo1 YiMo1 changed the title defineProps 在演练场中的类型提示有错误。 There is a problem with the type hint in the playground Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants