File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,15 @@ import { PersistentStorage } from '../types';
11
11
* });
12
12
*
13
13
*/
14
- export class MMKVStorageWrapper
15
- implements PersistentStorage < string | null | undefined > {
14
+ export class MMKVStorageWrapper implements PersistentStorage < string | null > {
16
15
private storage ;
17
16
18
17
constructor ( storage : MMKVStorageInterface ) {
19
18
this . storage = storage ;
20
19
}
21
20
22
- getItem ( key : string ) : Promise < string | null | undefined > {
23
- return this . storage . getItem ( key ) ;
21
+ getItem ( key : string ) : Promise < string | null > {
22
+ return this . storage . getItem ( key ) || null ;
24
23
}
25
24
26
25
removeItem ( key : string ) : Promise < void > {
@@ -34,7 +33,7 @@ export class MMKVStorageWrapper
34
33
} ) ;
35
34
}
36
35
37
- setItem ( key : string , value : string | null | undefined ) : Promise < void > {
36
+ setItem ( key : string , value : string | null ) : Promise < void > {
38
37
return new Promise ( ( resolve , reject ) => {
39
38
this . storage
40
39
. setItem ( key , value )
You can’t perform that action at this time.
0 commit comments