title: Object with same type for all keys in Flow
body: <p>I'm currently in the process of comparing the <a href="https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler" rel="nofollow noreferrer">Google Closure Compiler</a> and the <a href="https://flowtype.org/docs/" rel="nofollow noreferrer">Flow</a> static type checker, in terms of expressiveness. One thing I know how to do in Closure but not in Flow is expressing a collection of named objects which all have the same type. In Closure one can use <a href="https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#enum-type" rel="nofollow noreferrer">the <code>@enum</code> annotation</a> for this.</p>
  
  <pre><code>/** @enum {function(number):number} */
  const unaryFunctions = {
    sin: Math.sin,
    cos: Math.cos,
    square: function(x) { return x*x; },
  };
  </code></pre>
  
  <p>Is there a way to do something like this using Flow? I guess I could use an ES6 dictionary instead of a plain object, but that would come at considerable overhead if cross-compiling to ES5. I think constructs like these seem pretty idiomatic, so I'm surprised I couldn't find a matching type description in the docs yet.</p>