mCodex / react-native-sensitive-info

Save sensitive data into Android's Shared Preferences with keystore encryption/iOS's Keychain for React Native
https://mcodex.dev/react-native-sensitive-info/
MIT License
982 stars 220 forks source link

Types for getAllItems is wrong #385

Open D4uS1 opened 1 year ago

D4uS1 commented 1 year ago

The type for getAllItems is defined as array of an array of SensitiveInfoEntry items. But this seems to be wrong because the method only returns a hashmap. I am able to access the items in the map using some index but i need to put @ts-ignore above the line to get no typescript errors.

const allItems = await SInfo.getAllItems({ sharedPreferencesName: 'MyPreferencesName' })

// @ts-ignore
const item = allItems['SomeItem'];
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.