Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ Categories: Element; Admin: Element; }'
I’m quite new to TS and would like to understand why I get a type error in the following code (simplified): "use client"; import { ArrowDownWideNarrow, Settings } from "lucide-react"; interface LinkItemProps { name: string; } const iconMap = { Categories: <ArrowDownWideNarrow />, Admin: <Settings />, }; export const LinkItem = ({ name }: LinkItemProps)… Read More Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ Categories: Element; Admin: Element; }'