joshnuss / svelte-persisted-store

A Svelte store that persists to localStorage
MIT License
994 stars 41 forks source link

TS export needed? #281

Closed cycle4passion closed 2 months ago

cycle4passion commented 2 months ago

I am no typescript wizard to say the least, and had red squiggle everywhere.

Looking in the node modules types for svelte-persisted-store, shouldn't the Persisted type be exported?

for use like...

const books: Persisted<BookType[]> = persisted("books", []);
joshnuss commented 2 months ago

Hi @cycle4passion!

what about:

const books = persisted<BookType[]>("books", [])
joshnuss commented 2 months ago

But yeah, I think it should be exported, PR incoming.