An object literal widens to its general types, so a configuration object loses exactly the information that would have made it useful.
const config = { env: 'production', retries: 3 };
// { env: string; retries: number }
const config = { env: 'production', retries: 3 } as const;
// { readonly env: "production"; readonly retries: 3 }
const STATUSES = ['pending', 'paid'] as const;
type Status = typeof STATUSES[number]; // 'pending' | 'paid'
The last two lines are the pattern worth memorising: a runtime array and a compile-time union derived from it, with no possibility of the two drifting apart. It also makes the object deeply readonly, which is usually wanted and occasionally rejected by a function expecting a mutable array — and the error message for that is unhelpful enough to be worth recognising.