react-native-sensitive-info icon indicating copy to clipboard operation
react-native-sensitive-info copied to clipboard

Types for getAllItems is wrong

Open D4uS1 opened this issue 2 years ago • 1 comments

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'];

D4uS1 avatar Aug 17 '23 11:08 D4uS1

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.

stale[bot] avatar Sep 17 '23 01:09 stale[bot]