Skip to content

Commit

Permalink
Merge branch 'master' of github.com:leancloud/javascript-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyeh committed May 14, 2019
2 parents 37d1620 + c1078b8 commit 3cea1ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,9 @@ module.exports = function(AV) {
);

AV.FriendShipQuery = AV.Query._extend({
_objectClass: AV.User,
_newObject: function() {
return new AV.User();
const UserClass = AV.Object._getSubclass('_User');
return new UserClass();
},
_processResult: function(json) {
if (json && json[this._friendshipTag]) {
Expand Down
10 changes: 4 additions & 6 deletions storage.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,6 @@ declare interface LiveQueryEvent<T> {
delete: (target?: T) => any;
}

declare class FriendShipQuery extends Query<User> {}

export class SearchQuery<T extends Queriable> extends BaseQuery<T> {
sid(sid: string): this;
queryString(q: string): this;
Expand Down Expand Up @@ -732,8 +730,8 @@ export class User extends Object {
): Promise<User>;
static verifyMobilePhone(code: string, options?: AuthOptions): Promise<User>;

static followerQuery(userObjectId: string): FriendShipQuery;
static followeeQuery(userObjectId: string): FriendShipQuery;
static followerQuery<T extends User>(userObjectId: string): Query<T>;
static followeeQuery<T extends User>(userObjectId: string): Query<T>;

loginWithWeapp(options?: WeappLoginOptions): Promise<User>;
loginWithWeappWithUnionId(
Expand Down Expand Up @@ -799,8 +797,8 @@ export class User extends Object {
options: { user: User | string },
authOptions?: AuthOptions
): Promise<void>;
followerQuery(): FriendShipQuery;
followeeQuery(): FriendShipQuery;
followerQuery(): Query<this>;
followeeQuery(): Query<this>;
}

export class Captcha {
Expand Down

0 comments on commit 3cea1ff

Please sign in to comment.