Created
June 26, 2018 22:12
-
-
Save eduardomoroni/cb4d48c2f7fa125f3089ae8d5edc8909 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
import { Credential, User } from "../entities"; | |
export interface SignInService { | |
signInWithCredential: (credential: Credential) => Promise<User>; | |
} | |
export class SignInInteractor { | |
signInService: SignInService; | |
constructor(signInService: SignInService) { | |
this.signInService = signInService; | |
} | |
async signIn(credential: Credential): Promise<User> { | |
return this.signInService.signInWithCredential(credential); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment