Last active
May 18, 2022 07:25
-
-
Save matinzd/833bed9dc5fc93cce305774c0a5a3de9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface BaseAuthProvider { | |
initialize(): void; | |
login(): void; | |
} | |
export class GoogleSignin implements BaseAuthProvider { | |
initialize(): void { | |
throw new Error("Method not implemented."); | |
} | |
login(): void { | |
throw new Error("Method not implemented."); | |
} | |
} | |
export const loginWithSocial = (AuthProvider: new () => BaseAuthProvider) => { | |
const loginProvider = new AuthProvider(); | |
loginProvider.initialize(); | |
}; | |
loginWithSocial(GoogleSignin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment