title: What is the right way to define es6 function type
body: <p>while learning in react 16.8 with typescript code base, I came through many diffrent <em>type definition</em> pattern is been followed.</p>
  
  <p>so for the sake of consistency,</p>
  
  <p>which is the right way (recommended or valid) to set a type definition of a es6 arrow method especially when object destructuring comes into picture</p>
  
  <p>so my first question is what is the right way to define (or set, what it called) <em>type</em> of a function </p>
  
  <ol>
  <li>write just after the function name , before <code>=</code> </li>
  </ol>
  
  <pre><code>    const method: MethodType = (state:AlphaState , action: AlphaAction) =&gt; {
      return data;
  }
  </code></pre>
  
  <ol start="2">
  <li>after the parameter listing , just before <code>=&gt;</code></li>
  </ol>
  
  <pre><code>    const method  = (state:AlphaState , action: AlphaAction): MethodType =&gt; ({
  
      })
  
  </code></pre>
  
  <hr>
  
  <p>now second part of my question is if we use object destructuring in parameter then it become more complex .</p>
  
  <p>Where to write parameters type and whether it can be conflicts with parameter typing and function typing signature?</p>
  
  <p>So here is in case of object </p>
  
  <ol start="3">
  <li>write against each property of parameter object,  just before each  <code>,</code></li>
  </ol>
  
  <pre><code>     const appMethod: MethodType = ({state:AppState , action: AppAction}) =&gt; ({
       }
  </code></pre>
  
  <ol start="4">
  <li>after the  parameter list, a separate type list with same type order after destructuring done, i.e. after first closing <code>}</code></li>
  </ol>
  
  <pre><code>    const appMethod: MethodType = ({state , action}:{AppState, AppAction}) =&gt; {}
  </code></pre>
  
  <p>Also welcome any other or recommended style to handle this.</p>