import { AsyncStorage } from 'react-native' ; export const get = async < T > ( key ) : Promise < T | null > => { return JSON . parse ( await AsyncStorage . getItem ( key ) ) ; } ; export const set = < T > ( key , value ) : Promise < void > => { return AsyncStorage . setItem ( key , JSON . stringify ( value ) ) ; } ; export const remove = ( key ) : Promise < void > => { return AsyncStorage . removeItem ( key ) ; } ; export const clear = ( ) : Promise < void > => { return AsyncStorage . clear ( ) ; } ;