Repository navigation
feat: emit cross-file types and generics on vue - #72
Merged
Merged
Conversation
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>
🚀 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 deploymentPreview Deployments by commit
|
…ypes-generics-uxf-459
Co-authored-by: multica-agent <github@multica.ai>
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.
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).
import typeby 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 printeddefinePropstype literal whose members another file declares are read off the source's annotation (StatusProps["value"]). Vue's Vite toolchain gives@vitejs/plugin-vuethe disk asscript.fs, without which no imported props type compiles.addTypeImports,typeExportsCodeandtypeSpecifierinexports.ts, which React, Solid and Qwik will call. A type-only import of a.uf.tsxmodule 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.types/(8),generics/(4) anddiagnostics/generic-slot-props, with Vue consumer fixtures, among themtypeand generic misuses. Vue wrote the shared expectations; the Linux baselines come frompnpm test:baselines.harness/no-output.ts).L4-consumercanary 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 layersskip(no spec: …);L8-render-nothingkeeps 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
.ts: 1402 files, 8829 tests passed, 242 skipped, and the summary reports no problem.quarantined, with no missing cell, scenario problem or stale entry.cases/typesandcases/generics, all seven browser projects: 84 files, 132 tests passed, 1 skipped (Astro,interactivity).Checklist
feat(web): sell the next framework on the homepage.pnpm format:check,pnpm lint,pnpm check-typesandpnpm testpass. (The first three pass. In place ofpnpm test: every package's tests and the whole integration suite, both green; Angular's from a checkout whose path holds no.ts.)pnpm changeset(see.changeset/README.md).pnpm build, thenpnpm --filter web lighthouse, still scores at least 0.95 in every category.