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

cc.d.ts中 getComponent()方法参数类型不对. #16915

Closed
finscn opened this issue Apr 19, 2024 · 2 comments
Closed

cc.d.ts中 getComponent()方法参数类型不对. #16915

finscn opened this issue Apr 19, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@finscn
Copy link
Contributor

finscn commented Apr 19, 2024

Cocos Creator version

3.8.2

System information

all

Issue description

d.ts中 cc.Node 和 cc.Component 类的 getComponent()方法参数类型声明好像不一致.
导致 对象类型是 cc.Node | cc.Component 时, getComponent()只支持字符串

Relevant error log output

No response

Steps to reproduce

(无)

Minimal reproduction project

No response

@finscn finscn added Bug Needs Triage Needs to be assigned by the team labels Apr 19, 2024
@finscn
Copy link
Contributor Author

finscn commented Apr 19, 2024

image image

错误如上图

@finscn finscn changed the title d.ts中 cc.Component 类的 getComponent()方法参数类型不对. cc.d.ts中 getComponent()方法参数类型不对. Apr 19, 2024
@dumganhar dumganhar added this to the 3.8.4 milestone Apr 23, 2024
dumganhar added a commit to dumganhar/cocos-engine that referenced this issue Apr 23, 2024
@dumganhar
Copy link
Contributor

dumganhar commented Apr 23, 2024

It was fixed at #16921, it will be in v3.8.4.
Thanks for your report.

@dumganhar dumganhar removed the Needs Triage Needs to be assigned by the team label Apr 23, 2024
dumganhar added a commit that referenced this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants