The TypeScript satisfies operator keeps literal types
const routes = {
home: '/',
about: '/about',
} satisfies Record<string, string>;
routes.home; // type is '/', not string
const routes = {
home: '/',
about: '/about',
} satisfies Record<string, string>;
routes.home; // type is '/', not string