Skip to content

Conversation

@zhiyuanzmj
Copy link
Member

@zhiyuanzmj zhiyuanzmj commented Nov 13, 2024

closed #12384

Summary by CodeRabbit

  • Refactor
    • Updated internal type declarations to improve extensibility and maintainability. This is an internal change only; no user-facing behavior, API surface, or configuration has changed.

@github-actions
Copy link

github-actions bot commented Nov 13, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 102 kB 38.7 kB 34.8 kB
vue.global.prod.js 160 kB 58.6 kB 52.2 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.8 kB 18.3 kB 16.8 kB
createApp 54.9 kB 21.3 kB 19.5 kB
createSSRApp 59.1 kB 23.1 kB 21 kB
defineCustomElement 60.3 kB 23 kB 21 kB
overall 69.1 kB 26.5 kB 24.2 kB

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 13, 2024

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: e00f009

@edison1105 edison1105 added ready to merge The PR is ready to be merged. scope: types labels Nov 14, 2024
@coderabbitai
Copy link

coderabbitai bot commented Jun 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR converts ReservedProps in packages/runtime-dom/src/jsx.ts from a type alias to an exported interface with the same optional properties (key, ref, ref_for, ref_key), enabling interface merging and module augmentation without changing property types.

Changes

Cohort / File(s) Change Summary
JSX typings
packages/runtime-dom/src/jsx.ts
ReservedProps changed from export type ReservedProps = { ... } to export interface ReservedProps { ... } (same properties preserved).

Sequence Diagram(s)

sequenceDiagram
    participant User as User code (d.ts)
    participant RuntimeJSX as packages/runtime-dom/src/jsx.ts

    User->>RuntimeJSX: declare module augmentation adding fields to ReservedProps
    Note right of RuntimeJSX: ReservedProps is an interface\nso declaration merging applies
    RuntimeJSX-->>User: merged ReservedProps visible to JSX typings
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review focus: packages/runtime-dom/src/jsx.ts for correct export and no accidental API surface change.
  • Verify downstream consumers/typedefs compile (module augmentation works as intended).

Possibly related PRs

Suggested labels

easy to merge

Suggested reviewers

  • jh-leong

Poem

I’m a rabbit in code, nibbling types with care,
ReservedProps grew ears and now welcomes your flair.
Hop in with augmentations, merge what you please,
JSX fields flourish among interfaces and trees. 🐇✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e00f009 and f02f79b.

📒 Files selected for processing (1)
  • packages/runtime-dom/src/jsx.ts (1 hunks)

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

@zhiyuanzmj zhiyuanzmj changed the title feat(jsx-runtime): make AllowedComponentProps & ComponentCustomProps extend IntrinsicAttributes feat(jsx-runtime): use interface instead of type for ReservedProps Jun 2, 2025
@edison1105 edison1105 moved this to Todo in Next Minor Jul 16, 2025
@edison1105 edison1105 changed the title feat(jsx-runtime): use interface instead of type for ReservedProps types(jsx-runtime): use interface instead of type for ReservedProps Nov 5, 2025
@edison1105 edison1105 moved this from Todo to In Progress in Next Minor Nov 5, 2025
@edison1105 edison1105 merged commit 1df8990 into vuejs:main Nov 5, 2025
11 of 13 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Next Minor Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

TSX can't add custom props because of IntrinsicAttributes don't extends any interface.

3 participants