title: Conditional types without a shared param
body: <p>I want to make my props be either type A, or B. For example</p>
  <pre><code>export default function App() {
    type Checkbox = {
      type: &quot;checkbox&quot;;
      checked: boolean;
    };
  
    type Dropdown = {
      type: &quot;dropdown&quot;;
      options: Array&lt;any&gt;;
      selectedOption: number;
    };
  
    type CheckboxOrDropdown = Checkbox | Dropdown;
  
    const Component: FC&lt;CheckboxOrDropdown&gt; = (props) =&gt; {
      return &lt;&gt;&quot;...correct component&quot;&lt;/&gt;;
    };
  
    // these returns are just examples
    return &lt;Component type=&quot;checkbox&quot; checked={true} /&gt;;
    return &lt;Component type=&quot;dropdown&quot; options={[]} selectedOption={0} /&gt;;
  }
  </code></pre>
  <p>Here's a <a href="https://codesandbox.io/s/brave-shockley-ul2xg?file=/src/App.tsx" rel="nofollow noreferrer">fiddle</a></p>
  <p>How can I achieve the same, but without the &quot;type&quot; prop? So that TS recognizes the type based on other props?</p>