Open Neosoulink opened 8 months ago
I too was a bit annoyed from the TypeScript warnings, so I've added these declarations to a index.d.ts
file in my project's root:
declare module 'nuxt-storage/local-storage' {
export function getData(key: string)
export function setData(key: string, value: string)
}
I'm only using those two functions so that's all I need. For sure there is a better way to do it this but I was lazy and want it to just work. 😄
Currently, I'm working on a Nuxt3 app and wanted to implement a small feature that will use localStorage...
My app is in typescript, and unfortunately, I wasn't able to load types: See the error:
Even though the project (Nuxt-storage) was coded in typescript, the built files don't come with typescript support 🐧