We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ad483c commit ef383acCopy full SHA for ef383ac
src/storage/abstract.ts
@@ -22,11 +22,11 @@ export interface GenericStorageOptions {
22
/**
23
* Storage initializer type
24
*/
25
-export type StorageInitializer = () => Promise<Storage>;
+export type StorageInitializer<T extends Storage = Storage> = () => Promise<T>;
26
27
28
* Storage initializer callback function type
29
30
-export type StorageInitializerFunction = (
+export type StorageInitializerFunction<T extends Storage = Storage> = (
31
options?: GenericStorageOptions,
32
-) => StorageInitializer;
+) => StorageInitializer<T>;
0 commit comments