@@ -75,9 +75,6 @@ type IsomorphicLoadedClerk = Without<
75
75
| 'buildOrganizationProfileUrl'
76
76
| 'buildHomeUrl'
77
77
| 'buildUrlWithAuth'
78
- | 'redirectWithAuth'
79
- | 'redirectToSignIn'
80
- | 'redirectToSignUp'
81
78
| 'handleRedirectCallback'
82
79
| 'handleUnauthenticated'
83
80
| 'authenticateWithMetamask'
@@ -93,12 +90,6 @@ type IsomorphicLoadedClerk = Without<
93
90
| 'mountUserProfile'
94
91
| 'client'
95
92
> & {
96
- // TODO: Align return type
97
- redirectWithAuth : ( ...args : Parameters < Clerk [ 'redirectWithAuth' ] > ) => void ;
98
- // TODO: Align return type
99
- redirectToSignIn : ( options : SignInRedirectOptions ) => void ;
100
- // TODO: Align return type
101
- redirectToSignUp : ( options : SignUpRedirectOptions ) => void ;
102
93
// TODO: Align return type and parms
103
94
handleRedirectCallback : ( params : HandleOAuthCallbackParams ) => void ;
104
95
handleUnauthenticated : ( ) => void ;
@@ -777,66 +768,73 @@ export class IsomorphicClerk implements IsomorphicLoadedClerk {
777
768
}
778
769
} ;
779
770
780
- redirectWithAuth = ( ...args : Parameters < Clerk [ 'redirectWithAuth' ] > ) : void => {
771
+ redirectWithAuth = async ( ...args : Parameters < Clerk [ 'redirectWithAuth' ] > ) : Promise < unknown > => {
781
772
const callback = ( ) => this . clerkjs ?. redirectWithAuth ( ...args ) ;
782
773
if ( this . clerkjs && this . #loaded) {
783
- void callback ( ) ;
774
+ return callback ( ) ;
784
775
} else {
785
776
this . premountMethodCalls . set ( 'redirectWithAuth' , callback ) ;
777
+ return ;
786
778
}
787
779
} ;
788
780
789
- redirectToSignIn = ( opts : SignInRedirectOptions ) : void => {
781
+ redirectToSignIn = async ( opts : SignInRedirectOptions ) : Promise < unknown > => {
790
782
const callback = ( ) => this . clerkjs ?. redirectToSignIn ( opts as any ) ;
791
783
if ( this . clerkjs && this . #loaded) {
792
- void callback ( ) ;
784
+ return callback ( ) ;
793
785
} else {
794
786
this . premountMethodCalls . set ( 'redirectToSignIn' , callback ) ;
787
+ return ;
795
788
}
796
789
} ;
797
790
798
- redirectToSignUp = ( opts : SignUpRedirectOptions ) : void => {
791
+ redirectToSignUp = async ( opts : SignUpRedirectOptions ) : Promise < unknown > => {
799
792
const callback = ( ) => this . clerkjs ?. redirectToSignUp ( opts as any ) ;
800
793
if ( this . clerkjs && this . #loaded) {
801
- void callback ( ) ;
794
+ return callback ( ) ;
802
795
} else {
803
796
this . premountMethodCalls . set ( 'redirectToSignUp' , callback ) ;
797
+ return ;
804
798
}
805
799
} ;
806
800
807
- redirectToUserProfile = ( ) : void => {
801
+ redirectToUserProfile = async ( ) : Promise < unknown > => {
808
802
const callback = ( ) => this . clerkjs ?. redirectToUserProfile ( ) ;
809
803
if ( this . clerkjs && this . #loaded) {
810
- callback ( ) ;
804
+ return callback ( ) ;
811
805
} else {
812
806
this . premountMethodCalls . set ( 'redirectToUserProfile' , callback ) ;
807
+ return ;
813
808
}
814
809
} ;
815
810
816
- redirectToHome = ( ) : void => {
811
+ redirectToHome = async ( ) : Promise < unknown > => {
817
812
const callback = ( ) => this . clerkjs ?. redirectToHome ( ) ;
818
813
if ( this . clerkjs && this . #loaded) {
819
- callback ( ) ;
814
+ return callback ( ) ;
820
815
} else {
821
816
this . premountMethodCalls . set ( 'redirectToHome' , callback ) ;
817
+ return ;
822
818
}
823
819
} ;
824
820
825
- redirectToOrganizationProfile = ( ) : void => {
821
+ redirectToOrganizationProfile = async ( ) : Promise < unknown > => {
826
822
const callback = ( ) => this . clerkjs ?. redirectToOrganizationProfile ( ) ;
827
823
if ( this . clerkjs && this . #loaded) {
828
- callback ( ) ;
824
+ return callback ( ) ;
829
825
} else {
830
826
this . premountMethodCalls . set ( 'redirectToOrganizationProfile' , callback ) ;
827
+ return ;
831
828
}
832
829
} ;
833
830
834
- redirectToCreateOrganization = ( ) : void => {
831
+ redirectToCreateOrganization = async ( ) : Promise < unknown > => {
835
832
const callback = ( ) => this . clerkjs ?. redirectToCreateOrganization ( ) ;
836
833
if ( this . clerkjs && this . #loaded) {
837
- callback ( ) ;
834
+ return callback ( ) ;
838
835
} else {
839
836
this . premountMethodCalls . set ( 'redirectToCreateOrganization' , callback ) ;
837
+ return ;
840
838
}
841
839
} ;
842
840
0 commit comments