title: ExtJS - How can I use async - await functions
body: <p>I have the following code, using <strong>async - await</strong>... that works in HTML + JavaScript environment, except if I use it inside EXTJS App, component listener.</p>
  
  <pre><code>...
  onListInitialize: function(component, eOpts) 
  {
      const citiesRef= db.collection("cities");
  
      // defining async function
      async function getIsCapitalOrCountryIsItaly() {
          const isCapital = citiesRef.where('capital', '==', true).get();
          const isItalian = citiesRef.where('country', '==', 'Italy').get();
  
          const [capitalQuerySnapshot, italianQuerySnapshot] = await Promise.all([
              isCapital,
              isItalian
          ]);
  
          const capitalCitiesArray = capitalQuerySnapshot.docs;
          const italianCitiesArray = italianQuerySnapshot.docs;
  
          const citiesArray = capitalCitiesArray.concat(italianCitiesArray);
  
          return citiesArray;
      }
  
      //We call the asychronous function
      getIsCapitalOrCountryIsItaly().then(result =&gt; {
          result.forEach(docSnapshot =&gt; {
              console.log(docSnapshot.data());
          });
      });
  }
  ...
  </code></pre>
  
  <p>I'm getting the error: <em>Expected an assigment or function call and instead saw an expression.</em></p>
  
  <p>I tried <code>Ext.Promise</code> without success.</p>