joshnuss / svelte-persisted-store

A Svelte store that persists to localStorage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

need to add options param to typings in index.d.ts

JDR42 opened this issue · comments

commented

Thank you for a great library!

Issue: There isn't an options param in the typings included in dist/index.d.ts. Does the npm distro have to be updated?

I believe the new dist/index.d.ts file should look something like this:

import { Writable } from 'svelte/store';

interface Serializer<T> {
  parse(text: string): T
  stringify(object: T): string
}

interface Options<T> {
  serializer: Serializer<T>
}

declare function writable<T>(key: string, initialValue: T, options?: Options<T>): Writable<T>;

export { writable };
commented

Sorry... this was premature...