Skip to content

Conversation

@edison1105
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings December 9, 2025 01:23
@coderabbitai
Copy link

coderabbitai bot commented Dec 9, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch edison/types/vaporCustomElement

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 85.2 kB 29.9 kB 26.4 kB
runtime-dom.global.prod.js 108 kB 40.5 kB 36.5 kB
vue.global.prod.js 166 kB 60.5 kB 53.9 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48.2 kB 18.8 kB 17.2 kB
createApp 57.2 kB 22 kB 20.1 kB
createApp + vaporInteropPlugin 96 kB 35.4 kB 31.9 kB
createVaporApp 42 kB 15.5 kB 14.1 kB
createSSRApp 61.6 kB 23.8 kB 21.7 kB
defineCustomElement 63.3 kB 23.8 kB 21.7 kB
overall 71.9 kB 27.2 kB 24.8 kB

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 9, 2025

Open in StackBlitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@14183

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@14183

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@14183

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@14183

@vue/compiler-vapor

npm i https://pkg.pr.new/@vue/compiler-vapor@14183

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@14183

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@14183

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@14183

@vue/runtime-vapor

npm i https://pkg.pr.new/@vue/runtime-vapor@14183

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@14183

@vue/shared

npm i https://pkg.pr.new/@vue/shared@14183

vue

npm i https://pkg.pr.new/vue@14183

@vue/compat

npm i https://pkg.pr.new/@vue/compat@14183

commit: ba17296

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements type inference for defineVaporCustomElement, bringing it on par with the regular Vue custom element API. The key improvement is that users no longer need to use as any type assertions when working with custom element instances, as the props are now properly typed based on the component definition.

  • Adds comprehensive TypeScript overloads for defineVaporCustomElement to infer prop types from component definitions
  • Renames apiDefineVaporCustomElement.ts to apiDefineCustomElement.ts for consistency with naming conventions
  • Removes unnecessary as any type assertions throughout the test suite, now that proper type inference is available

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/runtime-vapor/src/index.ts Updates import path from apiDefineVaporCustomElement to apiDefineCustomElement and exports new type VaporElementConstructor
packages/runtime-vapor/src/dom/prop.ts Updates import path for VaporElement type
packages/runtime-vapor/src/component.ts Updates import path for VaporElement type
packages/runtime-vapor/src/apiDefineCustomElement.ts Adds three type overloads for defineVaporCustomElement to support type inference for setup functions, options objects, and defineVaporComponent return values
packages/runtime-vapor/tests/customElement.spec.ts Removes as any type assertions throughout tests, validating that type inference now works correctly; wraps async component definitions with defineVaporComponent for better type safety
packages-private/dts-test/vapor/defineVaporCustomElement.test-d.ts Adds comprehensive type tests covering all three overload scenarios to validate proper type inference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@edison1105 edison1105 added the scope: vapor related to vapor mode label Dec 9, 2025
@edison1105 edison1105 moved this to Vapor in Next Minor Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

Status: Vapor

Development

Successfully merging this pull request may close these issues.

2 participants