title: Error: The type cast expression is expected to be wrapped with parenthesis when using get function
body: <p>im new to javascript and im trying to make a get request to a youtube API. I have preconfigured a few things related to the request before making it using axios. However, i think my question is more related to the use of the get function. </p>
  
  <p>My predefined configuration for the request is stored under the 'youtube' object. Here is the code uesd to create it </p>
  
  <pre><code>import axios from 'axios';
  
  
  const KEY = 'AIzaSyDVd1jDhcZdtJb--1_ncBqpL0Gxgfs9ys8';
  
  export default axios.create({
  
      baseURL: 'https://www.googleapis.com/youtube/v3',
      params: {
          part: 'snippet',
          maxResults: 5,
          key: KEY
  
      }
  });
  </code></pre>
  
  <p>My question is related to when i use the get function using these settings. </p>
  
  <p>The code below gave me the following error: "Parsing error: The type cast expression is expected to be wrapped with parenthesis"</p>
  
  <pre><code>onTermSubmit = (term) =&gt; {
  
          youtube.get('/search', 
              params: {
                  q:term
              }
          );
      };
  </code></pre>
  
  <p>But when i add parenthesis around params it works fine:</p>
  
  <pre><code>onTermSubmit = (term) =&gt; {
  
          youtube.get('/search', {
              params: {
                  q:term
              }
          });
      };
  </code></pre>
  
  <p>Can someone explain why including the parenthesis solves this error, as well as what the error actually means in the first place?</p>