Skip to content

Commit ef383ac

Browse files
committed
fix: 🐛 Added mised typing to the StorageInitializerFunction
1 parent 9ad483c commit ef383ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/storage/abstract.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export interface GenericStorageOptions {
2222
/**
2323
* Storage initializer type
2424
*/
25-
export type StorageInitializer = () => Promise<Storage>;
25+
export type StorageInitializer<T extends Storage = Storage> = () => Promise<T>;
2626

2727
/**
2828
* Storage initializer callback function type
2929
*/
30-
export type StorageInitializerFunction = (
30+
export type StorageInitializerFunction<T extends Storage = Storage> = (
3131
options?: GenericStorageOptions,
32-
) => StorageInitializer;
32+
) => StorageInitializer<T>;

0 commit comments

Comments
 (0)