Problem Statement
Create a type with keys K and value type V:
Explanation
Record<K, V> builds an object type where keys come from union K and each value is V—great for dictionaries.
Code Solution
SolutionRead Only
type Route = 'home' | 'about';
const paths: Record<Route, string> = { home: '/', about: '/about' };