How do I make types that can only contain certain properties in flow?
<p>I have some code like this:</p>

<pre><code>/* @flow */

type Options = {
  userdir?: string,
}

function foo(options: Options) {
  return 'foo';
}

foo({userDir: 'bar'});
</code></pre>

<p>I expected that flow would warn me here, that there is no property <code>userDir</code> in my Options type. But according to the flow type checker, this code is totally fine. How do I make types that can only have certain properties in flow?</p>