mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
chore: regenerate types to correctly type function declarations
This commit is contained in:
parent
1988b70725
commit
1dc547427d
3 changed files with 926 additions and 13 deletions
File diff suppressed because it is too large
Load diff
|
@ -4,6 +4,9 @@
|
||||||
let storage: LocalStorage;
|
let storage: LocalStorage;
|
||||||
let toggled = false;
|
let toggled = false;
|
||||||
let events = [];
|
let events = [];
|
||||||
|
|
||||||
|
$: if (storage) storage.clearItem();
|
||||||
|
$: if (storage) storage.clearAll();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LocalStorage
|
<LocalStorage
|
||||||
|
|
24
types/LocalStorage/LocalStorage.d.ts
vendored
24
types/LocalStorage/LocalStorage.d.ts
vendored
|
@ -13,18 +13,6 @@ export interface LocalStorageProps {
|
||||||
* @default ""
|
* @default ""
|
||||||
*/
|
*/
|
||||||
value?: any;
|
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<
|
export default class LocalStorage extends SvelteComponentTyped<
|
||||||
|
@ -34,4 +22,14 @@ export default class LocalStorage extends SvelteComponentTyped<
|
||||||
update: CustomEvent<{ prevValue: any; value: any }>;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue