-
Notifications
You must be signed in to change notification settings - Fork 11
fix(): replace . with -- for tag names in jsx.d.ts #4818
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
批准此修复,但需验证运行时一致性
此更改将标签名中的点号替换为双破折号,这对于 JSX/TypeScript 类型定义是正确的做法,因为对象属性键中的点号在 TypeScript 接口中会导致语法问题。
但请验证以下关键点:
--而非.。类型定义必须与运行时的实际标签名匹配。请运行以下脚本验证:
🏁 Script executed:
Length of output: 20679
Need to examine the plopfile context more carefully:
Now I need to examine the plopfile context more carefully to understand whether this is intentional or a breaking bug:
修复 JSX 类型定义中的关键运行时不匹配问题
该修改存在严重的类型/运行时不一致问题,必须立即修复。
根据代码验证,运行时自定义元素使用点号格式注册(如
illustrations.error-message、v2-adapter.load-bricks、e2e.return-by-timeout),但此修改将生成的 jsx.d.ts 类型定义中的点号转换为双破折号。JSX.IntrinsicElements 中的元素名称属性键必须与实际 JSX 使用的标签名称相匹配,这意味着:"illustrations--error-message": DetailedHTMLProps...customElements.define("illustrations.error-message", ...)<illustrations.error-message />无法匹配到类型定义 → TypeScript 类型检查失败必需操作:
移除
replaceAll(".", "--")逻辑,保持标签名原样。或确认这仅适用于特定的砖块,而非所有包含点号的标签。🤖 Prompt for AI Agents