Skip to content

javascript: a JSX tag bound to a Vue defineComponent renders its setup - #1780

Merged
swapnilpaliwal-sd merged 1 commit into
0.1.9from
loop/ja-is1761
Sep 29, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
0.1.9from
loop/ja-is1761

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

In a .jsx file, a JSX tag bound to a Vue defineComponent({ setup }) (a const or the module's default export) got no edge. The JavaScript JSX rules now treat defineComponent / defineNuxtComponent as a definer: the tag renders the options object's setup, else its render, or argument 0 in the function form — as the TypeScript engine already does.

  • Golden case 71-jsx-vue-define-component: const, default import, render-only, function form, setup+render (setup only); control: the same object handed to makeStore(…) stays ambiguous_unknown.
  • Checked: JS suite 84/84 with --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

`<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
swapnilpaliwal-sd changed the base branch from 0.1.8 to 0.1.9 September 29, 2026 06:04
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 69ffa36 into 0.1.9 Sep 29, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the loop/ja-is1761 branch September 29, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant