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';
1111 * });
1212 *
1313 */
14- export class MMKVStorageWrapper
15- implements PersistentStorage < string | null | undefined > {
14+ export class MMKVStorageWrapper implements PersistentStorage < string | null > {
1615 private storage ;
1716
1817 constructor ( storage : MMKVStorageInterface ) {
1918 this . storage = storage ;
2019 }
2120
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 ;
2423 }
2524
2625 removeItem ( key : string ) : Promise < void > {
@@ -34,7 +33,7 @@ export class MMKVStorageWrapper
3433 } ) ;
3534 }
3635
37- setItem ( key : string , value : string | null | undefined ) : Promise < void > {
36+ setItem ( key : string , value : string | null ) : Promise < void > {
3837 return new Promise ( ( resolve , reject ) => {
3938 this . storage
4039 . setItem ( key , value )
You can’t perform that action at this time.
0 commit comments