diff --git a/src/components/SharedComponents/INatIcon/index.tsx b/src/components/SharedComponents/INatIcon/index.tsx index 5bfcb9884..afb280cf1 100644 --- a/src/components/SharedComponents/INatIcon/index.tsx +++ b/src/components/SharedComponents/INatIcon/index.tsx @@ -15,9 +15,7 @@ interface Props { isDarkModeEnabled?: boolean; } -type Aliases = { - [key: string]: string; -}; +type Aliases = Record; // Most of these are names for these icons used in design mapped to more // consistent and deduped filenames. We might also put aliases of convenience // here, e.g. "speech" and "chat" might both map to "comments" if we find diff --git a/src/components/SharedComponents/Map/helpers/mapHelpers.ts b/src/components/SharedComponents/Map/helpers/mapHelpers.ts index ea06fbfc0..091d81b16 100644 --- a/src/components/SharedComponents/Map/helpers/mapHelpers.ts +++ b/src/components/SharedComponents/Map/helpers/mapHelpers.ts @@ -81,10 +81,11 @@ export function getMapRegion( totalBounds: MapBoundaries ): Region { }; } -interface Params { - [key: string]: unknown; -} -export async function fetchObservationUUID( currentZoom: number, latLng: LatLng, params: Params ) { +export async function fetchObservationUUID( + currentZoom: number, + latLng: LatLng, + params: Record +) { const UTFPosition = createUTFPosition( currentZoom, latLng.latitude, latLng.longitude ); const { mTilePositionX, @@ -92,7 +93,7 @@ export async function fetchObservationUUID( currentZoom: number, latLng: LatLng, mPixelPositionX, mPixelPositionY } = UTFPosition; - const tilesParams: Params = { + const tilesParams: Record = { ...params, style: "geotilegrid" }; diff --git a/src/components/SharedComponents/Sheets/RadioButtonSheet.tsx b/src/components/SharedComponents/Sheets/RadioButtonSheet.tsx index ad9ea7281..08366f497 100644 --- a/src/components/SharedComponents/Sheets/RadioButtonSheet.tsx +++ b/src/components/SharedComponents/Sheets/RadioButtonSheet.tsx @@ -15,15 +15,13 @@ interface Props { headerText: string; insideModal?: boolean; onPressClose?: ( ) => void; - radioValues: { - [key: string]: { - value: string; - icon?: string; - label: string; - text?: string; - buttonText?: string; - }; - }; + radioValues: Record; selectedValue?: string; testID?: string; topDescriptionText?: React.JSX.Element; diff --git a/src/components/SharedComponents/UserText.tsx b/src/components/SharedComponents/UserText.tsx index 4f2404a1f..e07ad45bc 100644 --- a/src/components/SharedComponents/UserText.tsx +++ b/src/components/SharedComponents/UserText.tsx @@ -68,7 +68,7 @@ const ALLOWED_ATTRIBUTES_NAMES = ( "href src width height alt cite title class name abbr value align target rel" ).split( " " ); -const ALLOWED_ATTRIBUTES: { [key: string]: string[] } = { a: ["href"] }; +const ALLOWED_ATTRIBUTES: Record = { a: ["href"] }; ALLOWED_TAGS.filter( tag => tag !== "a" ) .forEach( tag => { ALLOWED_ATTRIBUTES[tag] = ALLOWED_ATTRIBUTES_NAMES; } ); diff --git a/src/sharedHelpers/fetchUTFGridData.ts b/src/sharedHelpers/fetchUTFGridData.ts index e05a342c2..f12175c7b 100644 --- a/src/sharedHelpers/fetchUTFGridData.ts +++ b/src/sharedHelpers/fetchUTFGridData.ts @@ -4,7 +4,7 @@ interface UTFGrid { grid: string[]; keys: string[]; - data?: { [key: string]: unknown }; + data?: Record; } const EXPANSION_PIXELS = 16;