Skip to content

feat: emit cross-file types and generics on vue - #72

Merged
alexgrozav merged 3 commits into
milestone-m5-uxf-443from
vue-types-generics-uxf-459
Oct 28, 2026
Merged

alexgrozav merged 3 commits into
milestone-m5-uxf-443from
vue-types-generics-uxf-459

Conversation

@alexgrozav

@alexgrozav alexgrozav commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Cross-file types and generic components on Vue, the reference target, with the cases every other target's types lane turns green (ADR-0067, ADR-0068).

  • Vue: import type by name (./types, a package as written, a child's types from ./Field.vue), a module's other type exports and re-exports in source order, generic="…" on a generic component's <script setup>, and, where a member comes from a package, which compiler-sfc cannot resolve under TypeScript 7, a printed defineProps type literal whose members another file declares are read off the source's annotation (StatusProps["value"]). Vue's Vite toolchain gives @vitejs/plugin-vue the disk as script.fs, without which no imported props type compiles.
  • codegen: addTypeImports, typeExportsCode and typeSpecifier in exports.ts, which React, Solid and Qwik will call. A type-only import of a .uf.tsx module is resolved too, so its types come from its main component's output; an exported type only a local component reaches is re-exported from the main output. A member another file declares is no longer looked up in the component's own module.
  • Cases: types/ (8), generics/ (4) and diagnostics/generic-slot-props, with Vue consumer fixtures, among them type and generic misuses. Vue wrote the shared expectations; the Linux baselines come from pnpm test:baselines.
  • Other frameworks: React, Svelte, Solid, Angular, Qwik and Astro emit no type imports or generic forms yet, so their failing L3, L4 and L6 cells are quarantined until each one's types lane, and their test helpers leave these cases out. Their browser cells pass, except on Angular, whose browser build type-checks: the 8 cases it cannot compile run against a stand-in that fails every browser layer, quarantined with them (harness/no-output.ts).
  • Harness: the L4-consumer canary widens exported types and type re-exports; output lint allows type-only imports (P7 holds, they are erased); a diagnostics case with output records its browser layers skip(no spec: …); L8-render-nothing keeps a component's slots binding; the canary verdict excuses a spec served a stand-in, and a server L13 skipped because a quarantined L6 rendered nothing.

Parity matrix

  • Every project, run from a checkout whose path holds no .ts: 1402 files, 8829 tests passed, 242 skipped, and the summary reports no problem.
  • The 8 cases Angular cannot compile yet: L3, L4, L6 and every browser layer quarantined, with no missing cell, scenario problem or stale entry.
  • Linux compare mode on cases/types and cases/generics, all seven browser projects: 84 files, 132 tests passed, 1 skipped (Astro, interactivity).

Checklist

  • The title follows Conventional Commits, as in feat(web): sell the next framework on the homepage.
  • pnpm format:check, pnpm lint, pnpm check-types and pnpm test pass. (The first three pass. In place of pnpm test: every package's tests and the whole integration suite, both green; Angular's from a checkout whose path holds no .ts.)
  • Changes to a published package: a changeset from pnpm changeset (see .changeset/README.md).
  • Homepage changes: pnpm build, then pnpm --filter web lighthouse, still scores at least 0.95 in every category.

Vue imports the types its script reads by name, exports a module's other
type exports in source order, writes `generic="…"` on a generic
component's script, and prints the props as a type literal where a
member comes from a package, which compiler-sfc cannot resolve under
TypeScript 7 (ADR-0067, ADR-0068). The shared codegen helper writes the
`import type` lines and re-exports the other script targets will call.

Adds the twelve types and generics cases and `diagnostics/generic-slot-props`,
with Vue's consumer fixtures, and quarantines the other targets' failing
cells until their types lanes. A case Angular cannot compile yet runs its
browser spec against a stand-in that fails every browser layer, so its
cells can be quarantined. The L4-consumer canary also widens exported
types and type re-exports.

Co-authored-by: multica-agent <github@multica.ai>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://vue-types-generics-uxf-459-unframework.blue-water-0397.workers.dev (commit 7266fd4)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9fe5f3a8-unframework.blue-water-0397.workers.dev 7266fd4 2026-10-28T11:19:53.698Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a5e5f998-unframework.blue-water-0397.workers.dev cb60841 2026-10-28T10:22:41.217Z Visit the dashboard ↗

@alexgrozav
alexgrozav merged commit 6778bd4 into milestone-m5-uxf-443 Oct 28, 2026
49 checks passed
@alexgrozav
alexgrozav deleted the vue-types-generics-uxf-459 branch October 28, 2026 11:35
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