solidjs-community / solidjs-community/solid-primitives
Typing improvement on setting/getting storage
Open
@atk is already working on this.
Since Aug 29, 2023.
enhancement
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 162
- Avg merge
- 19h 40m
- Merged PRs (30d)
- 8
Description
So, I was using createStorage with an object interface like this:
const [appStore, setAppStore] = createStorage<{
endpoint: string;
query: string;
...
}>()
As I used the setAppStore(), and set the first parameter, I expected the keys of object to show up as options like this:

but it seems like the typescript didn't recognize the keys.
Is it possible this feature could be added? also I just did a little experiment on this so if it's ok, I'd be happy to help!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.