const config = { mode: "dark", retries: 3 };
stringThe answer is string. The const only stops you from assigning a new object to config. Its properties can still change, so TypeScript widens the literal "dark" to string.
The tempting answer "dark" is wrong here. You get "dark" only if you add as const or write an explicit type.
Read more