title: Argument of type 'Object[]' is not assignable to parameter of type 'Place[] | PromiseLike<Place[]>'
body: <p>Hello folks!</p>
  
  <p>I am coding an app with ionic and have a problem with this. I have implemented this code in the project for another page(places.html and places.ts), but I want to implement for the page and I get the error.</p>
  
  <p>The problem in the bottom line and this line on "data".</p>
  
  <pre><code>query.find().then(data =&gt; resolve(data), error =&gt; reject(error));
  
  resolve(data);
  </code></pre>
  
  <p>Can you help me?</p>
  
  <p>All Code:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import Parse from 'parse';
  
  @Injectable()
  export class Place extends Parse.Object {
  
  constructor() {
   super('Place');
  }
  
  distance(location, unit) {
  
  if (!location) {
    return null;
  }
  
  var geoPoint = new Parse.GeoPoint({
    latitude: location.latitude,
    longitude: location.longitude
  });
  
  if (unit === 'km') {
    return this.location.kilometersTo(geoPoint).toFixed(2) + ' ' + unit;
   } else {
    return this.location.milesTo(geoPoint).toFixed(2) + ' ' + unit;
   }
  }
  
  static like(place) {
  
  return new Promise((resolve, reject) =&gt; {
    Parse.Cloud.run('likePlace', { placeId: place.id }).then(data =&gt; {
      resolve(data);
    }, error =&gt; {
      reject(error);
    });
   });
   }
  
   static load(params): Promise&lt;Place[]&gt; {
  
    return new Promise((resolve, reject) =&gt; {
  
    let page = params.page || 0;
    let limit = params.limit || 50;
    let distance = params.distance || 100;
  
    let query = new Parse.Query(this);
    var subQuery = new Parse.Query(this);
    var subQueryTwo = new Parse.Query(this);
  
    subQuery.greaterThan('expiresAt', new Date());
    subQueryTwo.doesNotExist('expiresAt');
  
    query = Parse.Query.or(subQuery, subQueryTwo);
    query.include('category');
    query.equalTo('isApproved', true);
  
    if (params.category) {
      query.equalTo('category', params.category);
    }
  
    if (params.search &amp;&amp; params.search !== '') {
      query.contains('canonical', params.search);
    }
  
    if (params.location) {
  
      var point = new Parse.GeoPoint({
        latitude: params.location.latitude,
        longitude: params.location.longitude
      });
  
      if (params.unit &amp;&amp; params.unit === 'km') {
        query.withinKilometers('location', point, distance);
      } else {
        query.withinMiles('location', point, distance);
      }
    } else {
      query.descending('createdAt');
    }
  
    query.skip(page * limit);
    query.limit(limit);
  
    query.find().then(data =&gt; resolve(data), error =&gt; reject(error));
  });
  }
  
  static loadFavorites(params): Promise&lt;Place[]&gt; {
  
   return new Promise((resolve, reject) =&gt; {
  
    let page = params.page || 0;
    let limit = params.limit || 50;
  
    let query = new Parse.Query(this);
    query.equalTo('isApproved', true);
    query.equalTo('likes', Parse.User.current());
  
    query.skip(page * limit);
    query.limit(limit);
  
    query.find().then(data =&gt; resolve(data), error =&gt; reject(error));
  });
  }
  
  static create(data): Promise&lt;Place&gt; {
  
  return new Promise((resolve, reject) =&gt; {
  
    let place = new Parse.Object('Place');
  
    place.save(data).then(data =&gt; {
      resolve(data);
    }, error =&gt; {
      reject(error);
    });
  });
  }
  
  get title(): string {
   return this.get('title');
  }
  
  set title(val) {
    this.set('title', val);
  }
  
  get description(): string {
   return this.get('description');
  }
  
  set description(val) {
   this.set('description', val);
  }
  
  get phone(): string {
   return this.get('phone');
  }
  
   set phone(val) {
   this.set('phone', val);
  }
  
  get website(): string {
    return this.get('website');
  }
  
  set website(val) {
    this.set('website', val);
  }
  
  get address(): string {
    return this.get('address');
  }
  
  set address(val) {
    this.set('address', val);
  }
  
  get category() {
    return this.get('category');
  }
  
  set category(val) {
    this.set('category', val);
  }
  
  get image() {
    return this.get('image');
  }
  
  set image(val) {
    this.set('image', val);
  }
  
  get location() {
    return this.get('location');
  }
  
  set location(val) {
    var geoPoint = new Parse.GeoPoint({
    latitude: val.lat,
    longitude: val.lng
  });
  this.set('location', geoPoint);
  }
  
  get imageTwo() {
    return this.get('imageTwo');
  }
  
  get imageThree() {
    return this.get('imageThree');
  }
  
  get imageFour() {
    return this.get('imageFour');
  }
  
  get imageThumb() {
    return this.get('imageThumb');
  }
  
  get ratingCount() {
    return this.get('ratingCount');
  }
  
  get ratingTotal() {
    return this.get('ratingTotal');
  }
  
  get rating() {
  
   if (!this.ratingCount &amp;&amp; !this.ratingTotal) {
    return null;
  }
  
  return Math.round(this.ratingTotal / this.ratingCount);
  }
  
  }
  
  Parse.Object.registerSubclass('Place', Place);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/MJyqh.png" rel="nofollow noreferrer">Screenshot of the error</a></p>