solid-primitives icon indicating copy to clipboard operation
solid-primitives copied to clipboard

fix(storage): types

Open atk opened this issue 2 months ago • 4 comments

docs(storage): resource usage

This simplifies the types considerably and corrects the documentation on how to use a persisted state with createResource.

atk avatar Oct 27 '25 13:10 atk

🦋 Changeset detected

Latest commit: 348974b434050028ffc1edc838f6c568f2148bd6

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

This PR includes changesets to release 1 package
Name Type
@solid-primitives/storage Minor

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

changeset-bot[bot] avatar Oct 27 '25 13:10 changeset-bot[bot]

The idea is mostly about TS, because it lets you keep the original type information, which is impossible if you generate the tuple yourself.

atk avatar Oct 28 '25 08:10 atk

Object.assign is the only part I'm questioning really. I would prefer typecasting as any. But if you're fine with it, I don't have other comments.

thetarnav avatar Nov 03 '25 16:11 thetarnav

The problem with typecasting is that the generics can clash. It is very difficult to get around that, hence why I prefer Object.assign.

atk avatar Nov 04 '25 08:11 atk