fix(types): clarify public component types and graphic declaration emit - #1064
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1064 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 23 23
Lines 1078 1078
Branches 289 289
=========================================
Hits 1078 1078 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Libraries need public, nameable component types when they emit declarations for
export const MyChart = VChart. This follows #1060 / #1061 with release-ready type names and fixes the same TS4023 failure for wrappers aroundvue-echarts/graphiccomponents.Component. The package import already provides the Vue ECharts context;Component,Exposed, andSlotsdescribe the three roles without repeating that context.Exposedinstead of exportingPublicMethods. The latter only describes a subset of methods and omitssetOption,chart, androot; it remains an internal helper.Exposeddescribes the actual exposed API without adding another abstraction. Template refs can still useInstanceType<typeof VChart>for Vue instance properties.Slotsand document that it is VueSlotsTypemetadata. Callable slots remain available throughInstanceType<typeof VChart>["$slots"]. Preserve the already-publishedVChartSlotsExtensionand its graphic-entry re-export.GraphicComponenttype from the graphic entry. The added group/rect consumer fixtures reproduced TS4023 until this export was present.Compatibility: npm's latest release is still 8.3.0 (published September 6, 2026), whose root entry does not export the three names added by #1060. The changed names are being finalized before their first npm release, so no deprecated aliases are added. The published slot augmentation interface keeps its existing name and identity. No runtime behavior changes or npm release are included.
Validation:
pnpm lint,pnpm format,pnpm typecheck,pnpm dev:typecheckpnpm build(including Vue 3.3 / ECharts 6.0 package type checks),pnpm publint,pnpm run docspnpm test: 49 files / 573 tests passed, including minimum-supported runtimesemitDeclarationOnlywith current dependencies, Vue 3.3 + current ECharts, and Vue 3.3 + ECharts 6.0; generated consumer declarations reference public entry points without internal chunks. The emitted current-dependency declarations also typecheck as a downstream consumer.