title: Typescript - make an optional property required when another property is present
body: <p>I have proptypes shown below</p>
  <pre><code>interface Props {
  resource: string;
  create?: boolean;
  route?: string;
  }
  </code></pre>
  <p>As can be seen above, create and route are optional props. However, I would like to implement the types such that if create prop is present then route must now be required. Anyone have any ideas how to do this?</p>