chore: regenerate types to correctly type function declarations

This commit is contained in:
Eric Y Liu 2021-07-10 08:38:21 -07:00
commit 1dc547427d
3 changed files with 926 additions and 13 deletions

File diff suppressed because it is too large Load diff

View file

@ -4,6 +4,9 @@
let storage: LocalStorage;
let toggled = false;
let events = [];
$: if (storage) storage.clearItem();
$: if (storage) storage.clearAll();
</script>
<LocalStorage

View file

@ -13,18 +13,6 @@ export interface LocalStorageProps {
* @default ""
*/
value?: any;
/**
* Remove the persisted key value from the browser's local storage
* @default () => { localStorage.removeItem(key); }
*/
clearItem?: () => void;
/**
* Clear all key values from the browser's local storage
* @default () => { localStorage.clear(); }
*/
clearAll?: () => void;
}
export default class LocalStorage extends SvelteComponentTyped<
@ -34,4 +22,14 @@ export default class LocalStorage extends SvelteComponentTyped<
update: CustomEvent<{ prevValue: any; value: any }>;
},
{}
> {}
> {
/**
* Remove the persisted key value from the browser's local storage
*/
clearItem: () => void;
/**
* Clear all key values from the browser's local storage
*/
clearAll: () => void;
}