Skip to content

Commit

Permalink
fix: allow omitting transaction options
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 11, 2024
1 parent 3e9c499 commit 0bdd1de
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface Driver<OptionsT = any, InstanceT = any> {
name?: string;
options?: OptionsT;
getInstance?: () => InstanceT;
hasItem: (key: string, opts: TransactionOptions) => MaybePromise<boolean>;
hasItem: (key: string, opts?: TransactionOptions) => MaybePromise<boolean>;
getItem: (
key: string,
opts?: TransactionOptions
Expand All @@ -33,11 +33,11 @@ export interface Driver<OptionsT = any, InstanceT = any> {
commonOptions?: TransactionOptions
) => MaybePromise<{ key: string; value: StorageValue }[]>;
/** @experimental */
getItemRaw?: (key: string, opts: TransactionOptions) => MaybePromise<unknown>;
getItemRaw?: (key: string, opts?: TransactionOptions) => MaybePromise<unknown>;
setItem?: (
key: string,
value: string,
opts: TransactionOptions
opts?: TransactionOptions
) => MaybePromise<void>;
/** @experimental */
setItems?: (
Expand All @@ -48,15 +48,15 @@ export interface Driver<OptionsT = any, InstanceT = any> {
setItemRaw?: (
key: string,
value: any,
opts: TransactionOptions
opts?: TransactionOptions
) => MaybePromise<void>;
removeItem?: (key: string, opts: TransactionOptions) => MaybePromise<void>;
removeItem?: (key: string, opts?: TransactionOptions) => MaybePromise<void>;
getMeta?: (
key: string,
opts: TransactionOptions
opts?: TransactionOptions
) => MaybePromise<StorageMeta | null>;
getKeys: (base: string, opts: TransactionOptions) => MaybePromise<string[]>;
clear?: (base: string, opts: TransactionOptions) => MaybePromise<void>;
getKeys: (base: string, opts?: TransactionOptions) => MaybePromise<string[]>;
clear?: (base: string, opts?: TransactionOptions) => MaybePromise<void>;
dispose?: () => MaybePromise<void>;
watch?: (callback: WatchCallback) => MaybePromise<Unwatch>;
}
Expand Down

0 comments on commit 0bdd1de

Please sign in to comment.