consider the following snippet:
interface NameToPromise {
[key: string]: Promise<any>
}
const nameToPromise: NameToPromise = {}
nameToPromise.someProp = new Promise<boolean>(resolve => setTimeout(() => resolve(true), 100)
If you hover over someProp, the typescript compiler shows Promise<any>. What I want him to do, is to start as any, but infer that it should be Promise<boolean> since this is the value thats assigned to it.
How can I achieve this in Typescript?