taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit cb720b7a965ff20c5e857f8f84e958eadf50794e
parent be9d3dad83801806c9a7d99c925aa2b86571a70b
Author: Sebastian <sebasjm@gmail.com>
Date:   Mon, 29 May 2023 14:53:36 -0300

if type is not string, then codec is mandatory

Diffstat:
Mpackages/web-util/src/hooks/useLocalStorage.ts | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/packages/web-util/src/hooks/useLocalStorage.ts b/packages/web-util/src/hooks/useLocalStorage.ts @@ -36,6 +36,11 @@ export type StorageKey<Key> = { codec: Codec<Key>; }; +export function buildStorageKey<Key>( + name: string, + codec: Codec<Key>, +): StorageKey<Key>; +export function buildStorageKey(name: string): StorageKey<string>; export function buildStorageKey<Key = string>( name: string, codec?: Codec<Key>,