@@ -18,7 +18,7 @@ import addEmitter from 'core/cache/decorators/helpers/add-emitter';
18
18
import type { PersistentEngine , CheckablePersistentEngine } from 'core/cache/decorators/persistent/engines/interface' ;
19
19
import type { PersistentOptions , PersistentCache , PersistentTTLDecoratorOptions } from 'core/cache/decorators/persistent/interface' ;
20
20
21
- export default class PersistentWrapper < T extends Cache < V , string > , V = unknown > {
21
+ export default class PersistentWrapper < T extends Cache < string , V > , V = unknown > {
22
22
/**
23
23
* Default TTL to store items
24
24
*/
@@ -32,7 +32,7 @@ export default class PersistentWrapper<T extends Cache<V, string>, V = unknown>
32
32
/**
33
33
* Wrapped cache object
34
34
*/
35
- protected readonly wrappedCache : PersistentCache < V > ;
35
+ protected readonly wrappedCache : PersistentCache < string , V > ;
36
36
37
37
/**
38
38
* Engine to save cache items within a storage
@@ -61,7 +61,7 @@ export default class PersistentWrapper<T extends Cache<V, string>, V = unknown>
61
61
/**
62
62
* Returns an instance of the wrapped cache
63
63
*/
64
- async getInstance ( ) : Promise < PersistentCache < V > > {
64
+ async getInstance ( ) : Promise < PersistentCache < string , V > > {
65
65
if ( this . engine . initCache ) {
66
66
await this . engine . initCache ( this . cache ) ;
67
67
}
@@ -80,7 +80,7 @@ export default class PersistentWrapper<T extends Cache<V, string>, V = unknown>
80
80
set : originalSet ,
81
81
clear : originalClear ,
82
82
subscribe
83
- } = addEmitter < T , V , string > ( this . cache ) ;
83
+ } = addEmitter < T , string , V > ( this . cache ) ;
84
84
85
85
this . wrappedCache . has = this . getDefaultImplementation ( 'has' ) ;
86
86
this . wrappedCache . get = this . getDefaultImplementation ( 'get' ) ;
0 commit comments