Open avi12 opened 1 month ago
It would make it type safer but it also comes at a high compromise and that is that you are forced to check the types etc. and that would add complexity especially for beginners with TypeScript. Generally you'd be using the defineItem
stuff either way
I can see both sides. Might be worth switching to unknown for v2, once storage is extracted.
I mean I personally am for it just thinking about others haha
Describe the bug
I noticed that in this snippet,
value
's type isany
https://github.com/wxt-dev/wxt/blob/d2702506332c03f40bfda9b3b59e4c4928e3099b/packages/wxt/src/storage.ts#L481-L485I'm pretty sure the type should rather be
unknown | null
Steps to reproduce
No response
System Info
Used Package Manager
pnpm
Validations