File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1066,9 +1066,9 @@ module.exports = function(AV) {
10661066 ) ;
10671067
10681068 AV . FriendShipQuery = AV . Query . _extend ( {
1069- _objectClass : AV . User ,
10701069 _newObject : function ( ) {
1071- return new AV . User ( ) ;
1070+ const UserClass = AV . Object . _getSubclass ( '_User' ) ;
1071+ return new UserClass ( ) ;
10721072 } ,
10731073 _processResult : function ( json ) {
10741074 if ( json && json [ this . _friendshipTag ] ) {
Original file line number Diff line number Diff line change @@ -576,8 +576,6 @@ declare interface LiveQueryEvent<T> {
576576 delete : ( target ?: T ) => any ;
577577}
578578
579- declare class FriendShipQuery extends Query < User > { }
580-
581579export class SearchQuery < T extends Queriable > extends BaseQuery < T > {
582580 sid ( sid : string ) : this;
583581 queryString ( q : string ) : this;
@@ -732,8 +730,8 @@ export class User extends Object {
732730 ) : Promise < User > ;
733731 static verifyMobilePhone ( code : string , options ?: AuthOptions ) : Promise < User > ;
734732
735- static followerQuery ( userObjectId : string ) : FriendShipQuery ;
736- static followeeQuery ( userObjectId : string ) : FriendShipQuery ;
733+ static followerQuery < T extends User > ( userObjectId : string ) : Query < T > ;
734+ static followeeQuery < T extends User > ( userObjectId : string ) : Query < T > ;
737735
738736 loginWithWeapp ( options ?: WeappLoginOptions ) : Promise < User > ;
739737 loginWithWeappWithUnionId (
@@ -799,8 +797,8 @@ export class User extends Object {
799797 options : { user : User | string } ,
800798 authOptions ?: AuthOptions
801799 ) : Promise < void > ;
802- followerQuery ( ) : FriendShipQuery ;
803- followeeQuery ( ) : FriendShipQuery ;
800+ followerQuery ( ) : Query < this > ;
801+ followeeQuery ( ) : Query < this > ;
804802}
805803
806804export class Captcha {
You can’t perform that action at this time.
0 commit comments