Skip to content

Fix createProjection seed type inference#2786

Open
brenelz wants to merge 2 commits into
solidjs:nextfrom
brenelz:fix-create-projection-seed-typing
Open

Fix createProjection seed type inference#2786
brenelz wants to merge 2 commits into
solidjs:nextfrom
brenelz:fix-create-projection-seed-typing

Conversation

@brenelz

@brenelz brenelz commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • type createProjection seeds like createStore's projection seed
  • keep the solid-js hydration wrapper signature aligned with @solidjs/signals
  • add a patch changeset

Testing

  • pnpm --filter @solidjs/signals types
  • pnpm --filter solid-js types

@changeset-bot

changeset-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a93474

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@solidjs/signals Patch
solid-js Patch
test-integration Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
@solidjs/universal Patch
@solidjs/web Patch
babel-preset-solid Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codspeed-hq

codspeed-hq Bot commented Jun 14, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 120 untouched benchmarks


Comparing brenelz:fix-create-projection-seed-typing (0a93474) with next (bad6662)

Open in CodSpeed

@brenelz

brenelz commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Yeah doesn't look like this is a complete fix. Its break's some tests. Ill try to make it more robust

Match createStore's projection seed type (Partial<T> | Store<NoFn<T>>)
instead of NoFn<T> | Store<NoFn<T>>, which rejected the documented
partial-seed pattern. Align the server createProjection signature and
add type tests for store-as-seed inference.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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