flow typed - How can I express the type of a map, where one of the keys has a different type? -


basically want this:

type thing = { description: string } & { [key:string|number]: thing } 

but above results in key description being described 2 incompatible types. tried intersection $diff remove description second part, didn't help.

how can describe map type single key special cased?


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -