fix(runtime-core): remove constructor props for defineComponent#14223
fix(runtime-core): remove constructor props for defineComponent#14223edison1105 merged 2 commits intovuejs:minorfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
There was a problem hiding this comment.
Pull request overview
This PR reverts the runtime-core changes from PR #13831 by removing typed constructor props from defineComponent. The change affects constructor signatures across multiple component-related types, replacing typed props parameters with generic ...args: any[] parameters.
- Reverts constructor signatures from
new (props?: T['props'])tonew (...args: any[]) - Updates JSX type definitions for Vapor runtime to properly support TypeScript JSX inference
- Updates test type declarations to align with the reverted constructor signatures
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/runtime-vapor/src/apiDefineComponent.ts | Reverts VaporComponentInstanceConstructor to use ...args: any[] |
| packages/runtime-dom/src/components/TransitionGroup.ts | Removes props parameter from TransitionGroup constructor |
| packages/runtime-core/src/h.ts | Reverts Constructor interface to use ...args: any[] (contains typo) |
| packages/runtime-core/src/components/Teleport.ts | Removes props parameter from Teleport constructor |
| packages/runtime-core/src/components/Suspense.ts | Removes props parameter from Suspense constructor |
| packages/runtime-core/src/components/KeepAlive.ts | Removes props parameter from KeepAlive constructor |
| packages/runtime-core/src/componentPublicInstance.ts | Reverts ComponentPublicInstanceConstructor to use ...args: any[] |
| packages/runtime-core/src/component.ts | Simplifies ComponentInstance type to use parameterless constructor |
| packages-private/dts-test/vapor/jsx.d.ts | Adds ElementClass and ElementAttributesProperty for JSX support |
| packages-private/dts-test/defineComponent.test-d.tsx | Updates test to match reverted constructor signature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
revert #13831 runtime-core changes.