mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
Fix TypeScript definitions; function declarations should be typed as accessors, not props (#740)
* chore(deps-dev): upgrade svelte to v0.8.1 * chore: regenerate types to correctly type function declarations * test: fix svelte-check warnings
This commit is contained in:
parent
b6fa25c3e7
commit
18c6f03224
9 changed files with 951 additions and 22 deletions
24
types/LocalStorage/LocalStorage.d.ts
vendored
24
types/LocalStorage/LocalStorage.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue