Skip to content

feat: emit cross-file types and generics on solid - #73

Merged
alexgrozav merged 3 commits into
milestone-m5-uxf-443from
solid-types-generics-uxf-463
Oct 29, 2026
Merged

alexgrozav merged 3 commits into
milestone-m5-uxf-443from
solid-types-generics-uxf-463

Conversation

@alexgrozav

@alexgrozav alexgrozav commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Cross-file types and generic components on Solid, which turns its column of the types and generics cases green (ADR-0067, ADR-0068). Only Solid's output changes.

  • Solid: import type by name through codegen's addTypeImports (./types, a package as written, a child's types from ./Field), and in the output of a module's main component its other type exports and re-exports in source order (typeExportsCode). A generic component is a generic function component, function List<T>(props: ListProps<T>). The interfaces Solid declares for a component's events, models and slots take the type parameters their members read (PickerSlots<T>), so a scoped slot's fill is typed with the consumer's T (generic-slot-props, native). A <select> bound to a model of T writes the chosen value as T. Setup code that names a type parameter (function label(item: T), const none: T[]) stays inside the generic function, where T is in scope, and a generated interface declares every type parameter a chain of constraints reaches (T extends U, U extends V).
  • Fixtures: Solid consumer fixtures for the 12 cases, among them the type and generic misuses: a scoped slot's fill that reads a member T lacks fails with TS2339.
  • Harness: Solid's quarantine is empty again, and its test helpers read these cases. The canaries find a React or Solid component's parameters past its type parameters (function List<T>() through one finder, which places the corruptions and lets L4-consumer widen a generic component's inline props. It is merged with React's lane, which taught the same finder the same form.

Parity matrix

  • Every project, run on the merge with the integration branch (React's lane included) from a checkout whose path holds no .ts: 1402 files, 8829 tests passed, 242 skipped, and the summary reports the matrix green.
  • Solid's cells for types/ (8), generics/ (4) and diagnostics/generic-slot-props pass at every live layer; the skips are layers those cases have nothing for.

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: Solid's package tests and the whole integration suite, both green, 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.

Solid imports the types its output reads by name, from a `.ts` module or
a package as written and from a child's output, and the output of a
module's main component writes the module's other type exports in source
order (ADR-0067, ADR-0068). A generic component is a generic function
component, and the interfaces Solid declares for its events, models and
slots take the type parameters their members read, so a scoped slot's
fill is typed with the consumer's `T`. A `<select>` bound to a model of
`T` writes the chosen value as `T`.

Adds Solid's consumer fixtures for the types and generics cases, empties
its quarantine, and brings those cases back into its package tests. The
canaries find a generic component's template past its type parameters.

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://solid-types-generics-uxf-463-unframework.blue-water-0397.workers.dev (commit 1e86725)

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://1e738369-unframework.blue-water-0397.workers.dev 1e86725 2026-10-29T09:29:04.897Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://69fdf7fc-unframework.blue-water-0397.workers.dev 1a35ad0 2026-10-29T08:46:10.640Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2648e007-unframework.blue-water-0397.workers.dev 000eb11 2026-10-28T12:10:23.044Z Visit the dashboard ↗

alexgrozav and others added 2 commits October 29, 2026 10:43
A generic component's setup constant or function that names one of its
type parameters stays inside the generic function instead of moving to
module scope, where `T` is not in scope. The interfaces Solid declares
for events, models and slots take every type parameter a chain of
constraints reaches (`T extends U, U extends V`), not only one step of it.

The canaries' `L4-consumer` widening finds a generic component's
parameters through the same finder as its template, and Solid's
golden-wide L4 test that names each injected error gets the same 60 s
timeout as its sibling.

Co-authored-by: multica-agent <github@multica.ai>
…-types-generics-uxf-463

# Conflicts:
#	tests/integration/harness/canaries.ts
@alexgrozav
alexgrozav merged commit 09da01c into milestone-m5-uxf-443 Oct 29, 2026
49 checks passed
@alexgrozav
alexgrozav deleted the solid-types-generics-uxf-463 branch October 29, 2026 09: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