Please have a look at the following TypeScript code. It's clear that the type inference behaves like described in the comments.
Now the question: Is it somehow possible to change the definition of type V2 = ... in a way, that it infers to type "someOtherValue" and not to string in general any longer?
As far as I understand TypeScript's type inference, this is absolutely NOT possible ... but who knows, maybe I am wrong. To be on the safe side I better ask the TypeScript community for help. Thanks.
const config1 = { value: 'someValue' as const }
type K1 = keyof typeof config1 // type K1: "value" (not string in general)
type V1 = (typeof config1)['value'] // type V1: "someValue" (not string in general)
const config2 = { value: 'someOtherValue' }
type K2 = keyof typeof config2 // type K2: "value" (not string in general)
type V2 = (typeof config2)['value'] // type V2: string
TypeScript Playground: Demo