Skip to content

Commit

Permalink
fix: getItems, setItems types (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Mar 14, 2024
1 parent 4187d88 commit 387018c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ export interface Storage<T extends StorageValue = StorageValue> {
opts?: TransactionOptions
) => Promise<U | null>;
/** @experimental */
getItems: (
getItems: <U extends T>(
items: (string | { key: string; options?: TransactionOptions })[],
commonOptions?: TransactionOptions
) => Promise<{ key: string; value: StorageValue }[]>;
) => Promise<{ key: string; value: U }[]>;
/** @experimental See https://github.com/unjs/unstorage/issues/142 */
getItemRaw: <T = any>(
key: string,
Expand All @@ -81,8 +81,8 @@ export interface Storage<T extends StorageValue = StorageValue> {
opts?: TransactionOptions
) => Promise<void>;
/** @experimental */
setItems: (
items: { key: string; value: string; options?: TransactionOptions }[],
setItems: <U extends T>(
items: { key: string; value: U; options?: TransactionOptions }[],
commonOptions?: TransactionOptions
) => Promise<void>;
/** @experimental See https://github.com/unjs/unstorage/issues/142 */
Expand Down

0 comments on commit 387018c

Please sign in to comment.