title: How declare return of Promise of array of any objects
body: <p>I try to define return from the method that would return Promise of an array of objects:</p>
  
  <pre><code>public readAll( ) : Promise&lt;any[]&gt; {
  
    this.handler.getObject( {
      Bucket              : this.bucket,
      Key                 : this.tableName + '.json',
      ResponseContentType : 'text/plain'
    } )
    .promise( )
    .then( file =&gt; { 
  
      const data : any[] = this._parseData( file.Body.toString( ) ); 
  
      return new Promise( ( resolve ) =&gt; data );
    } )
    .catch( error =&gt; {
  
      return this.writeAll( );
    } );
  }
  </code></pre>
  
  <p>however, I am facing error "[ts] A function whose declared type is neither 'void' nor 'any' must return a value."</p>
  
  <p>What am I doing wrong?</p>