Repository navigation
javascript: a JSX tag bound to a Vue defineComponent renders its setup - #1780
Merged
Merged
Conversation
`<JsVue/>` where `const JsVue = defineComponent({ setup() {…} })` (or the
module's default export) was an ambiguous_unknown row in a .jsx file: the
JavaScript rules followed memo/forwardRef/lazy but not a Vue definer. The tag
now renders the options object's setup, its render when there is no setup,
or argument 0 in the function form, as the TypeScript engine does. The same
object handed to any other call stays unresolved.
Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 29, 2026 06:00
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.
In a
.jsxfile, a JSX tag bound to a VuedefineComponent({ setup })(a const or the module's default export) got no edge. The JavaScript JSX rules now treatdefineComponent/defineNuxtComponentas a definer: the tag renders the options object'ssetup, else itsrender, or argument 0 in the function form — as the TypeScript engine already does.71-jsx-vue-define-component: const, default import, render-only, function form, setup+render (setup only); control: the same object handed tomakeStore(…)staysambiguous_unknown.--oracle; fixture JSX rows 4 unknown → 3 resolved + 1 control unknown; a real React/Redux app (462 edges) and react-app (32) row-identical before/after, index time unchanged (~5–7 s).Closes #1761