fix(storage): types
docs(storage): resource usage
This simplifies the types considerably and corrects the documentation on how to use a persisted state with createResource.
🦋 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
The idea is mostly about TS, because it lets you keep the original type information, which is impossible if you generate the tuple yourself.
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.
The problem with typecasting is that the generics can clash. It is very difficult to get around that, hence why I prefer Object.assign.