Skip to content

Commit

Permalink
chore: apply automated lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 11, 2024
1 parent a2a4ab4 commit 3950d36
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,19 @@ type StorageItemMap<T extends StorageDefinition> = T["items"];

export interface Storage<T extends StorageValue = StorageValue> {
// Item
hasItem<U extends Extract<T, StorageDefinition>, K extends keyof StorageItemMap<U>>(
hasItem<
U extends Extract<T, StorageDefinition>,
K extends keyof StorageItemMap<U>,
>(
key: K,
opts?: TransactionOptions
): Promise<boolean>;
hasItem(key: string, opts?: TransactionOptions): Promise<boolean>;

getItem<U extends Extract<T, StorageDefinition>, K extends keyof StorageItemMap<U>>(
getItem<
U extends Extract<T, StorageDefinition>,
K extends keyof StorageItemMap<U>,
>(
key: K,
ops?: TransactionOptions
): Promise<StorageItemMap<U>[K] | null>;
Expand All @@ -96,7 +102,10 @@ export interface Storage<T extends StorageValue = StorageValue> {
opts?: TransactionOptions
) => Promise<MaybeDefined<T> | null>;

setItem<U extends Extract<T, StorageDefinition>, K extends keyof StorageItemMap<U>>(
setItem<
U extends Extract<T, StorageDefinition>,
K extends keyof StorageItemMap<U>,
>(
key: K,
value: StorageItemMap<U>[K],
opts?: TransactionOptions
Expand Down

0 comments on commit 3950d36

Please sign in to comment.