if type is not string, then codec is mandatory
This commit is contained in:
parent
be9d3dad83
commit
cb720b7a96
@ -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>,
|
||||
|
Loading…
Reference in New Issue
Block a user